Skip to content

Commit c884bb9

Browse files
committed
Configuring with plone.meta
1 parent a9da1a7 commit c884bb9

File tree

5 files changed

+43
-30
lines changed

5 files changed

+43
-30
lines changed

.github/workflows/test-matrix.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
# [Python version, visual name, tox env]
2222
- ["3.13", "6.2 on py3.13", "py313-plone62"]
2323
- ["3.10", "6.2 on py3.10", "py310-plone62"]
24-
- ["3.13", "6.1 on py3.13", "py313-plone61"]
25-
- ["3.10", "6.1 on py3.10", "py310-plone61"]
2624

2725
runs-on: ${{ matrix.os[1] }}
2826
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
@@ -36,6 +34,14 @@ jobs:
3634
with:
3735
python-version: ${{ matrix.config[0] }}
3836
allow-prereleases: true
37+
38+
##
39+
# Add extra configuration options in .meta.toml:
40+
# [github]
41+
# extra_lines_after_os_dependencies = """
42+
# _your own configuration lines_
43+
# """
44+
##
3945
- name: Pip cache
4046
uses: actions/cache@v4
4147
with:
@@ -48,5 +54,19 @@ jobs:
4854
run: |
4955
python -m pip install --upgrade pip
5056
pip install tox
57+
- name: Initialize tox
58+
# the bash one-liner below does not work on Windows
59+
if: contains(matrix.os, 'ubuntu')
60+
run: |
61+
if [ `tox list --no-desc -f init|wc -l` = 1 ]; then tox -e init;else true; fi
5162
- name: Test
5263
run: tox -e ${{ matrix.config[2] }}
64+
65+
66+
##
67+
# Add extra configuration options in .meta.toml:
68+
# [github]
69+
# extra_lines = """
70+
# _your own configuration lines_
71+
# """
72+
##

.meta.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# See the inline comments on how to expand/tweak this configuration file
44
[meta]
55
template = "default"
6-
commit-id = "2.0.1.dev0"
6+
commit-id = "2.2.1"
7+
8+
[tox]
9+
test_matrix = {"6.2" = ["*"]}
710

811
[pre_commit]
912
codespell_extra_lines = """

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ ci:
77

88
repos:
99
- repo: https://github.com/asottile/pyupgrade
10-
rev: v3.19.1
10+
rev: v3.21.0
1111
hooks:
1212
- id: pyupgrade
1313
args: [--py38-plus]
1414
- repo: https://github.com/pycqa/isort
15-
rev: 6.0.1
15+
rev: 7.0.0
1616
hooks:
1717
- id: isort
18-
- repo: https://github.com/psf/black
19-
rev: 25.1.0
18+
- repo: https://github.com/psf/black-pre-commit-mirror
19+
rev: 25.9.0
2020
hooks:
2121
- id: black
2222
- repo: https://github.com/collective/zpretty
23-
rev: 3.1.0
23+
rev: 3.1.1
2424
hooks:
2525
- id: zpretty
2626

@@ -32,7 +32,7 @@ repos:
3232
# """
3333
##
3434
- repo: https://github.com/PyCQA/flake8
35-
rev: 7.1.2
35+
rev: 7.3.0
3636
hooks:
3737
- id: flake8
3838

@@ -59,15 +59,15 @@ repos:
5959
# """
6060
##
6161
- repo: https://github.com/mgedmin/check-manifest
62-
rev: "0.50"
62+
rev: "0.51"
6363
hooks:
6464
- id: check-manifest
6565
- repo: https://github.com/regebro/pyroma
66-
rev: "4.2"
66+
rev: "5.0"
6767
hooks:
6868
- id: pyroma
6969
- repo: https://github.com/mgedmin/check-python-versions
70-
rev: "0.22.1"
70+
rev: "0.23.0"
7171
hooks:
7272
- id: check-python-versions
7373
args: ['--only', 'setup.py,pyproject.toml']

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/plone/meta/tree/main/src/plone/meta/default
33
# See the inline comments on how to expand/tweak this configuration file
44
[build-system]
5-
requires = ["setuptools>=68.2,<77", "wheel"]
5+
requires = ["setuptools>=68.2,<80", "wheel"]
66

77
[tool.towncrier]
88
directory = "news/"
@@ -37,7 +37,7 @@ showcontent = true
3737

3838
[[tool.towncrier.type]]
3939
directory = "tests"
40-
name = "Tests"
40+
name = "Tests:"
4141
showcontent = true
4242

4343
##

tox.ini

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,17 @@ envlist =
1111
py312-plone62
1212
py311-plone62
1313
py310-plone62
14-
py313-plone61
15-
py312-plone61
16-
py311-plone61
17-
py310-plone61
18-
py313-plone60
19-
py312-plone60
20-
py311-plone60
21-
py310-plone60
22-
py39-plone60
2314
dependencies
2415

2516

2617
##
2718
# Add extra configuration options in .meta.toml:
2819
# - to specify a custom testing combination of Plone and python versions, use `test_matrix`
20+
# Use ["*"] to use all supported Python versions for this Plone version.
2921
# - to specify extra custom environments, use `envlist_lines`
3022
# - to specify extra `tox` top-level options, use `config_lines`
3123
# [tox]
32-
# test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["3.10", "3.9"]}
24+
# test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["*"]}
3325
# envlist_lines = """
3426
# my_other_environment
3527
# """
@@ -90,9 +82,9 @@ commands =
9082
[test_runner]
9183
deps = zope.testrunner
9284
test =
93-
zope-testrunner --all --test-path={toxinidir} -s plone.app.locales {posargs}
85+
zope-testrunner --all --test-path={toxinidir}/src -s plone.app.locales {posargs}
9486
coverage =
95-
coverage run --branch --source plone.app.locales {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.app.locales {posargs}
87+
coverage run --branch --source plone.app.locales {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir}/src -s plone.app.locales {posargs}
9688
coverage report -m --format markdown
9789
coverage xml
9890
coverage html
@@ -119,8 +111,6 @@ set_env =
119111
deps =
120112
{[test_runner]deps}
121113
plone62: -c https://dist.plone.org/release/6.2-dev/constraints.txt
122-
plone61: -c https://dist.plone.org/release/6.1-dev/constraints.txt
123-
plone60: -c https://dist.plone.org/release/6.0-dev/constraints.txt
124114

125115
##
126116
# Specify additional deps in .meta.toml:
@@ -161,6 +151,7 @@ set_env = {[base]set_env}
161151
deps =
162152
{[test_runner]deps}
163153
-c https://dist.plone.org/release/6.2-dev/constraints.txt
154+
164155
commands = {[test_runner]test}
165156
extras = {[base]extras}
166157

@@ -186,6 +177,7 @@ deps =
186177
{[test_runner]deps}
187178
coverage
188179
-c https://dist.plone.org/release/6.2-dev/constraints.txt
180+
189181
commands = {[test_runner]coverage}
190182
extras = {[base]extras}
191183

@@ -198,7 +190,6 @@ deps =
198190
build
199191
towncrier
200192
-c https://dist.plone.org/release/6.2-dev/constraints.txt
201-
202193
commands =
203194
# fake version to not have to install the package
204195
# we build the change log as news entries might break
@@ -229,7 +220,6 @@ deps =
229220
pipdeptree
230221
pipforester
231222
-c https://dist.plone.org/release/6.2-dev/constraints.txt
232-
233223
commands =
234224
# Generate the full dependency tree
235225
sh -c 'pipdeptree -j > forest.json'

0 commit comments

Comments
 (0)