Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.12 and drop Python 3.8 (2) #260

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions .github/workflows/docs-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
environment: dev_environment
runs-on: ubuntu-latest
steps:
- name: Get Python 3.12
uses: actions/setup-python@v5
- name: Get Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version: "3.10"
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -32,19 +32,12 @@ jobs:
sudo apt-get update;
sudo apt-get install pandoc;
pip install -e .
- name: Build
uses: sphinx-notes/pages@v3
- name: Build and Commit
uses: sphinx-notes/pages@v2
with:
python_version: 3.12
requirements_path: doc/requirements.txt
documentation_path: doc/source
publish: false
- name: Commit
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ steps.deployment.outputs.artifact }}
destination_dir: ${{ env.RELEASE_VERSION }}
target_path: ${{ env.RELEASE_VERSION }}
- name: Redirect stable to new release
run: |
echo "Redirecting stable to newly released version " $RELEASE_VERSION
Expand Down
14 changes: 0 additions & 14 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import platform
import re
from difflib import unified_diff
from pathlib import Path

import nox
Expand Down Expand Up @@ -96,19 +95,6 @@ def check_development_environment(session: Session) -> None:
Update with 'poetry install --sync', using '--with' and '-E' for optional dependencies, extras respectively.
Note: {removals} packages are not in the specification (i.e. installed manually) and may be removed.
To preview changes, run 'poetry install --sync --dry-run' (with optional dependencies and extras).""")

@session # to only run on the current python interpreter
def check_requirements_files(session: Session) -> None:
"""Check whether the requirement files are not outdated."""
doc_requirements_path = Path("doc/requirements.txt")
doc_temp_requirements_path = Path("doc/test_requirements.txt")
if doc_temp_requirements_path.exists():
doc_temp_requirements_path.unlink()
session.run("poetry", "export", "--with", "docs", "--without-hashes", "--format=requirements.txt", "--output", str(doc_temp_requirements_path), external=True)
diff = list(unified_diff(doc_requirements_path.read_text(), doc_temp_requirements_path.read_text()))
if doc_temp_requirements_path.exists():
doc_temp_requirements_path.unlink()
assert len(diff) == 0, f"Documentation requirements file not up to date with poetry.lock, please update it.\nDiff: {diff}"

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