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

3.12 support #8

Merged
merged 2 commits into from
Oct 1, 2023
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
architecture: x64
allow-prereleases: true
- run: pip install nox==2023.4.22 nox-poetry poetry
- run: nox --session mypy-${{matrix.python-version}}

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
architecture: x64
allow-prereleases: true
- run: pip install nox==2023.4.22 nox-poetry poetry
- run: nox --sessions test-${{matrix.python-version}}
4 changes: 1 addition & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ repos:
repo: https://github.com/psf/black
rev: 23.7.0
- hooks:
- additional_dependencies:
- black==23.7.0
id: blacken-docs
- id: blacken-docs
repo: https://github.com/asottile/blacken-docs
rev: 1.16.0

Expand Down
15 changes: 11 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
from nox_poetry import session

nox.options.sessions = ["clean", "test", "report", "mypy"]
nox.options.reuse_existing_virtualenvs = True

python_versions = ["3.7", "3.8", "3.9", "3.10", "3.11"]
python_versions = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]


@session(python="python3.11")
Expand All @@ -18,13 +17,21 @@ def clean(session):

@session(python=python_versions)
def mypy(session):
session.install(".", "mypy", "pytest", "rich")
session.install(".", "mypy", "pytest", "rich", "inline-snapshot")
session.run("mypy", "pysource_codegen", "tests")


@session(python=python_versions)
def test(session):
session.install(".", "pytest", "pytest-xdist", "rich", "coverage-enable-subprocess")
session.install(
".",
"pytest",
"pytest-xdist",
"rich",
"coverage-enable-subprocess",
"inline-snapshot",
)

session.env["COVERAGE_PROCESS_START"] = str(
Path(__file__).parent / "pyproject.toml"
)
Expand Down
144 changes: 143 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pysource-codegen = "pysource_codegen.__main__:run"

[tool.poetry.dependencies]
python = "^3.7"
astunparse = "^1.6.3"
astunparse = { version = "^1.6.3", python ="<3.9"}
typed-ast = "^1.5.5"
typing-extensions = "^4.7.1"

Expand All @@ -21,6 +21,7 @@ pytest-xdist = {extras = ["psutil"], version = "^3.2.1"}
pytest = "^7.2.1"
mypy = "^1.2.0"
coverage-enable-subprocess = "^1.0"
inline-snapshot = "^0.4.0"

[build-system]
requires = ["poetry-core"]
Expand All @@ -31,3 +32,6 @@ source = ["tests","pysource_codegen"]
parallel = true
branch = true
data_file = "$TOP/.coverage"

[tool.coverage.report]
exclude_lines = ["assert False", "raise NotImplemented"]
Loading