diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 82cae008f..5d7c4b64a 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -21,6 +21,6 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install -r docs/requirements.txt + pip install --group docs - name: Build the documentation run: make -C docs html diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd5fb80f1..f8f31f7a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,17 +15,15 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Set up Python 3 - uses: actions/setup-python@v6 + - uses: actions/setup-python@v6 with: - python-version: 3 + python-version: "3.14" cache: "pip" - cache-dependency-path: "test-requirements.txt" - name: Install dependencies run: | pip install --upgrade pip - pip install -r test-requirements.txt + pip install --group test - name: Lint implementation run: flake8 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b6c9041cf..5618e1cb1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,13 +4,17 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-26.04 tools: python: "3" + jobs: + install: + - uv sync --group docs sphinx: configuration: docs/conf.py python: install: - - requirements: docs/requirements.txt + - method: uv + command: sync diff --git a/docs/Makefile b/docs/Makefile index ba87fe401..418d93680 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,6 +5,7 @@ # from the environment for the first two. SOURCEDIR = . SOURCES = +ROOTDIR = .. BUILDDIR = _build PYTHON = python3 VENVDIR = ./venv @@ -38,8 +39,8 @@ text: build venv: $(PYTHON) -m venv $(VENVDIR) - $(VENVDIR)/bin/python3 -m pip install -U pip setuptools - $(VENVDIR)/bin/python3 -m pip install -r requirements.txt + $(VENVDIR)/bin/python3 -m pip install -U pip + $(VENVDIR)/bin/python3 -m pip install --group $(ROOTDIR)/pyproject.toml:docs @echo "The venv has been created in the $(VENVDIR) directory" # Catch-all target: route all unknown targets to Sphinx using the new diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 2af32818f..000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Requirements to build the Python documentation - -# Sphinx version is pinned so that new versions that introduce new warnings -# won't suddenly cause build failures. Updating the version is fine as long -# as no warnings are raised by doing so. -sphinx==9.1.0 - -# The theme used by the documentation is stored separately, so we need -# to install that as well. -python-docs-theme diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..5eca7c54e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "typing" +version = "1" # dummy +requires-python = ">= 3.12" # for building the documentation etc. + +[dependency-groups] +test = [ + "flake8", + "flake8-bugbear", + "flake8-pyi", +] +docs = [ + # Sphinx version is pinned so that new versions that introduce new warnings + # won't suddenly cause build failures. Updating the version is fine as long + # as no warnings are raised by doing so. + "sphinx==9.1.0", + + # The theme used by the documentation is stored separately, so we need + # to install that as well. + "python-docs-theme", +] diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 658ae0a52..000000000 --- a/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -flake8 -flake8-bugbear -flake8-pyi