Skip to content

Commit 8969b5a

Browse files
gwgundersenshoyer
authored andcommitted
Issue 3227: Remove unwanted files created by ipython examples. (#3270)
1 parent 3f4b025 commit 8969b5a

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

doc/dask.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ A dataset can also be converted to a Dask DataFrame using :py:meth:`~xarray.Data
132132
133133
Dask DataFrames do not support multi-indexes so the coordinate variables from the dataset are included as columns in the Dask DataFrame.
134134

135+
.. ipython:: python
136+
:suppress:
137+
138+
import os
139+
os.remove('example-data.nc')
140+
os.remove('manipulated-example-data.nc')
141+
135142
Using Dask with xarray
136143
----------------------
137144

@@ -373,12 +380,6 @@ one million elements (e.g., a 1000x1000 matrix). With large arrays (10+ GB), the
373380
cost of queueing up Dask operations can be noticeable, and you may need even
374381
larger chunksizes.
375382

376-
.. ipython:: python
377-
:suppress:
378-
379-
import os
380-
os.remove('example-data.nc')
381-
382383
Optimization Tips
383384
-----------------
384385

doc/io.rst

+7
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,13 @@ be done directly from zarr, as described in the
743743

744744
.. _io.cfgrib:
745745

746+
.. ipython:: python
747+
:suppress:
748+
749+
import shutil
750+
shutil.rmtree('foo.zarr')
751+
shutil.rmtree('path/to/directory.zarr')
752+
746753
GRIB format via cfgrib
747754
----------------------
748755

doc/weather-climate.rst

+6
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ For data indexed by a :py:class:`~xarray.CFTimeIndex` xarray currently supports:
137137
da.to_netcdf('example-no-leap.nc')
138138
xr.open_dataset('example-no-leap.nc')
139139
140+
.. ipython:: python
141+
:suppress:
142+
143+
import os
144+
os.remove('example-no-leap.nc')
145+
140146
- And resampling along the time dimension for data indexed by a :py:class:`~xarray.CFTimeIndex`:
141147

142148
.. ipython:: python

doc/whats-new.rst

+4
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ Documentation
145145
or pushing new commits.
146146
By `Gregory Gundersen <https://github.com/gwgundersen>`_.
147147

148+
- Fixed documentation to clean up unwanted files created in ``ipython`` examples
149+
(:issue:`3227`).
150+
By `Gregory Gundersen <https://github.com/gwgundersen/>`_.
151+
148152
v0.12.3 (10 July 2019)
149153
----------------------
150154

0 commit comments

Comments
 (0)