Skip to content

Commit 311229f

Browse files
authored
Merge pull request #241 from plone/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate [ci-skip]
2 parents ee223be + e0b3126 commit 311229f

10 files changed

+140
-24
lines changed

.editorconfig

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated from:
2-
# https://github.com/plone/meta/tree/master/config/default
2+
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
44
#
55
# EditorConfig Configuration file, for more details see:
@@ -13,7 +13,8 @@
1313
root = true
1414

1515

16-
[*] # For All Files
16+
[*]
17+
# Default settings for all files.
1718
# Unix-style newlines with a newline ending every file
1819
end_of_line = lf
1920
insert_final_newline = true
@@ -29,13 +30,15 @@ max_line_length = off
2930
# 4 space indentation
3031
indent_size = 4
3132

32-
[*.{yml,zpt,pt,dtml,zcml}]
33+
[*.{yml,zpt,pt,dtml,zcml,html,xml}]
3334
# 2 space indentation
3435
indent_size = 2
3536

36-
[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss,html}] # Frontend development
37+
[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}]
38+
# Frontend development
3739
# 2 space indentation
3840
indent_size = 2
41+
max_line_length = 80
3942

4043
[{Makefile,.gitmodules}]
4144
# Tab indentation (no size specified, but view as 4 spaces)

.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated from:
2-
# https://github.com/plone/meta/tree/master/config/default
2+
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
44
[flake8]
55
doctests = 1

.github/workflows/meta.yml

+49-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated from:
2-
# https://github.com/plone/meta/tree/master/config/default
2+
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
44
name: Meta
55
on:
@@ -13,6 +13,16 @@ on:
1313
- main
1414
workflow_dispatch:
1515

16+
##
17+
# To set environment variables for all jobs, add in .meta.toml:
18+
# [github]
19+
# env = """
20+
# debug: 1
21+
# image-name: 'org/image'
22+
# image-tag: 'latest'
23+
# """
24+
##
25+
1626
jobs:
1727
qa:
1828
uses: plone/meta/.github/workflows/qa.yml@main
@@ -22,7 +32,44 @@ jobs:
2232
uses: plone/meta/.github/workflows/coverage.yml@main
2333
dependencies:
2434
uses: plone/meta/.github/workflows/dependencies.yml@main
25-
release-ready:
35+
release_ready:
2636
uses: plone/meta/.github/workflows/release_ready.yml@main
2737
circular:
2838
uses: plone/meta/.github/workflows/circular.yml@main
39+
40+
##
41+
# To modify the list of default jobs being created add in .meta.toml:
42+
# [github]
43+
# jobs = [
44+
# "qa",
45+
# "test",
46+
# "coverage",
47+
# "dependencies",
48+
# "release_ready",
49+
# "circular",
50+
# ]
51+
##
52+
53+
##
54+
# To request that some OS level dependencies get installed
55+
# when running tests/coverage jobs, add in .meta.toml:
56+
# [github]
57+
# os_dependencies = "git libxml2 libxslt"
58+
##
59+
60+
##
61+
# To test against a specific matrix of python versions
62+
# when running tests jobs, add in .meta.toml:
63+
# [github]
64+
# py_versions = "['3.12', '3.11']"
65+
##
66+
67+
68+
##
69+
# Specify additional jobs in .meta.toml:
70+
# [github]
71+
# extra_lines = """
72+
# another:
73+
# uses: org/repo/.github/workflows/file.yml@main
74+
# """
75+
##

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# Generated from:
2-
# https://github.com/plone/meta/tree/master/config/default
2+
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
44
# python related
55
*.egg-info
66
*.pyc
77
*.pyo
88

9+
# translation related
10+
*.mo
11+
912
# tools related
1013
build/
1114
.coverage
15+
.*project
1216
coverage.xml
1317
dist/
1418
docs/_build
@@ -31,6 +35,7 @@ lib64
3135
parts/
3236
pyvenv.cfg
3337
var/
38+
local.cfg
3439

3540
# mxdev
3641
/instance/

.meta.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Generated from:
2-
# https://github.com/plone/meta/tree/master/config/default
2+
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
44
[meta]
55
template = "default"
6-
commit-id = "cfffba8c"
6+
commit-id = "a89af8f2"
77

88
[pyproject]
99
dependencies_ignores = "['Products.LinguaPlone.interfaces.ITranslatable', 'collective.akismet', 'collective.z3cform.norobots', 'plone.formwidget.captcha', 'plone.formwidget.recaptcha', 'plone.formwidget.hcaptcha', 'plone.contentrules', 'plone.app.contentrules', 'plone.stringinterp', 'plone.app.collection']"

.pre-commit-config.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated from:
2-
# https://github.com/plone/meta/tree/master/config/default
2+
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
44
ci:
55
autofix_prs: false
@@ -44,7 +44,7 @@ repos:
4444
# """
4545
##
4646
- repo: https://github.com/codespell-project/codespell
47-
rev: v2.2.6
47+
rev: v2.3.0
4848
hooks:
4949
- id: codespell
5050
additional_dependencies:
@@ -75,6 +75,16 @@ repos:
7575
hooks:
7676
- id: i18ndude
7777

78+
79+
##
80+
# Add extra configuration options in .meta.toml:
81+
# [pre_commit]
82+
# i18ndude_extra_lines = """
83+
# _your own configuration lines_
84+
# """
85+
##
86+
87+
7888
##
7989
# Add extra configuration options in .meta.toml:
8090
# [pre_commit]

dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Generated from:
2+
# https://github.com/plone/meta/tree/main/config/default
3+
# See the inline comments on how to expand/tweak this configuration file
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
# Check for updates to GitHub Actions every week
11+
interval: "weekly"

pyproject.toml

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Generated from:
2-
# https://github.com/plone/meta/tree/master/config/default
2+
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
4+
[build-system]
5+
requires = ["setuptools>=68.2"]
6+
47
[tool.towncrier]
58
directory = "news/"
69
filename = "CHANGES.rst"
@@ -68,7 +71,7 @@ target-version = ["py38"]
6871
##
6972

7073
[tool.codespell]
71-
ignore-words-list = "discreet,"
74+
ignore-words-list = "discreet,assertin,"
7275
skip = "*.po,"
7376
##
7477
# Add extra configuration options in .meta.toml:
@@ -126,26 +129,32 @@ ignore-packages = ['Products.LinguaPlone.interfaces.ITranslatable', 'collective.
126129
# "gitpython = ['git']",
127130
# "pygithub = ['github']",
128131
# ]
129-
# """
130132
##
131133

132134
[tool.check-manifest]
133135
ignore = [
134136
".editorconfig",
137+
".flake8",
135138
".meta.toml",
136139
".pre-commit-config.yaml",
137-
"tox.ini",
138-
".flake8",
140+
"dependabot.yml",
139141
"mx.ini",
142+
"tox.ini",
140143

141144
]
145+
142146
##
143147
# Add extra configuration options in .meta.toml:
144148
# [pyproject]
145149
# check_manifest_ignores = """
146150
# "*.map.js",
147151
# "*.pyc",
148152
# """
153+
# check_manifest_extra_lines = """
154+
# ignore-bad-ideas = [
155+
# "some/test/file/PKG-INFO",
156+
# ]
157+
# """
149158
##
150159

151160

setup.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,22 @@
1010
)
1111

1212
install_requires = [
13-
"BTrees",
1413
"Products.GenericSetup",
1514
"Products.ZCatalog",
1615
"Products.statusmessages",
17-
"persistent",
1816
"plone.api",
1917
"plone.app.event",
2018
"plone.registry",
2119
"plone.resource",
2220
"plone.uuid",
23-
"zope.annotation",
2421
"setuptools",
2522
"plone.app.layout",
2623
"plone.app.registry",
2724
"plone.app.uuid",
2825
"plone.base",
2926
"plone.indexer",
3027
"plone.z3cform",
28+
"Zope",
3129
"z3c.form>=2.3.3",
3230
]
3331

tox.ini

+37-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated from:
2-
# https://github.com/plone/meta/tree/master/config/default
2+
# https://github.com/plone/meta/tree/main/config/default
33
# See the inline comments on how to expand/tweak this configuration file
44
[tox]
55
# We need 4.4.0 for constrain_package_deps.
@@ -32,6 +32,21 @@ commands =
3232
echo "Unrecognized environment name {envname}"
3333
false
3434

35+
##
36+
# Add extra configuration options in .meta.toml:
37+
# [tox]
38+
# testenv_options = """
39+
# basepython = /usr/bin/python3.8
40+
# """
41+
##
42+
43+
[testenv:init]
44+
description = Prepare environment
45+
skip_install = true
46+
commands =
47+
echo "Initial setup complete"
48+
49+
3550
[testenv:format]
3651
description = automatically reformat code
3752
skip_install = true
@@ -56,9 +71,9 @@ description = check if the package defines all its dependencies
5671
skip_install = true
5772
deps =
5873
build
59-
z3c.dependencychecker==2.11
74+
z3c.dependencychecker==2.14.3
6075
commands =
61-
python -m build --sdist --no-isolation
76+
python -m build --sdist
6277
dependencychecker
6378

6479
[testenv:dependencies-graph]
@@ -86,16 +101,26 @@ set_env =
86101
# test_environment_variables = """
87102
# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/
88103
# """
104+
#
105+
# Set constrain_package_deps .meta.toml:
106+
# [tox]
107+
# constrain_package_deps = "false"
89108
##
90109
deps =
91110
zope.testrunner
92111
-c https://dist.plone.org/release/6.0-dev/constraints.txt
112+
93113
##
114+
# Specify additional deps in .meta.toml:
115+
# [tox]
116+
# test_deps_additional = "-esources/plonegovbr.portal_base[test]"
117+
#
94118
# Specify a custom constraints file in .meta.toml:
95119
# [tox]
96120
# constraints_file = "https://my-server.com/constraints.txt"
97121
##
98122
commands =
123+
rfbrowser init
99124
zope-testrunner --all --test-path={toxinidir} -s plone.app.discussion {posargs}
100125
extras =
101126
test
@@ -128,10 +153,13 @@ deps =
128153
coverage
129154
zope.testrunner
130155
-c https://dist.plone.org/release/6.0-dev/constraints.txt
156+
131157
commands =
158+
rfbrowser init
132159
coverage run --branch --source plone.app.discussion {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.app.discussion {posargs}
133160
coverage report -m --format markdown
134161
coverage xml
162+
coverage html
135163
extras =
136164
test
137165

@@ -144,18 +172,22 @@ deps =
144172
build
145173
towncrier
146174
-c https://dist.plone.org/release/6.0-dev/constraints.txt
175+
147176
commands =
148177
# fake version to not have to install the package
149178
# we build the change log as news entries might break
150179
# the README that is displayed on PyPI
151180
towncrier build --version=100.0.0 --yes
152-
python -m build --sdist --no-isolation
181+
python -m build --sdist
153182
twine check dist/*
154183

155184
[testenv:circular]
156185
description = ensure there are no cyclic dependencies
157186
use_develop = true
158187
skip_install = false
188+
# Here we must always constrain the package deps to what is already installed,
189+
# otherwise we simply get the latest from PyPI, which may not work.
190+
constrain_package_deps = true
159191
set_env =
160192

161193
##
@@ -171,6 +203,7 @@ deps =
171203
pipdeptree
172204
pipforester
173205
-c https://dist.plone.org/release/6.0-dev/constraints.txt
206+
174207
commands =
175208
# Generate the full dependency tree
176209
sh -c 'pipdeptree -j > forest.json'

0 commit comments

Comments
 (0)