Skip to content

Commit 227bc29

Browse files
grstflying-sheep
andauthored
Use hatch on RTD (#402)
* use hatch on RDT * define python version * Fix output path * fail-on-warning by default * update sphinx version --------- Co-authored-by: Philipp A. <flying-sheep@web.de>
1 parent e3ac318 commit 227bc29

3 files changed

Lines changed: 14 additions & 15 deletions

File tree

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Build the documentation
6262
run: |
6363
cd "$PROJECT_ROOT"
64-
hatch run docs:build -W
64+
hatch run docs:build
6565
6666
test-scripts:
6767
runs-on: ubuntu-latest
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# https://docs.readthedocs.io/en/stable/config-file/v2.html
22
version: 2
33
build:
4-
os: ubuntu-20.04
4+
os: ubuntu-24.04
55
tools:
6-
python: "3.10"
7-
sphinx:
8-
configuration: docs/conf.py
9-
# disable this for more lenient docs builds
10-
fail_on_warning: true
11-
python:
12-
install:
13-
- method: pip
14-
path: .
15-
extra_requirements:
16-
- doc
6+
python: "3.12"
7+
jobs:
8+
create_environment:
9+
- asdf plugin add uv
10+
- asdf install uv latest
11+
- asdf global uv latest
12+
build:
13+
html:
14+
- uvx hatch run docs:build
15+
- mv docs/_build $READTHEDOCS_OUTPUT

{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ optional-dependencies.doc = [
3939
"pandas",
4040
# Until pybtex >0.24.0 releases: https://bitbucket.org/pybtex-devs/pybtex/issues/169/
4141
"setuptools",
42-
"sphinx>=4",
42+
"sphinx>=8.1",
4343
"sphinx-autodoc-typehints",
4444
"sphinx-book-theme>=1",
4545
"sphinx-copybutton",
@@ -68,7 +68,7 @@ features = [ "dev" ]
6868

6969
[tool.hatch.envs.docs]
7070
features = [ "doc" ]
71-
scripts.build = "sphinx-build -M html docs docs/_build {args}"
71+
scripts.build = "sphinx-build -M html docs docs/_build -W {args}"
7272
scripts.open = "python -m webbrowser -t docs/_build/html/index.html"
7373
scripts.clean = "git clean -fdX -- {args:docs}"
7474

0 commit comments

Comments
 (0)