Skip to content

Commit

Permalink
Merge pull request #19 from mcflugen/mcflugen/add-python-3.12
Browse files Browse the repository at this point in the history
Add python 3.12 support
  • Loading branch information
mcflugen committed Nov 21, 2023
2 parents 3d34609 + b8385d1 commit 438f527
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12

- name: Lint
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.12"

- name: Install twine
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"

- name: Install twine
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.11.0
hooks:
- id: black
name: black
Expand All @@ -23,7 +23,7 @@ repos:
additional_dependencies: [".[jupyter]"]

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
Expand Down Expand Up @@ -52,7 +52,7 @@ repos:
args: [--drop-empty-cells]

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py39-plus]
Expand All @@ -64,7 +64,7 @@ repos:
files: \.py$

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-builtin-literals
- id: check-added-large-files
Expand Down Expand Up @@ -94,9 +94,10 @@ repos:
additional_dependencies:
- numpy
- cython~=3.0.0b3
- wheel

- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
rev: 6.3.0
hooks:
- id: pydocstyle
files: landlab/.*\.py$
Expand All @@ -106,7 +107,7 @@ repos:
additional_dependencies: [".[toml]"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
rev: v1.7.0
hooks:
- id: mypy
additional_dependencies: [types-all]
2 changes: 2 additions & 0 deletions news/19.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Added support for Python 3.12 and dropped support for Python 3.9.
5 changes: 3 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

import nox

PYTHON_VERSION = "3.12"
PROJECT = "compaction"
ROOT = pathlib.Path(__file__).parent


@nox.session()
@nox.session(python=PYTHON_VERSION, venv_backend="conda")
def test(session: nox.Session) -> None:
"""Run the tests."""
os.environ["WITH_OPENMP"] = "1"
Expand All @@ -34,7 +35,7 @@ def test(session: nox.Session) -> None:
session.run("coverage", "report", "--ignore-errors", "--show-missing")


@nox.session(name="test-cli")
@nox.session(name="test-cli", python=PYTHON_VERSION, venv_backend="conda")
def test_cli(session: nox.Session) -> None:
"""Test the command line interface."""
session.install(".")
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Cython",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Physics",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"click",
"landlab",
Expand Down Expand Up @@ -108,7 +108,7 @@ line_length = 88
ignore = [".nox", "build"]

[tool.cibuildwheel]
build = "cp39-* cp310-* cp311-*"
build = "cp310-* cp311-* cp312-*"
skip = "*-musllinux_*"
archs = "x86_64,i686,aarch64,arm64,AMD64,x86"

Expand Down

0 comments on commit 438f527

Please sign in to comment.