Skip to content

Commit

Permalink
Specify docs hatch env for v3 branch (zarr-developers#1655)
Browse files Browse the repository at this point in the history
* Revert README changes

* Specify docs hatch env

* Add clean script

* Update for readthedocs

* Use hatch features
  • Loading branch information
maxrjones authored Feb 7, 2024
1 parent 4ab6b3f commit c69ac31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
10 changes: 3 additions & 7 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ build:
os: ubuntu-20.04
tools:
python: "3.10"
commands:
- pip install hatch
- hatch run docs:rtd

sphinx:
configuration: docs/conf.py
fail_on_warning: true

python:
install:
- method: pip
path: .
extra_requirements:
- docs

formats: all
8 changes: 0 additions & 8 deletions README-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ git remote add upstream https://github.com/zarr-developers/zarr-python
git fetch upstream
git checkout --track upstream/v3
```
## Set the environment variables for V3

There are a couple environment variables required for enabling V3:

```
export ZARR_V3_EXPERIMENTAL_API=1
export ZARR_V3_SHARDING=1
```

## Set up your environment

Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jupyter = [
]
docs = [
'sphinx',
'sphinx-autobuild>=2021.3.14',
'sphinx-automodapi',
'sphinx_design',
'sphinx-issues',
Expand Down Expand Up @@ -95,6 +96,14 @@ run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=tests"
run = "run-coverage --no-cov"
run-verbose = "run-coverage --verbose"

[tool.hatch.envs.docs]
features = ['docs']

[tool.hatch.envs.docs.scripts]
build = "sphinx-build docs/ docs/_build/"
rtd = "sphinx-build docs/ _readthedocs/html/"
serve = "sphinx-autobuild docs docs/_build --ignore 'docs/_autoapi/**/*' --host 0.0.0.0"

[tool.ruff]
line-length = 100
exclude = [
Expand Down

0 comments on commit c69ac31

Please sign in to comment.