From 0cedd9832111c2af0c46fda46b10bec385ea74ab Mon Sep 17 00:00:00 2001 From: jakirkham Date: Fri, 11 Aug 2023 02:53:34 -0700 Subject: [PATCH] Add `docs` requirements to `pyproject.toml` (#1494) * Add `docs` requirements to `pyproject.toml` * Add release note * Exclude `numpy` version `1.21.0` Move the RTD exclusion to the `numpy` dependency directly. * Require `numcodecs[msgpack]` for `docs` * Update references for installing doc dependencies --- .pyup.yml | 3 --- .readthedocs.yaml | 3 ++- docs/contributing.rst | 4 ++-- docs/release.rst | 3 +++ pyproject.toml | 12 +++++++++++- requirements_rtfd.txt | 12 ------------ 6 files changed, 18 insertions(+), 19 deletions(-) delete mode 100644 requirements_rtfd.txt diff --git a/.pyup.yml b/.pyup.yml index 04937ed0b0..a70df4e3fb 100644 --- a/.pyup.yml +++ b/.pyup.yml @@ -13,6 +13,3 @@ requirements: - requirements_dev_optional.txt: pin: True update: all - - requirements_rtfd.txt: - pin: False - update: False diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 42fc08bca2..2124f77271 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,6 +10,7 @@ sphinx: python: install: - - requirements: requirements_rtfd.txt - method: pip path: . + extra_requirements: + - docs diff --git a/docs/contributing.rst b/docs/contributing.rst index 46fc39d960..0420535093 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -92,8 +92,8 @@ the repository, you can do something like the following:: $ mkdir -p ~/pyenv/zarr-dev $ python -m venv ~/pyenv/zarr-dev $ source ~/pyenv/zarr-dev/bin/activate - $ pip install -r requirements_dev_minimal.txt -r requirements_dev_numpy.txt -r requirements_rtfd.txt - $ pip install -e . + $ pip install -r requirements_dev_minimal.txt -r requirements_dev_numpy.txt + $ pip install -e .[docs] To verify that your development environment is working, you can run the unit tests:: diff --git a/docs/release.rst b/docs/release.rst index aa622723e8..cf1400d3f8 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -24,6 +24,9 @@ Maintenance * Require ``setuptools_scm`` version ``1.5.4``\+ By :user:`John A. Kirkham ` :issue:`1477`. +* Add ``docs`` requirements to ``pyproject.toml`` + By :user:`John A. Kirkham ` :issue:`1494`. + .. _release_2.16.0: 2.16.0 diff --git a/pyproject.toml b/pyproject.toml index 7d8d275c0e..292bfddded 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ maintainers = [ requires-python = ">=3.8" dependencies = [ 'asciitree', - 'numpy>=1.20', + 'numpy>=1.20,!=1.21.0', 'fasteners', 'numcodecs>=0.10.0', ] @@ -43,6 +43,16 @@ jupyter = [ 'ipytree>=0.2.2', 'ipywidgets>=8.0.0', ] +docs = [ + 'sphinx', + 'sphinx_design', + 'sphinx-issues', + 'sphinx-copybutton', + 'sphinx-rtd-theme', + 'pydata-sphinx-theme', + 'numpydoc', + 'numcodecs[msgpack]', +] [project.urls] "Bug Tracker" = "https://github.com/zarr-developers/zarr-python/issues" diff --git a/requirements_rtfd.txt b/requirements_rtfd.txt deleted file mode 100644 index 5d7fec369a..0000000000 --- a/requirements_rtfd.txt +++ /dev/null @@ -1,12 +0,0 @@ -asciitree -setuptools -setuptools_scm -sphinx -sphinx_design -sphinx-issues -sphinx-copybutton -sphinx-rtd-theme -pydata-sphinx-theme -numpydoc -numpy!=1.21.0 -msgpack-python==0.5.6