-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add python 3.11 support (#392)
* feat: add python 3.11 support - adds testing for python 3.11 - moves from black and flake8 to ruff for linting - Updates coverage output from tests * fix: fix dev dependency group * fix: add installing dev dependencies * ci: add toml * ci: simplify coverage * ci: update coverage
- Loading branch information
1 parent
6ae5ece
commit a752c42
Showing
15 changed files
with
199 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ nox-poetry==1.0.2 | |
poetry==1.3.2 | ||
virtualenv==20.19.0 | ||
poetry-dynamic-versioning==0.21.3 | ||
toml==0.10.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,14 @@ jobs: | |
# - { python: "3.9", os: "ubuntu-latest", session: "mypy" } | ||
# - { python: "3.8", os: "ubuntu-latest", session: "mypy" } | ||
# - { python: "3.7", os: "ubuntu-latest", session: "mypy" } | ||
- { python: "3.11", os: "ubuntu-latest", session: "tests" } | ||
- { python: "3.10", os: "ubuntu-latest", session: "tests" } | ||
- { python: "3.9", os: "ubuntu-latest", session: "tests" } | ||
- { python: "3.8", os: "ubuntu-latest", session: "tests" } | ||
- { python: "3.7", os: "ubuntu-latest", session: "tests" } | ||
# poetry fails to install on windows | ||
# - { python: "3.10", os: "windows-latest", session: "tests" } | ||
# - { python: "3.10", os: "macos-latest", session: "tests" } | ||
# - { python: "3.10", os: "ubuntu-latest", session: "typeguard" } | ||
- { python: "3.11", os: "macos-latest", session: "tests" } | ||
- { python: "3.10", os: "ubuntu-latest", session: "xdoctest" } | ||
- { python: "3.10", os: "ubuntu-latest", session: "docs-build" } | ||
|
||
|
@@ -63,7 +64,7 @@ jobs: | |
- name: Install Nox | ||
run: | | ||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox | ||
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry | ||
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry toml | ||
nox --version | ||
- name: Compute pre-commit cache key | ||
|
@@ -73,13 +74,15 @@ jobs: | |
run: | | ||
import hashlib | ||
import sys | ||
import os | ||
python = "py{}.{}".format(*sys.version_info[:2]) | ||
payload = sys.version.encode() + sys.executable.encode() | ||
digest = hashlib.sha256(payload).hexdigest() | ||
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8]) | ||
print("::set-output name=result::{}".format(result)) | ||
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: | ||
fh.write(f"result={result}\n") | ||
- name: Restore pre-commit cache | ||
uses: actions/[email protected] | ||
|
@@ -112,34 +115,13 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: tests | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Upgrade pip | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt pip | ||
pip --version | ||
- name: Install Poetry | ||
run: | | ||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry | ||
poetry --version | ||
- name: Install Nox | ||
run: | | ||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox | ||
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry | ||
nox --version | ||
- name: Download coverage data | ||
uses: actions/[email protected] | ||
with: | ||
name: coverage-data | ||
|
||
- name: Upload coverage report | ||
uses: codecov/[email protected] | ||
with: | ||
files: .coverage.xml | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
exclude_dirs: ["test", "examples"] | ||
assert_used: | ||
skips: ["*/test_*.py", "noxfile.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.