From a2f44fa024095deaf1cc95fd182249b2edc52bcc Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Thu, 21 Nov 2024 16:15:00 -0500 Subject: [PATCH] Fix documentation build: pin packaging==24.1, install with uv. Documentation builds on readthedocs have been failing due to a conflict with the `packaging=24.2` package. We can avoid it by pinning the package. We also ensure reproducible builds by using uv to install packages from the lockfile. --- .readthedocs.yaml | 24 ++++++++++-------------- pyproject.toml | 2 ++ uv.lock | 22 ++++++++++++++++++++-- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1a929ca..73bc68a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,22 +7,18 @@ build: os: ubuntu-22.04 tools: python: "3.11" - jobs: - post_checkout: - - bash docs/scripts/readthedocs_fetch_notebook_outputs.sh + commands: + # Fetch precomputed notebook outputs (if any) + - bash docs/scripts/readthedocs_fetch_notebook_outputs.sh + # Install and build using uv + - asdf plugin add uv + - asdf install uv latest + - asdf global uv latest + - uv sync --extra docs --frozen + - uv pip install readthedocs-sphinx-ext + - cd docs && uv run python -m sphinx -T -b html -d docs/_build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html sphinx: builder: html configuration: docs/conf.py fail_on_warning: false - -python: - install: - # Equivalent to 'pip install .' - - method: pip - path: . - # Equivalent to 'pip install .[docs]' - - method: pip - path: . - extra_requirements: - - docs diff --git a/pyproject.toml b/pyproject.toml index f1d7f59..59cb4de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,6 +68,7 @@ docs = [ "ipython", "flax>=0.8.2", "optax", + "setuptools", "sphinx>=6.0.0,<7.3.0", "sphinx-book-theme>=1.0.1", "sphinxcontrib-katex", @@ -75,6 +76,7 @@ docs = [ "myst-nb>=1.0.0", "myst-parser>=3.0.1", "matplotlib>=3.5.0", + "packaging==24.1", "sphinx-collections>=0.0.1", "sphinx_contributors", "sphinx-hoverxref", diff --git a/uv.lock b/uv.lock index 5e80c45..a195673 100644 --- a/uv.lock +++ b/uv.lock @@ -1893,6 +1893,7 @@ version = "12.1.3.1" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/37/6d/121efd7382d5b0284239f4ab1fc1590d86d34ed4a4a2fdb13b30ca8e5740/nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl", hash = "sha256:ee53ccca76a6fc08fb9701aa95b6ceb242cdaab118c3bb152af4e579af792728", size = 410594774 }, + { url = "https://files.pythonhosted.org/packages/c5/ef/32a375b74bea706c93deea5613552f7c9104f961b21df423f5887eca713b/nvidia_cublas_cu12-12.1.3.1-py3-none-win_amd64.whl", hash = "sha256:2b964d60e8cf11b5e1073d179d85fa340c120e99b3067558f3cf98dd69d02906", size = 439918445 }, ] [[package]] @@ -1901,6 +1902,7 @@ version = "12.1.105" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/7e/00/6b218edd739ecfc60524e585ba8e6b00554dd908de2c9c66c1af3e44e18d/nvidia_cuda_cupti_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:e54fde3983165c624cb79254ae9818a456eb6e87a7fd4d56a2352c24ee542d7e", size = 14109015 }, + { url = "https://files.pythonhosted.org/packages/d0/56/0021e32ea2848c24242f6b56790bd0ccc8bf99f973ca790569c6ca028107/nvidia_cuda_cupti_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:bea8236d13a0ac7190bd2919c3e8e6ce1e402104276e6f9694479e48bb0eb2a4", size = 10154340 }, ] [[package]] @@ -1909,6 +1911,7 @@ version = "12.1.105" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/b6/9f/c64c03f49d6fbc56196664d05dba14e3a561038a81a638eeb47f4d4cfd48/nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:339b385f50c309763ca65456ec75e17bbefcbbf2893f462cb8b90584cd27a1c2", size = 23671734 }, + { url = "https://files.pythonhosted.org/packages/ad/1d/f76987c4f454eb86e0b9a0e4f57c3bf1ac1d13ad13cd1a4da4eb0e0c0ce9/nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:0a98a522d9ff138b96c010a65e145dc1b4850e9ecb75a0172371793752fd46ed", size = 19331863 }, ] [[package]] @@ -1917,6 +1920,7 @@ version = "12.1.105" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/eb/d5/c68b1d2cdfcc59e72e8a5949a37ddb22ae6cade80cd4a57a84d4c8b55472/nvidia_cuda_runtime_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:6e258468ddf5796e25f1dc591a31029fa317d97a0a94ed93468fc86301d61e40", size = 823596 }, + { url = "https://files.pythonhosted.org/packages/9f/e2/7a2b4b5064af56ea8ea2d8b2776c0f2960d95c88716138806121ae52a9c9/nvidia_cuda_runtime_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:dfb46ef84d73fababab44cf03e3b83f80700d27ca300e537f85f636fac474344", size = 821226 }, ] [[package]] @@ -1928,6 +1932,7 @@ dependencies = [ ] wheels = [ { url = "https://files.pythonhosted.org/packages/9f/fd/713452cd72343f682b1c7b9321e23829f00b842ceaedcda96e742ea0b0b3/nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl", hash = "sha256:165764f44ef8c61fcdfdfdbe769d687e06374059fbb388b6c89ecb0e28793a6f", size = 664752741 }, + { url = "https://files.pythonhosted.org/packages/3f/d0/f90ee6956a628f9f04bf467932c0a25e5a7e706a684b896593c06c82f460/nvidia_cudnn_cu12-9.1.0.70-py3-none-win_amd64.whl", hash = "sha256:6278562929433d68365a07a4a1546c237ba2849852c0d4b2262a486e805b977a", size = 679925892 }, ] [[package]] @@ -1936,6 +1941,7 @@ version = "11.0.2.54" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/86/94/eb540db023ce1d162e7bea9f8f5aa781d57c65aed513c33ee9a5123ead4d/nvidia_cufft_cu12-11.0.2.54-py3-none-manylinux1_x86_64.whl", hash = "sha256:794e3948a1aa71fd817c3775866943936774d1c14e7628c74f6f7417224cdf56", size = 121635161 }, + { url = "https://files.pythonhosted.org/packages/f7/57/7927a3aa0e19927dfed30256d1c854caf991655d847a4e7c01fe87e3d4ac/nvidia_cufft_cu12-11.0.2.54-py3-none-win_amd64.whl", hash = "sha256:d9ac353f78ff89951da4af698f80870b1534ed69993f10a4cf1d96f21357e253", size = 121344196 }, ] [[package]] @@ -1944,6 +1950,7 @@ version = "10.3.2.106" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/44/31/4890b1c9abc496303412947fc7dcea3d14861720642b49e8ceed89636705/nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:9d264c5036dde4e64f1de8c50ae753237c12e0b1348738169cd0f8a536c0e1e0", size = 56467784 }, + { url = "https://files.pythonhosted.org/packages/5c/97/4c9c7c79efcdf5b70374241d48cf03b94ef6707fd18ea0c0f53684931d0b/nvidia_curand_cu12-10.3.2.106-py3-none-win_amd64.whl", hash = "sha256:75b6b0c574c0037839121317e17fd01f8a69fd2ef8e25853d826fec30bdba74a", size = 55995813 }, ] [[package]] @@ -1957,6 +1964,7 @@ dependencies = [ ] wheels = [ { url = "https://files.pythonhosted.org/packages/bc/1d/8de1e5c67099015c834315e333911273a8c6aaba78923dd1d1e25fc5f217/nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl", hash = "sha256:8a7ec542f0412294b15072fa7dab71d31334014a69f953004ea7a118206fe0dd", size = 124161928 }, + { url = "https://files.pythonhosted.org/packages/b8/80/8fca0bf819122a631c3976b6fc517c1b10741b643b94046bd8dd451522c5/nvidia_cusolver_cu12-11.4.5.107-py3-none-win_amd64.whl", hash = "sha256:74e0c3a24c78612192a74fcd90dd117f1cf21dea4822e66d89e8ea80e3cd2da5", size = 121643081 }, ] [[package]] @@ -1968,6 +1976,7 @@ dependencies = [ ] wheels = [ { url = "https://files.pythonhosted.org/packages/65/5b/cfaeebf25cd9fdec14338ccb16f6b2c4c7fa9163aefcf057d86b9cc248bb/nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:f3b50f42cf363f86ab21f720998517a659a48131e8d538dc02f8768237bd884c", size = 195958278 }, + { url = "https://files.pythonhosted.org/packages/0f/95/48fdbba24c93614d1ecd35bc6bdc6087bd17cbacc3abc4b05a9c2a1ca232/nvidia_cusparse_cu12-12.1.0.106-py3-none-win_amd64.whl", hash = "sha256:b798237e81b9719373e8fae8d4f091b70a0cf09d9d85c95a557e11df2d8e9a5a", size = 195414588 }, ] [[package]] @@ -1986,6 +1995,7 @@ source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/58/8c/69c9e39cd6bfa813852a94e9bd3c075045e2707d163e9dc2326c82d2c330/nvidia_nvjitlink_cu12-12.6.68-py3-none-manylinux2014_aarch64.whl", hash = "sha256:b3fd0779845f68b92063ab1393abab1ed0a23412fc520df79a8190d098b5cd6b", size = 19253287 }, { url = "https://files.pythonhosted.org/packages/a8/48/a9775d377cb95585fb188b469387f58ba6738e268de22eae2ad4cedb2c41/nvidia_nvjitlink_cu12-12.6.68-py3-none-manylinux2014_x86_64.whl", hash = "sha256:125a6c2a44e96386dda634e13d944e60b07a0402d391a070e8fb4104b34ea1ab", size = 19725597 }, + { url = "https://files.pythonhosted.org/packages/00/d5/02af3b39427ed71e8c40b6912271499ec186a72405bcb7e4ca26ff70678c/nvidia_nvjitlink_cu12-12.6.68-py3-none-win_amd64.whl", hash = "sha256:a55744c98d70317c5e23db14866a8cc2b733f7324509e941fc96276f9f37801d", size = 161730369 }, ] [[package]] @@ -1994,6 +2004,7 @@ version = "12.1.105" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/da/d3/8057f0587683ed2fcd4dbfbdfdfa807b9160b809976099d36b8f60d08f03/nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:dc21cf308ca5691e7c04d962e213f8a4aa9bbfa23d95412f452254c2caeb09e5", size = 99138 }, + { url = "https://files.pythonhosted.org/packages/b8/d7/bd7cb2d95ac6ac6e8d05bfa96cdce69619f1ef2808e072919044c2d47a8c/nvidia_nvtx_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:65f4d98982b31b60026e0e6de73fbdfc09d08a96f4656dd3665ca616a11e1e82", size = 66307 }, ] [[package]] @@ -2141,6 +2152,8 @@ docs = [ { name = "myst-nb" }, { name = "myst-parser" }, { name = "optax" }, + { name = "packaging" }, + { name = "setuptools" }, { name = "sphinx" }, { name = "sphinx-book-theme" }, { name = "sphinx-collections" }, @@ -2186,11 +2199,13 @@ requires-dist = [ { name = "optax", marker = "extra == 'notebook'" }, { name = "orbax-checkpoint", marker = "extra == 'notebook'" }, { name = "ordered-set", specifier = ">=4.1.0" }, + { name = "packaging", marker = "extra == 'docs'", specifier = "==24.1" }, { name = "palettable", marker = "extra == 'notebook'" }, { name = "pyink", marker = "extra == 'dev'", specifier = ">=24.3.0" }, { name = "pylint", marker = "extra == 'dev'", specifier = ">=2.6.0" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.2.2" }, { name = "pytype", marker = "extra == 'dev'" }, + { name = "setuptools", marker = "extra == 'docs'" }, { name = "sphinx", marker = "extra == 'docs'", specifier = ">=6.0.0,<7.3.0" }, { name = "sphinx-book-theme", marker = "extra == 'docs'", specifier = ">=1.0.1" }, { name = "sphinx-collections", marker = "extra == 'docs'", specifier = ">=0.0.1" }, @@ -3092,14 +3107,17 @@ wheels = [ [[package]] name = "sphinx-collections" -version = "0.2.0" +version = "0.0.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "gitpython" }, { name = "jinja2" }, { name = "sphinx" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f7/4d/6c94cf98457d43e4fed65a25e1cafc0a5250c8e9ce2838ae31c249912400/sphinx-collections-0.2.0.tar.gz", hash = "sha256:eb266811ca117524919a9f232dd27267a2838d9c0729604f8411ae7eab36f660", size = 12870 } +sdist = { url = "https://files.pythonhosted.org/packages/bf/4e/aec79be7bf48b07081f6218094b512e4ce3f7017ba85a94047c836b6b2fc/sphinx-collections-0.0.1.tar.gz", hash = "sha256:79c3951c77145c5a8290c887a29ad4a211e02a47de9246db6134523c79d82485", size = 10541 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b8/d4/b25947f638d8030fe8460d36d242ffb353cda5079488f364c13e6247de47/sphinx_collections-0.0.1-py3-none-any.whl", hash = "sha256:caf683afc5eed2761845347410c572a96c5d344f8f5cc81105f783bcc6585282", size = 17541 }, +] [[package]] name = "sphinx-contributors"