Skip to content

Commit

Permalink
Declare 3.13 support (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Sep 7, 2024
1 parent d78bb60 commit 813a9d0
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 56 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/0-new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ body:
validations:
required: true


- type: textarea
attributes:
label: Describe the problem
Expand Down
44 changes: 15 additions & 29 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: check
on:
workflow_dispatch:
push:
branches: "main"
branches: ["main"]
pull_request:
schedule:
- cron: "0 8 * * *"
Expand All @@ -19,51 +19,37 @@ jobs:
fail-fast: false
matrix:
py:
- "pypy3.10"
- "pypy3.9"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "pypy3.10"
- "pypy3.9"
steps:
- name: Install OS dependencies
run: |
for i in 1 2 3; do
echo "try $i" && sudo apt-get update -y && sudo apt-get install graphviz -y && exit 0;
done
exit 1
shell: bash
run: sudo apt-get install graphviz -y
- name: setup python for tox
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install tox
run: python -m pip install tox
run: python -m pip install tox-uv
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup python for test ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
allow-prereleases: true
- name: Pick environment to run
run: |
import codecs; import os; import sys; import platform
impl = platform.python_implementation()
if impl == "PyPy":
env = "TOXENV=pypy3"
else:
env = "TOXENV=py3"
env += "{}\n".format(sys.version_info.minor)
print("Picked:\n{}for {}".format(env, sys.version))
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
file_handler.write(env)
shell: python
run: echo "TOXENV=`echo ${{ matrix.py }} | sed 's/pypy3\./pypy3/g'`" >> $GITHUB_ENV
- name: setup test suite
run: tox -vv --notest
run: tox run -vv --notest --skip-missing-interpreters false
- name: run test suite
run: tox --skip-pkg-install
run: tox run --skip-pkg-install

check:
name: tox env ${{ matrix.tox_env }}
Expand All @@ -82,8 +68,8 @@ jobs:
with:
python-version: "3.12"
- name: install tox
run: python -m pip install tox
- name: run check for ${{ matrix.tox_env }}
run: python -m tox -e ${{ matrix.tox_env }}
env:
UPGRADE_ADVISORY: "yes"
run: python -m pip install tox-uv
- name: Setup test suite
run: tox -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
- name: Run test suite
run: tox --skip-pkg-install -e ${{ matrix.tox_env }}
19 changes: 15 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,38 @@ repos:
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
hooks:
- id: check-github-workflows
args: ["--verbose"]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["--write-changes"]
additional_dependencies: ["tomli>=2.0.1"]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
rev: "1.3.2"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.1"
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.12.1"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.3"
rev: "v0.6.4"
hooks:
- id: ruff-format
- id: ruff
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.3.3"
hooks:
- id: prettier
additional_dependencies:
- [email protected]
- "@prettier/[email protected]"
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.4",
"hatchling>=1.18",
"hatchling>=1.25",
]

[project]
Expand Down Expand Up @@ -40,20 +40,20 @@ dynamic = [
"version",
]
dependencies = [
"packaging>=23.1",
"pip>=23.1.2",
"packaging>=24.1",
"pip>=24.2",
]
optional-dependencies.graphviz = [
"graphviz>=0.20.1",
"graphviz>=0.20.3",
]
optional-dependencies.test = [
"covdefaults>=2.3",
"diff-cover>=8.0.1",
"pytest>=7.4.3",
"diff-cover>=9.1.1",
"pytest>=8.3.2",
"pytest-console-scripts>=1.4.1",
"pytest-cov>=4.1",
"pytest-mock>=3.12",
"virtualenv<21,>=20.25",
"pytest-cov>=5",
"pytest-mock>=3.14",
"virtualenv<21,>=20.26.4",
]
urls.Changelog = "https://github.com/tox-dev/pipdeptree/releases"
urls.Documentation = "https://github.com/tox-dev/pipdeptree/blob/main/README.md#pipdeptree"
Expand Down
26 changes: 13 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[tox]
requires =
tox>=4.2
tox-uv>=1.11.3
env_list =
fix
py312
py311
py310
py39
py38
type
readme
3.13
3.12
3.11
3.10
3.9
3.8
skip_missing_interpreters = true

[testenv]
Expand All @@ -36,16 +38,14 @@ commands =
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
skip_install = true
deps =
pre-commit>=3.5
pre-commit-uv>=4.1
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:type]
description = run type check on code base
deps =
mypy==1.7.1
set_env =
{tty:MYPY_FORCE_COLOR = 1}
mypy==1.11.2
commands =
mypy src
mypy tests
Expand All @@ -54,15 +54,15 @@ commands =
description = check that the long description is valid
skip_install = true
deps =
build[virtualenv]>=1.0.3
twine>=4.0.2
build[uv]>=1.2.2
twine>=5.1.1
commands =
python -m build --sdist --wheel -o {envtmpdir} .
pyproject-build --installer uv --sdist --wheel -o {envtmpdir} .
twine check {envtmpdir}/*

[testenv:dev]
description = generate a DEV environment
package = editable
commands =
python -m pip list --format=columns
uv pip tree
python -c 'import sys; print(sys.executable)'

0 comments on commit 813a9d0

Please sign in to comment.