Skip to content

DOC: Execute file-writing examples in temporary notebook directories - #11711

Open
Aurantium-47 wants to merge 1 commit into
pydata:mainfrom
Aurantium-47:fix/windows-docs-temporary-directory
Open

Aurantium-47 wants to merge 1 commit into
pydata:mainfrom
Aurantium-47:fix/windows-docs-temporary-directory

Conversation

@Aurantium-47

Copy link
Copy Markdown

Description

Fixes #11458 for the Time Coding and Complex Numbers pages.

The examples retain lazy NetCDF datasets in the notebook kernel, so deleting their temporary files inside the notebook fails on Windows. Use MyST-NB's per-page execution_in_temp setting and remove the hidden directory setup, filename prefixing, and cleanup cells. The executor then removes its temporary directory after the kernel exits. The visible examples and lazy reads are unchanged.

Validation on Windows with MyST-NB 1.4: both original pages reproduced WinError 32; both patched pages executed successfully in a targeted Sphinx build. All seven generated files permitted DELETE access after kernel shutdown, and one file per page was unlinked. The harness retained other files instead of recursively deleting them. Displayed results matched, apart from generated HTML UUIDs. The full documentation build was not run; the two-page fixture had four unresolved references to excluded documentation.

Checklist

AI Disclosure

  • This PR contains AI-generated content.

Tools: Codex, used for implementation, automated validation, review, and drafting this description. The submitter personally reviewed and understood the patch, then requested another AI review before submission. Automated test execution was performed by Codex.

Prompts: try fixing the reported issues and submit PRs; after personal review, review the changes again and make necessary improvements before submitting.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation build failing in Windows

1 participant