diff --git a/.readthedocs.yml b/.readthedocs.yml index 1cccce2b..668b1931 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,16 +1,23 @@ version: 2 submodules: include: all + build: os: ubuntu-24.04 tools: - python: '3.12' + python: "3.12" + commands: + # Install and set up uv + - asdf plugin add uv + - asdf install uv latest + - asdf global uv latest + + # Use uv to synchronize dependencies + - uv pip install --system .[doc] + + # Build documentation using sphinx + - python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html + sphinx: configuration: docs/conf.py fail_on_warning: true -python: - install: - - method: pip - path: . - extra_requirements: - - doc diff --git a/hatch.toml b/hatch.toml new file mode 100644 index 00000000..7d11867b --- /dev/null +++ b/hatch.toml @@ -0,0 +1,11 @@ +[envs.default] +installer = "uv" +features = ["dev"] + +[envs.hatch-test] +features = ["test", "rapids12"] + +[envs.docs] +features = ["doc"] +scripts.build = "sphinx-build -M html docs docs/_build {args}" +scripts.clean = "git clean -fXd docs" diff --git a/pyproject.toml b/pyproject.toml index d33bc1d2..acb60ac9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,15 +101,6 @@ markers = [ "gpu: tests that use a GPU (currently unused, but needs to be specified here as we import anndata.tests.helpers, which uses it)", ] -[tool.hatch.envs.hatch-test] -features = ["test", "rapids12"] - -[tool.hatch.envs.docs] -installer = "uv" -features = ["doc"] -scripts.build = "sphinx-build -M html docs docs/_build {args}" -scripts.clean = "git clean -fXd docs" - [tool.hatch.build] # exclude big files that don’t need to be installed exclude = [