Skip to content

Commit

Permalink
test uv for docs (#305)
Browse files Browse the repository at this point in the history
* test uv

* test different install

* add system

* test python3.11

* update install

* undo toml

* test hatch env

* test without frozen

* last test

* add system

* update command

* adjust comment

---------

Co-authored-by: Philipp A. <[email protected]>
  • Loading branch information
Intron7 and flying-sheep authored Dec 10, 2024
1 parent 8d949ca commit 247e871
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
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 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
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"

[tool.hatch.build]
# exclude big files that don’t need to be installed
exclude = [
Expand Down

0 comments on commit 247e871

Please sign in to comment.