Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring with plone/meta #51

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
#
# EditorConfig Configuration file, for more details see:
Expand Down Expand Up @@ -29,11 +29,11 @@ max_line_length = off
# 4 space indentation
indent_size = 4

[*.{yml,zpt,pt,dtml,zcml}]
[*.{yml,zpt,pt,dtml,zcml,html,xml}]
# 2 space indentation
indent_size = 2

[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss,html}] # Frontend development
[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}] # Frontend development
# 2 space indentation
indent_size = 2
max_line_length = 80
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
[flake8]
doctests = 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/meta.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
name: Meta
on:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
# python related
*.egg-info
Expand All @@ -12,6 +12,7 @@
# tools related
build/
.coverage
.*project
coverage.xml
dist/
docs/_build
Expand All @@ -34,6 +35,7 @@ lib64
parts/
pyvenv.cfg
var/
local.cfg

# mxdev
/instance/
Expand Down
6 changes: 3 additions & 3 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
[meta]
template = "default"
commit-id = "25d2fa7f"
commit-id = "6e36bcc4"

[pyproject]
codespell_skip = "*.min.js"
codespell_ignores = "vew"
dependencies_ignores = "['plone.volto', 'zestreleaser.towncrier', 'zest.releaser', 'pytest', 'pytest-cov', 'pytest-plone']"
dependencies_ignores = "['plone.volto', 'zestreleaser.towncrier', 'zest.releaser', 'pytest', 'pytest-cov', 'pytest-plone', 'plone.testing', 'plone.app.testing']"
dependencies_mappings = [
"Plone = ['Products.CMFPlone', 'Products.CMFCore', 'Products.GenericSetup']",
]
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
ci:
autofix_prs: false
autoupdate_schedule: monthly

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.12.1
hooks:
- id: black
- repo: https://github.com/collective/zpretty
Expand Down Expand Up @@ -66,7 +66,7 @@ repos:
hooks:
- id: pyroma
- repo: https://github.com/mgedmin/check-python-versions
rev: "0.21.3"
rev: "0.22.0"
hooks:
- id: check-python-versions
args: ['--only', 'setup.py,pyproject.toml']
Expand Down
2 changes: 2 additions & 0 deletions news/6e36bcc4.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update configuration files.
[plone devs]
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
[build-system]
requires = ["setuptools>=68.2"]

[tool.towncrier]
directory = "news/"
filename = "CHANGES.md"
Expand Down Expand Up @@ -118,7 +121,7 @@ Zope = [
'Products.CMFCore', 'Products.CMFDynamicViewFTI',
]
python-dateutil = ['dateutil']
ignore-packages = ['plone.volto', 'zestreleaser.towncrier', 'zest.releaser', 'pytest', 'pytest-cov', 'pytest-plone']
ignore-packages = ['plone.volto', 'zestreleaser.towncrier', 'zest.releaser', 'pytest', 'pytest-cov', 'pytest-plone', 'plone.testing', 'plone.app.testing']
Plone = ['Products.CMFPlone', 'Products.CMFCore', 'Products.GenericSetup']

##
Expand Down
15 changes: 13 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,20 @@
zip_safe=False,
install_requires=[
"Plone",
"Zope",
"setuptools",
"z3c.unconfigure",
"jsonschema",
"collective.exportimport>=1.10",
"jsonschema",
"plone.api",
"plone.app.contentrules",
"plone.base",
"plone.dexterity",
"plone.i18n",
"plone.namedfile",
"plone.protect",
"plone.rest",
"plone.restapi",
"z3c.unconfigure",
],
extras_require={
"test": [
Expand All @@ -60,6 +70,7 @@
"plone.volto",
"plone.app.testing",
"plone.restapi[test]",
"plone.testing",
"pytest",
"pytest-cov",
"pytest-plone>=0.2.0",
Expand Down
22 changes: 15 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
[tox]
# We need 4.4.0 for constrain_package_deps.
Expand Down Expand Up @@ -32,6 +32,14 @@ commands =
echo "Unrecognized environment name {envname}"
false

##
# Add extra configuration options in .meta.toml:
# [tox]
# testenv_options = """
# basepython = /usr/bin/python3.8
# """
##

[testenv:init]
description = Prepare environment
skip_install = true
Expand Down Expand Up @@ -66,9 +74,9 @@ description = check if the package defines all its dependencies
skip_install = true
deps =
build
z3c.dependencychecker==2.11
z3c.dependencychecker==2.14.3
commands =
python -m build --sdist --no-isolation
python -m build --sdist
dependencychecker

[testenv:dependencies-graph]
Expand Down Expand Up @@ -148,7 +156,7 @@ deps =
pytest
coverage
-c constraints-mxdev.txt

commands =
coverage run --source plone.distribution -m pytest {posargs} --disable-warnings {toxinidir}/tests
coverage report -m --format markdown
Expand All @@ -165,13 +173,13 @@ deps =
build
towncrier
-c constraints-mxdev.txt

commands =
# fake version to not have to install the package
# we build the change log as news entries might break
# the README that is displayed on PyPI
towncrier build --version=100.0.0 --yes
python -m build --sdist --no-isolation
python -m build --sdist
twine check dist/*

[testenv:circular]
Expand All @@ -193,7 +201,7 @@ deps =
pipdeptree
pipforester
-c constraints-mxdev.txt

commands =
# Generate the full dependency tree
sh -c 'pipdeptree -j > forest.json'
Expand Down