Skip to content

Commit c69ac31

Browse files
authored
Specify docs hatch env for v3 branch (#1655)
* Revert README changes * Specify docs hatch env * Add clean script * Update for readthedocs * Use hatch features
1 parent 4ab6b3f commit c69ac31

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

.readthedocs.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ build:
44
os: ubuntu-20.04
55
tools:
66
python: "3.10"
7+
commands:
8+
- pip install hatch
9+
- hatch run docs:rtd
710

811
sphinx:
912
configuration: docs/conf.py
1013
fail_on_warning: true
1114

12-
python:
13-
install:
14-
- method: pip
15-
path: .
16-
extra_requirements:
17-
- docs
18-
1915
formats: all

README-v3.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ git remote add upstream https://github.com/zarr-developers/zarr-python
1414
git fetch upstream
1515
git checkout --track upstream/v3
1616
```
17-
## Set the environment variables for V3
18-
19-
There are a couple environment variables required for enabling V3:
20-
21-
```
22-
export ZARR_V3_EXPERIMENTAL_API=1
23-
export ZARR_V3_SHARDING=1
24-
```
2517

2618
## Set up your environment
2719

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jupyter = [
4444
]
4545
docs = [
4646
'sphinx',
47+
'sphinx-autobuild>=2021.3.14',
4748
'sphinx-automodapi',
4849
'sphinx_design',
4950
'sphinx-issues',
@@ -95,6 +96,14 @@ run-coverage = "pytest --cov-config=pyproject.toml --cov=pkg --cov=tests"
9596
run = "run-coverage --no-cov"
9697
run-verbose = "run-coverage --verbose"
9798

99+
[tool.hatch.envs.docs]
100+
features = ['docs']
101+
102+
[tool.hatch.envs.docs.scripts]
103+
build = "sphinx-build docs/ docs/_build/"
104+
rtd = "sphinx-build docs/ _readthedocs/html/"
105+
serve = "sphinx-autobuild docs docs/_build --ignore 'docs/_autoapi/**/*' --host 0.0.0.0"
106+
98107
[tool.ruff]
99108
line-length = 100
100109
exclude = [

0 commit comments

Comments
 (0)