Declare 3.13 support (#406)
This commit is contained in:
parent
d78bb60040
commit
813a9d0a4c
|
@ -20,7 +20,6 @@ body:
|
|||
validations:
|
||||
required: true
|
||||
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the problem
|
||||
|
|
|
@ -2,7 +2,7 @@ name: check
|
|||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: "main"
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: "0 8 * * *"
|
||||
|
@ -19,27 +19,23 @@ 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
|
||||
|
@ -47,23 +43,13 @@ jobs:
|
|||
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 }}
|
||||
|
@ -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 }}
|
||||
|
|
|
@ -4,13 +4,18 @@ 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"]
|
||||
|
@ -18,13 +23,19 @@ repos:
|
|||
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:
|
||||
- prettier@3.3.3
|
||||
- "@prettier/plugin-xml@3.4.1"
|
||||
- repo: meta
|
||||
hooks:
|
||||
- id: check-hooks-apply
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
build-backend = "hatchling.build"
|
||||
requires = [
|
||||
"hatch-vcs>=0.4",
|
||||
"hatchling>=1.18",
|
||||
"hatchling>=1.25",
|
||||
]
|
||||
|
||||
[project]
|
||||
|
@ -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"
|
||||
|
|
26
tox.ini
26
tox.ini
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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)'
|
||||
|
|
Loading…
Reference in New Issue