Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable running sphinx-build on Windows #6237

Merged
merged 8 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ __pycache__
.hypothesis/

# temp files from docs build
doc/*.nc
doc/auto_gallery
doc/example.nc
doc/rasm.zarr
doc/savefig

# C extensions
Expand Down Expand Up @@ -72,4 +73,3 @@ xarray/tests/data/*.grib.*.idx
Icon*

.ipynb_checkpoints
doc/rasm.zarr
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
print("python exec:", sys.executable)
print("sys.path:", sys.path)

if "conda" in sys.executable:
if "CONDA_DEFAULT_ENV" in os.environ or "conda" in sys.executable:
stanwest marked this conversation as resolved.
Show resolved Hide resolved
print("conda environment:")
subprocess.run(["conda", "list"])
subprocess.run([os.environ.get("CONDA_EXE", "conda"), "list"])
stanwest marked this conversation as resolved.
Show resolved Hide resolved
else:
print("pip environment:")
subprocess.run([sys.executable, "-m", "pip", "list"])
Expand Down
1 change: 1 addition & 0 deletions doc/getting-started-guide/quick-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ You can directly read and write xarray objects to disk using :py:meth:`~xarray.D
xr.open_dataset("example.nc")

.. ipython:: python
:okexcept:
:suppress:

import os
Expand Down
1 change: 1 addition & 0 deletions doc/user-guide/dask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ A dataset can also be converted to a Dask DataFrame using :py:meth:`~xarray.Data
Dask DataFrames do not support multi-indexes so the coordinate variables from the dataset are included as columns in the Dask DataFrame.

.. ipython:: python
:okexcept:
:suppress:

import os
Expand Down
2 changes: 2 additions & 0 deletions doc/user-guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ and currently raises a warning unless ``invalid_netcdf=True`` is set:
xr.open_dataarray("complex.nc", engine="h5netcdf")

.. ipython:: python
:okexcept:
:suppress:

import os
Expand Down Expand Up @@ -727,6 +728,7 @@ This can be useful for generating indices of dataset contents to expose to
search indices or other automated data discovery tools.

.. ipython:: python
:okexcept:
:suppress:

import os
Expand Down
1 change: 1 addition & 0 deletions doc/user-guide/weather-climate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ For data indexed by a :py:class:`~xarray.CFTimeIndex` xarray currently supports:
xr.open_dataset("example-no-leap.nc")

.. ipython:: python
:okexcept:
:suppress:

import os
Expand Down
2 changes: 2 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Bug fixes
Documentation
~~~~~~~~~~~~~

- Enable building the documentation on Windows via `sphinx-build` (:pull:`6237`).
By `Stan West <https://github.com/stanwest>`_.

Internal Changes
~~~~~~~~~~~~~~~~
Expand Down