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

test uv for docs #305

Merged
merged 14 commits into from
Dec 10, 2024
Merged
21 changes: 14 additions & 7 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -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 uv and sphinx
flying-sheep marked this conversation as resolved.
Show resolved Hide resolved
- 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
11 changes: 11 additions & 0 deletions hatch.toml
Original file line number Diff line number Diff line change
@@ -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"
9 changes: 0 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

flying-sheep marked this conversation as resolved.
Show resolved Hide resolved
[tool.hatch.build]
# exclude big files that don’t need to be installed
exclude = [
Expand Down
Loading