Skip to content

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

Merged
headtr1ck merged 1 commit into
pydata:mainfrom
Aurantium-47:fix/windows-docs-temporary-directory
Oct 17, 2026
Merged

headtr1ck merged 1 commit into
pydata:mainfrom
Aurantium-47:fix/windows-docs-temporary-directory

Conversation

@Aurantium-47

Copy link
Copy Markdown
Contributor

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.

@headtr1ck headtr1ck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know that's a thing, thanks!

@headtr1ck headtr1ck added the plan to merge Final call for comments label Oct 16, 2026
@headtr1ck
headtr1ck merged commit 29be48c into pydata:main Oct 17, 2026
57 of 59 checks passed
@welcome

welcome Bot commented Oct 17, 2026

Copy link
Copy Markdown

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

@VeckoTheGecko

Copy link
Copy Markdown
Contributor

Didn't know that's a thing, thanks!

Me too, thanks!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation build failing in Windows

3 participants