Skip to content

Fix: Docs generation create temporary files that are not cleaned up. - #10238

Merged
dcherian merged 2 commits into
pydata:mainfrom
andrewendlinger:docs_tmp_files_clean_up
Apr 20, 2025
Merged

Fix: Docs generation create temporary files that are not cleaned up.#10238
dcherian merged 2 commits into
pydata:mainfrom
andrewendlinger:docs_tmp_files_clean_up

Conversation

@andrewendlinger

Copy link
Copy Markdown
Contributor

When building the documentation, a couple of example files are written to disk but never deleted.

Currently affected:

  • doc/user-guide/io.rst

    • In line 608 saved_on_disk.h5 is written to disk but never removed
      (note: .h5 files are not exlcuded by .gitignore)
  • doc/internals/time-coding.rst

    • test-datetimes1.nc
    • test-datetimes2.nc
    • test-timedeltas1.nc
    • test-timedeltas2.nc

This PR adds a simple clean up snippet at the end of each affected file / section to get rid of them:

.. ipython:: python :suppress:# Cleanupimport osfor f in ["i_am_a_tmp_example.nc", "tmp_file.h5"]:if os.path.exists(f): os.remove(f)

@dcherian

Copy link
Copy Markdown
Contributor

thanks!

@dcherian
dcherian merged commit ee862fe into pydata:mainApr 20, 2025
dcherian added a commit that referenced this pull request Apr 27, 2025
* main: (76 commits)
Update how-to-add-new-backend.rst (#10240)
Support extension array indexes (#9671)
Switch documentation to pydata-sphinx-theme (#8708)
Bump codecov/codecov-action from 5.4.0 to 5.4.2 in the actions group (#10239)
Fix mypy, min-versions CI, xfail Zarr tests (#10255)
Remove `test_dask_layers_and_dependencies` (#10242)
Fix: Docs generation create temporary files that are not cleaned up. (#10238)
opendap / dap4 support for pydap backend (#10182)
Add RangeIndex (#10076)
Fix mypy (#10232)
Fix doctests (#10230)
Fix broken Sphinx Roles (#10225)
`DatasetView.map` fix `keep_attrs` (#10219)
Add datatree repr asv (#10214)
CI: Automatic PR labelling is back (#10201)
Fixes dimension order in `xarray.Dataset.to_stacked_array` (#10205)
Fix references to core classes in docs (#10207)
Update pre-commit hooks (#10208)
add `scipy-stubs` as extra `[types]` dependency (#10202)
Fix sparse dask repr test (#10200)
...
wavebyrd pushed a commit to wavebyrd/xarray that referenced this pull request Mar 13, 2026
* main: (76 commits)
Update how-to-add-new-backend.rst (pydata#10240)
Support extension array indexes (pydata#9671)
Switch documentation to pydata-sphinx-theme (pydata#8708)
Bump codecov/codecov-action from 5.4.0 to 5.4.2 in the actions group (pydata#10239)
Fix mypy, min-versions CI, xfail Zarr tests (pydata#10255)
Remove `test_dask_layers_and_dependencies` (pydata#10242)
Fix: Docs generation create temporary files that are not cleaned up. (pydata#10238)
opendap / dap4 support for pydap backend (pydata#10182)
Add RangeIndex (pydata#10076)
Fix mypy (pydata#10232)
Fix doctests (pydata#10230)
Fix broken Sphinx Roles (pydata#10225)
`DatasetView.map` fix `keep_attrs` (pydata#10219)
Add datatree repr asv (pydata#10214)
CI: Automatic PR labelling is back (pydata#10201)
Fixes dimension order in `xarray.Dataset.to_stacked_array` (pydata#10205)
Fix references to core classes in docs (pydata#10207)
Update pre-commit hooks (pydata#10208)
add `scipy-stubs` as extra `[types]` dependency (pydata#10202)
Fix sparse dask repr test (pydata#10200)
...
Sign up for freeto 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.

2 participants

@andrewendlinger@dcherian