Skip to content

Commit d0b38af

Browse files
authored
Configuring for zope-product (#21)
1 parent d7a7ef1 commit d0b38af

File tree

6 files changed

+40
-34
lines changed

6 files changed

+40
-34
lines changed

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
name: linting
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v4
25-
- uses: actions/setup-python@v5
24+
- uses: actions/checkout@v5
25+
- uses: actions/setup-python@v6
2626
with:
2727
python-version: 3.x
2828
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1

.github/workflows/tests.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,34 +35,27 @@ jobs:
3535
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
3636
name: ${{ matrix.config[1] }}
3737
steps:
38-
- uses: actions/checkout@v4
39-
- name: Set up Python
40-
uses: actions/setup-python@v5
38+
- uses: actions/checkout@v5
4139
with:
42-
python-version: ${{ matrix.config[0] }}
43-
allow-prereleases: true
44-
- name: Pip cache
45-
uses: actions/cache@v4
40+
persist-credentials: false
41+
- name: Install uv + caching
42+
uses: astral-sh/setup-uv@v6
4643
with:
47-
path: ~/.cache/pip
48-
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
49-
restore-keys: |
50-
${{ runner.os }}-pip-${{ matrix.config[0] }}-
51-
${{ runner.os }}-pip-
52-
- name: Install dependencies
53-
run: |
54-
python -m pip install --upgrade pip
55-
pip install tox
44+
enable-cache: true
45+
cache-dependency-glob: |
46+
setup.*
47+
tox.ini
48+
python-version: ${{ matrix.matrix.config[0] }}
49+
github-token: ${{ secrets.GITHUB_TOKEN }}
5650
- name: Test
5751
if: ${{ !startsWith(runner.os, 'Mac') }}
58-
run: tox -e ${{ matrix.config[1] }}
52+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
5953
- name: Test (macOS)
6054
if: ${{ startsWith(runner.os, 'Mac') }}
61-
run: tox -e ${{ matrix.config[1] }}-universal2
55+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
6256
- name: Coverage
6357
if: matrix.config[1] == 'coverage'
6458
run: |
65-
pip install coveralls
66-
coveralls --service=github
59+
uvx coveralls --service=github
6760
env:
6861
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.meta.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
33
[meta]
44
template = "zope-product"
5-
commit-id = "55111d56"
5+
commit-id = "b3663390"
66

77
[python]
88
with-pypy = false

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
minimum_pre_commit_version: '3.6'
44
repos:
55
- repo: https://github.com/pycqa/isort
6-
rev: "5.13.2"
6+
rev: "6.0.1"
77
hooks:
88
- id: isort
99
- repo: https://github.com/hhatto/autopep8
@@ -12,7 +12,7 @@ repos:
1212
- id: autopep8
1313
args: [--in-place, --aggressive, --aggressive]
1414
- repo: https://github.com/asottile/pyupgrade
15-
rev: v3.19.1
15+
rev: v3.20.0
1616
hooks:
1717
- id: pyupgrade
1818
args: [--py39-plus]
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: teyit
2323
- repo: https://github.com/PyCQA/flake8
24-
rev: "7.1.1"
24+
rev: "7.3.0"
2525
hooks:
2626
- id: flake8
2727
additional_dependencies:

pyproject.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
44

55
[build-system]
6-
requires = ["setuptools <= 75.6.0"]
6+
requires = [
7+
"setuptools == 78.1.1",
8+
"wheel",
9+
]
710
build-backend = "setuptools.build_meta"
811

912
[tool.coverage.run]
@@ -15,7 +18,16 @@ fail_under = 82
1518
precision = 2
1619
ignore_errors = true
1720
show_missing = true
18-
exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"]
21+
exclude_lines = [
22+
"pragma: no cover",
23+
"pragma: nocover",
24+
"except ImportError:",
25+
"raise NotImplementedError",
26+
"if __name__ == '__main__':",
27+
"self.fail",
28+
"raise AssertionError",
29+
"raise unittest.Skip",
30+
]
1931

2032
[tool.coverage.html]
2133
directory = "parts/htmlcov"

tox.ini

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ envlist =
1515
[testenv]
1616
skip_install = true
1717
deps =
18-
setuptools <= 75.6.0
19-
zc.buildout >= 3.1
20-
wheel > 0.37
18+
setuptools == 78.1.1
19+
zc.buildout
20+
wheel
2121
setenv =
2222
commands_pre =
2323
{envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
@@ -28,16 +28,17 @@ commands =
2828
basepython = python3
2929
deps =
3030
git+https://github.com/pypa/setuptools.git\#egg=setuptools
31-
zc.buildout >= 3.1
32-
wheel > 0.37
31+
zc.buildout
32+
wheel
3333

3434

3535
[testenv:release-check]
3636
description = ensure that the distribution is ready to release
3737
basepython = python3
3838
skip_install = true
3939
deps =
40-
setuptools <= 75.6.0
40+
setuptools == 78.1.1
41+
wheel
4142
twine
4243
build
4344
check-manifest

0 commit comments

Comments
 (0)