diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 57710ae7..b4cb871d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest"] - python-version: ["3.11"] + python-version: ["3.12"] steps: - uses: actions/checkout@v4 @@ -31,7 +31,7 @@ jobs: - name: Install package and documentation dependencies run: | - uv pip install --system '.[develop]' --requirement=docs/requirements.txt + uv pip install --system '.[develop,docs]' - name: Run link checker run: | diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..cd5f7886 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,33 @@ +# .readthedocs.yml +# Read the Docs configuration file + +# Details +# - https://docs.readthedocs.io/en/stable/config-file/v2.html + +# Required +version: 2 + +build: + os: "ubuntu-24.04" + tools: + python: "3.12" + +python: + install: + - method: pip + path: . + extra_requirements: + - docs + +sphinx: + configuration: docs/source/conf.py + + # Use standard HTML builder. + builder: html + + # Fail on all warnings to avoid broken references. + fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF +#formats: +# - pdf diff --git a/DEVELOP.md b/DEVELOP.md index e8e381dd..d99938ad 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -8,7 +8,7 @@ git clone https://github.com/kennethreitz/responder cd responder python3 -m venv .venv source .venv/bin/activate -pip install --editable '.[graphql,develop,release,test]' +pip install --editable '.[graphql,develop,docs,release,test]' ``` Invoke linter and software tests. @@ -20,3 +20,8 @@ Format code. ```shell poe format ``` + +Documentation authoring. +```shell +poe docs-autobuild +``` diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index f38e07b2..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -alabaster<1.1 -jinja2<3.2 -markupsafe<4 -readme-renderer<45 -sphinx>=5,<9 -sphinxcontrib-websupport<2.1 diff --git a/readthedocs.yml b/readthedocs.yml deleted file mode 100644 index d53ffa68..00000000 --- a/readthedocs.yml +++ /dev/null @@ -1,5 +0,0 @@ -build: - image: latest - -python: - version: 3.6 diff --git a/setup.py b/setup.py index d4491c3d..0f885e76 100644 --- a/setup.py +++ b/setup.py @@ -121,6 +121,10 @@ def run(self): "ruff; python_version>='3.7'", "validate-pyproject", ], + "docs": [ + "alabaster<1.1", + "sphinx>=5,<9", + ], "graphql": ["graphene"], "release": ["build", "twine"], "test": ["pytest", "pytest-cov", "pytest-mock", "flask"],