Skip to content

Commit

Permalink
Fix RTD build (#89)
Browse files Browse the repository at this point in the history
debug
  • Loading branch information
hynek authored Jan 25, 2025
1 parent 2021042 commit 5c5cae9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
run: uvx nox --sessions mypy_pkg

docs:
name: Build docs & run doctests
name: Run doctests
runs-on: ubuntu-latest
needs: build-package
steps:
Expand All @@ -190,11 +190,11 @@ jobs:
- uses: actions/setup-python@v5
with:
# Keep in sync with .readthedocs.yaml
python-version: "3.12"
python-version: "3.13"
- uses: hynek/setup-cached-uv@v2

- name: Prepare & run Nox
run: uvx nox --session docs
run: uvx nox --session docs -- doctest

install-dev:
name: Verify dev env
Expand Down
21 changes: 11 additions & 10 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ version: 2
build:
os: ubuntu-lts-latest
tools:
# Keep version in sync with ci.yml/docs.
python: "3.12"
# Keep version in sync with tox.ini/docs and ci.yml/docs.
python: "3.13"
jobs:
# Need the tags to calculate the version
post_checkout:
create_environment:
# Need the tags to calculate the version (sometimes).
- git fetch --tags

python:
install:
- method: pip
path: .
extra_requirements:
- docs
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest

build:
html:
- uvx nox -e docs -- html
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def docs(session: nox.Session) -> None:
session.install(".[docs]")
cmds = session.posargs or ["html", "doctest"]

dest = os.environ.get("READTHEDOCS_OUTPUT", "docs/_build/")

for cmd in cmds:
session.run(
"python", "-Im", "sphinx",
Expand All @@ -142,5 +144,5 @@ def docs(session: nox.Session) -> None:
"-D", "language=en",
"-n",
"docs",
"docs/_build/html",
pathlib.Path(dest, "html")
) # fmt: skip
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ line-length = 79
select = ["ALL"]
ignore = [
"A001", # shadowing is fine
"A005", # shadowing typing is fine
"ANN", # Mypy is better at this
"ARG001", # unused arguments are normal when implementing interfaces
"COM", # Formatter takes care of our commas
Expand Down

0 comments on commit 5c5cae9

Please sign in to comment.