Skip to content

Commit e58eb6d

Browse files
authored
Support Python 3.12 and drop Python 3.8 (2) (#260)
* Removed troublesome check for up-to-date documentation requirements file * Restored old documentation workflow
1 parent 7208227 commit e58eb6d

File tree

2 files changed

+6
-27
lines changed

2 files changed

+6
-27
lines changed

.github/workflows/docs-on-release.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
environment: dev_environment
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Get Python 3.12
16-
uses: actions/setup-python@v5
15+
- name: Get Python 3.10
16+
uses: actions/setup-python@v4
1717
with:
18-
python-version: "3.12"
18+
python-version: "3.10"
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121
with:
@@ -32,19 +32,12 @@ jobs:
3232
sudo apt-get update;
3333
sudo apt-get install pandoc;
3434
pip install -e .
35-
- name: Build
36-
uses: sphinx-notes/pages@v3
35+
- name: Build and Commit
36+
uses: sphinx-notes/pages@v2
3737
with:
38-
python_version: 3.12
3938
requirements_path: doc/requirements.txt
4039
documentation_path: doc/source
41-
publish: false
42-
- name: Commit
43-
uses: peaceiris/actions-gh-pages@v4
44-
with:
45-
github_token: ${{ secrets.GITHUB_TOKEN }}
46-
publish_dir: ${{ steps.deployment.outputs.artifact }}
47-
destination_dir: ${{ env.RELEASE_VERSION }}
40+
target_path: ${{ env.RELEASE_VERSION }}
4841
- name: Redirect stable to new release
4942
run: |
5043
echo "Redirecting stable to newly released version " $RELEASE_VERSION

noxfile.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import platform
1010
import re
11-
from difflib import unified_diff
1211
from pathlib import Path
1312

1413
import nox
@@ -96,19 +95,6 @@ def check_development_environment(session: Session) -> None:
9695
Update with 'poetry install --sync', using '--with' and '-E' for optional dependencies, extras respectively.
9796
Note: {removals} packages are not in the specification (i.e. installed manually) and may be removed.
9897
To preview changes, run 'poetry install --sync --dry-run' (with optional dependencies and extras).""")
99-
100-
@session # to only run on the current python interpreter
101-
def check_requirements_files(session: Session) -> None:
102-
"""Check whether the requirement files are not outdated."""
103-
doc_requirements_path = Path("doc/requirements.txt")
104-
doc_temp_requirements_path = Path("doc/test_requirements.txt")
105-
if doc_temp_requirements_path.exists():
106-
doc_temp_requirements_path.unlink()
107-
session.run("poetry", "export", "--with", "docs", "--without-hashes", "--format=requirements.txt", "--output", str(doc_temp_requirements_path), external=True)
108-
diff = list(unified_diff(doc_requirements_path.read_text(), doc_temp_requirements_path.read_text()))
109-
if doc_temp_requirements_path.exists():
110-
doc_temp_requirements_path.unlink()
111-
assert len(diff) == 0, f"Documentation requirements file not up to date with poetry.lock, please update it.\nDiff: {diff}"
11298

11399
@session(python=python_versions_to_test) # missing versions can be installed with `pyenv install ...`
114100
# do not forget check / set the versions with `pyenv global`, or `pyenv local` in case of virtual environment

0 commit comments

Comments
 (0)