From 46a3c0191730a09ac97a292791c55fb9c94dcd3d Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 20 Feb 2026 15:15:42 +0100 Subject: [PATCH 1/2] Configuring with plone.meta --- .editorconfig | 29 +++- .flake8 | 2 +- .github/dependabot.yml | 11 ++ .github/workflows/meta.yml | 65 +++++++ .github/workflows/test-matrix.yml | 76 +++++++++ .gitignore | 42 +++-- .meta.toml | 6 + .pre-commit-config.yaml | 94 +++++++++++ news/+meta.internal | 2 + pyproject.toml | 271 ++++++++++++++---------------- tox.ini | 249 +++++++++++++++++++++++++++ 11 files changed, 685 insertions(+), 162 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/meta.yml create mode 100644 .github/workflows/test-matrix.yml create mode 100644 .meta.toml create mode 100644 .pre-commit-config.yaml create mode 100644 news/+meta.internal create mode 100644 tox.ini diff --git a/.editorconfig b/.editorconfig index b3561a7..d054af1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,9 @@ - +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +# # EditorConfig Configuration file, for more details see: -# https://EditorConfig.org +# http://EditorConfig.org # EditorConfig is a convention description, that could be interpreted # by multiple editors to enforce common coding conventions for specific # file types @@ -10,7 +13,8 @@ root = true -[*] # For All Files +[*] +# Default settings for all files. # Unix-style newlines with a newline ending every file end_of_line = lf insert_final_newline = true @@ -19,17 +23,34 @@ trim_trailing_whitespace = true charset = utf-8 # Indent style default indent_style = space +# Max Line Length - a hard line wrap, should be disabled +max_line_length = off [*.{py,cfg,ini}] # 4 space indentation indent_size = 4 -[*.{html,dtml,pt,zpt,xml,zcml,js,json,ts,less,scss,css,sass,yml,yaml}] +[*.{yml,zpt,pt,dtml,zcml,html,xml}] +# 2 space indentation +indent_size = 2 + +[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}] +# Frontend development # 2 space indentation indent_size = 2 +max_line_length = 80 [{Makefile,.gitmodules}] # Tab indentation (no size specified, but view as 4 spaces) indent_style = tab indent_size = unset tab_width = unset + + +## +# Add extra configuration options in .meta.toml: +# [editorconfig] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/.flake8 b/.flake8 index 7ef4f64..3e2d35f 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ # Generated from: -# https://github.com/plone/meta/tree/master/config/default +# https://github.com/plone/meta/tree/main/src/plone/meta/default # See the inline comments on how to expand/tweak this configuration file [flake8] doctests = 1 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e5e4522 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/.github/workflows/meta.yml b/.github/workflows/meta.yml new file mode 100644 index 0000000..f9a346f --- /dev/null +++ b/.github/workflows/meta.yml @@ -0,0 +1,65 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +name: Meta +on: + push: + branches: + - master + - main + pull_request: + branches: + - master + - main + workflow_dispatch: + +## +# To set environment variables for all jobs, add in .meta.toml: +# [github] +# env = """ +# debug: 1 +# image-name: 'org/image' +# image-tag: 'latest' +# """ +## + +jobs: + qa: + uses: plone/meta/.github/workflows/qa.yml@2.x + coverage: + uses: plone/meta/.github/workflows/coverage.yml@2.x + dependencies: + uses: plone/meta/.github/workflows/dependencies.yml@2.x + release_ready: + uses: plone/meta/.github/workflows/release_ready.yml@2.x + circular: + uses: plone/meta/.github/workflows/circular.yml@2.x + +## +# To modify the list of default jobs being created add in .meta.toml: +# [github] +# jobs = [ +# "qa", +# "coverage", +# "dependencies", +# "release_ready", +# "circular", +# ] +## + +## +# To request that some OS level dependencies get installed +# when running tests/coverage jobs, add in .meta.toml: +# [github] +# os_dependencies = "git libxml2 libxslt" +## + + +## +# Specify additional jobs in .meta.toml: +# [github] +# extra_lines = """ +# another: +# uses: org/repo/.github/workflows/file.yml@main +# """ +## diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml new file mode 100644 index 0000000..a7a90f5 --- /dev/null +++ b/.github/workflows/test-matrix.yml @@ -0,0 +1,76 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +name: Tests + +on: + push: + +jobs: + build: + permissions: + contents: read + pull-requests: write + strategy: + # We want to see all failures: + fail-fast: false + matrix: + os: + - ["ubuntu", "ubuntu-latest"] + config: + # [Python version, visual name, tox env] + - ["3.13", "6.2 on py3.13", "py313-plone62"] + - ["3.10", "6.2 on py3.10", "py310-plone62"] + - ["3.13", "6.1 on py3.13", "py313-plone61"] + - ["3.10", "6.1 on py3.10", "py310-plone61"] + - ["3.13", "6.0 on py3.13", "py313-plone60"] + - ["3.10", "6.0 on py3.10", "py310-plone60"] + + runs-on: ${{ matrix.os[1] }} + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + name: ${{ matrix.config[1] }} + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.config[0] }} + allow-prereleases: true + +## +# Add extra configuration options in .meta.toml: +# [github] +# extra_lines_after_os_dependencies = """ +# _your own configuration lines_ +# """ +## + - name: Pip cache + uses: actions/cache@v5 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} + restore-keys: | + ${{ runner.os }}-pip-${{ matrix.config[0] }}- + ${{ runner.os }}-pip- + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + - name: Initialize tox + # the bash one-liner below does not work on Windows + if: contains(matrix.os, 'ubuntu') + run: | + if [ `tox list --no-desc -f init|wc -l` = 1 ]; then tox -e init;else true; fi + - name: Test + run: tox -e ${{ matrix.config[2] }} + + +## +# Add extra configuration options in .meta.toml: +# [github] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/.gitignore b/.gitignore index b7add0d..a602abe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,46 +1,58 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file # python related *.egg-info *.pyc *.pyo +# translation related +*.mo + # tools related -__pycache__/ +build/ .coverage -.mypy_cache -.pytest_cache -.ruff_cache -/build/ +.*project coverage.xml dist/ docs/_build +__pycache__/ +.tox +.vscode/ node_modules/ +forest.dot +forest.json # venv / buildout related -.eggs/ -.installed.cfg -.mr.developer.cfg -.venv/ bin/ develop-eggs/ eggs/ +.eggs/ etc/ +.installed.cfg include/ lib/ lib64 +.mr.developer.cfg parts/ pyvenv.cfg var/ +local.cfg # mxdev -.installed.txt -.lock +/instance/ /.make-sentinels/ /*-mxdev.txt -/instance/ /reports/ /sources/ /venv/ -constraints*.txt -requirements*.txt -.mxdev_cache +.installed.txt + +## +# Add extra configuration options in .meta.toml: +# [gitignore] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/.meta.toml b/.meta.toml new file mode 100644 index 0000000..372147d --- /dev/null +++ b/.meta.toml @@ -0,0 +1,6 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +[meta] +template = "default" +commit-id = "2.3.2" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..26c3c6f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,94 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/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.21.2 + hooks: + - id: pyupgrade + args: [--py38-plus] +- repo: https://github.com/pycqa/isort + rev: 7.0.0 + hooks: + - id: isort +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.12.0 + hooks: + - id: black +- repo: https://github.com/collective/zpretty + rev: 3.1.1 + hooks: + - id: zpretty + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# zpretty_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/PyCQA/flake8 + rev: 7.3.0 + hooks: + - id: flake8 + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# flake8_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell + additional_dependencies: + - tomli + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# codespell_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/mgedmin/check-manifest + rev: "0.51" + hooks: + - id: check-manifest +- repo: https://github.com/regebro/pyroma + rev: "5.0.1" + hooks: + - id: pyroma +- repo: https://github.com/mgedmin/check-python-versions + rev: "0.24.0" + hooks: + - id: check-python-versions + args: ['--only', 'setup.py,pyproject.toml'] +- repo: https://github.com/collective/i18ndude + rev: "6.3.0" + hooks: + - id: i18ndude + + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# i18ndude_extra_lines = """ +# _your own configuration lines_ +# """ +## + + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/news/+meta.internal b/news/+meta.internal new file mode 100644 index 0000000..c08f539 --- /dev/null +++ b/news/+meta.internal @@ -0,0 +1,2 @@ +Update configuration files. +[plone devs] diff --git a/pyproject.toml b/pyproject.toml index c602e26..c20adb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,87 +1,14 @@ -[project] -name = "cs_dynamicpages" -dynamic = ["version"] -description = "A new addon for Plone" -readme = "README.md" -requires-python = ">=3.10,<3.14" -authors = [{ name = "CodeSyntax", email = "plone@codesyntax.com" }] -keywords = ["CMS", "Plone", "Python"] -classifiers = [ - "Development Status :: 3 - Alpha", - "Environment :: Web Environment", - "Framework :: Plone", - "Framework :: Plone :: 6.0", - "Framework :: Plone :: 6.1", - "Framework :: Plone :: Addon", - "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", -] -dependencies = [ - "Products.CMFPlone", - "plone.api", - "collective.z3cform.datagridfield", - "plone.app.upgrade", -] - -[project.optional-dependencies] -test = [ - "horse-with-no-namespace", - "plone.app.testing", - "plone.app.contenttypes[test]", - "plone.classicui", - "plone.restapi[test]", - "pytest", - "pytest-cov", - "pytest-plone>=0.5.0", -] -release = [ - "zest.releaser[recommended]", - "zestreleaser.towncrier", - "zest.pocompile", -] - -[project.urls] -Homepage = "https://github.com/codesyntax/cs_dynamicpages" -PyPI = "https://pypi.org/project/cs_dynamicpages" -Source = "https://github.com/codesyntax/cs_dynamicpages" -Tracker = "https://github.com/codesyntax/cs_dynamicpages/issues" - - -[project.entry-points."plone.autoinclude.plugin"] -target = "plone" - -[tool.uv] -managed = false - -[tool.hatch.version] -path = "src/cs_dynamicpages/__init__.py" - +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.hatch.build] -strict-naming = true - -[tool.hatch.build.targets.sdist] -exclude = ["/.github"] - -[tool.hatch.build.targets.wheel] -packages = ["src/cs_dynamicpages"] +requires = ["setuptools>=68.2,<80", "wheel"] [tool.towncrier] directory = "news/" -filename = "CHANGELOG.md" -start_string = "\n" -title_format = "## {version} ({project_date})" -template = "news/.changelog_template.jinja" -issue_format = "[#{issue}](https://github.com/codesyntax/cs_dynamicpages/issues/{issue})" -underlines = ["", "", ""] +filename = "CHANGES.rst" +title_format = "{version} ({project_date})" +underlines = ["-", ""] [[tool.towncrier.type]] directory = "breaking" @@ -110,71 +37,131 @@ showcontent = true [[tool.towncrier.type]] directory = "tests" -name = "Tests" +name = "Tests:" showcontent = true -[tool.ruff] -target-version = "py310" -line-length = 88 -fix = true -lint.select = [ - # flake8-2020 - "YTT", - # flake8-bandit - "S", - # flake8-bugbear - "B", - # flake8-builtins - "A", - # flake8-comprehensions - "C4", - # flake8-debugger - "T10", - # flake8-simplify - "SIM", - # mccabe - "C90", - # pycodestyle - "E", - "W", - # pyflakes - "F", - # pygrep-hooks - "PGH", - # pyupgrade - "UP", - # ruff - "RUF", +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# towncrier_extra_lines = """ +# extra_configuration +# """ +## + +[tool.isort] +profile = "plone" + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# isort_extra_lines = """ +# extra_configuration +# """ +## + +[tool.black] +target-version = ["py38"] + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# black_extra_lines = """ +# extra_configuration +# """ +## + +[tool.codespell] +ignore-words-list = "discreet,assertin,thet," +skip = "*.po," +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# codespell_ignores = "foo,bar" +# codespell_skip = "*.po,*.map,package-lock.json" +## + +[tool.dependencychecker] +Zope = [ + # Zope own provided namespaces + 'App', 'OFS', 'Products.Five', 'Products.OFSP', 'Products.PageTemplates', + 'Products.SiteAccess', 'Shared', 'Testing', 'ZPublisher', 'ZTUtils', + 'Zope2', 'webdav', 'zmi', + # ExtensionClass own provided namespaces + 'ExtensionClass', 'ComputedAttribute', 'MethodObject', + # Zope dependencies + 'AccessControl', 'Acquisition', 'AuthEncoding', 'beautifulsoup4', 'BTrees', + 'cffi', 'Chameleon', 'DateTime', 'DocumentTemplate', + 'MultiMapping', 'multipart', 'PasteDeploy', 'Persistence', 'persistent', + 'pycparser', 'python-gettext', 'pytz', 'RestrictedPython', 'roman', + 'soupsieve', 'transaction', 'waitress', 'WebOb', 'WebTest', 'WSGIProxy2', + 'z3c.pt', 'zc.lockfile', 'ZConfig', 'zExceptions', 'ZODB', 'zodbpickle', + 'zope.annotation', 'zope.browser', 'zope.browsermenu', 'zope.browserpage', + 'zope.browserresource', 'zope.cachedescriptors', 'zope.component', + 'zope.configuration', 'zope.container', 'zope.contentprovider', + 'zope.contenttype', 'zope.datetime', 'zope.deferredimport', + 'zope.deprecation', 'zope.dottedname', 'zope.event', 'zope.exceptions', + 'zope.filerepresentation', 'zope.globalrequest', 'zope.hookable', + 'zope.i18n', 'zope.i18nmessageid', 'zope.interface', 'zope.lifecycleevent', + 'zope.location', 'zope.pagetemplate', 'zope.processlifetime', 'zope.proxy', + 'zope.ptresource', 'zope.publisher', 'zope.schema', 'zope.security', + 'zope.sequencesort', 'zope.site', 'zope.size', 'zope.structuredtext', + 'zope.tal', 'zope.tales', 'zope.testbrowser', 'zope.testing', + 'zope.traversing', 'zope.viewlet' ] -lint.ignore = [ - # DoNotAssignLambda - "E731", +'Products.CMFCore' = [ + 'docutils', 'five.localsitemanager', 'Missing', 'Products.BTreeFolder2', + 'Products.GenericSetup', 'Products.MailHost', 'Products.PythonScripts', + 'Products.StandardCacheManagers', 'Products.ZCatalog', 'Record', + 'zope.sendmail', 'Zope' ] +'plone.base' = [ + 'plone.batching', 'plone.registry', 'plone.schema','plone.z3cform', + 'Products.CMFCore', 'Products.CMFDynamicViewFTI', +] +python-dateutil = ['dateutil'] +pytest-plone = ['pytest', 'zope.pytestlayer', 'plone.testing', 'plone.app.testing'] + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# dependencies_ignores = "['zestreleaser.towncrier']" +# dependencies_mappings = [ +# "gitpython = ['git']", +# "pygithub = ['github']", +# ] +## + +[tool.check-manifest] +ignore = [ + ".editorconfig", + ".flake8", + ".meta.toml", + ".pre-commit-config.yaml", + "dependabot.yml", + "mx.ini", + "tox.ini", -[tool.ruff.lint.isort] -case-sensitive = false -no-sections = true -force-single-line = true -from-first = true -lines-after-imports = 2 -lines-between-types = 1 -order-by-type = false - -[tool.ruff.format] -preview = true - -[tool.ruff.lint.per-file-ignores] -"tests/*" = ["E501", "RUF001", "S101"] - -[tool.pytest.ini_options] -testpaths = ["tests"] - -[tool.coverage.run] -source_pkgs = ["cs_dynamicpages", "tests"] -branch = true -parallel = true -omit = ["src/cs_dynamicpages/locales/*.py"] - +] -[tool.zest-releaser] -python-file-with-version = "src/cs_dynamicpages/__init__.py" +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# check_manifest_ignores = """ +# "*.map.js", +# "*.pyc", +# """ +# check_manifest_extra_lines = """ +# ignore-bad-ideas = [ +# "some/test/file/PKG-INFO", +# ] +# """ +## + + +## +# Add extra configuration options in .meta.toml: +# [pyproject] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..d0ff239 --- /dev/null +++ b/tox.ini @@ -0,0 +1,249 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/src/plone/meta/default +# See the inline comments on how to expand/tweak this configuration file +[tox] +# We need 4.4.0 for constrain_package_deps. +min_version = 4.4.0 +envlist = + lint + test + py313-plone62 + py312-plone62 + py311-plone62 + py310-plone62 + py313-plone61 + py312-plone61 + py311-plone61 + py310-plone61 + py313-plone60 + py312-plone60 + py311-plone60 + py310-plone60 + dependencies + + +## +# Add extra configuration options in .meta.toml: +# - to specify a custom testing combination of Plone and python versions, use `test_matrix` +# Use ["*"] to use all supported Python versions for this Plone version. +# - to specify extra custom environments, use `envlist_lines` +# - to specify extra `tox` top-level options, use `config_lines` +# [tox] +# test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["*"]} +# envlist_lines = """ +# my_other_environment +# """ +# config_lines = """ +# my_extra_top_level_tox_configuration_lines +# """ +## + +[testenv:init] +description = Prepare environment +skip_install = true +allowlist_externals = + echo +commands = + echo "Initial setup complete" + +[testenv:format] +description = automatically reformat code +skip_install = true +deps = + pre-commit +commands = + pre-commit run -a pyupgrade + pre-commit run -a isort + pre-commit run -a black + pre-commit run -a zpretty + +[testenv:lint] +description = run linters that will help improve the code style +skip_install = true +deps = + pre-commit +commands = + pre-commit run -a + +[testenv:dependencies] +description = check if the package defines all its dependencies +skip_install = true +deps = + build + setuptools<82.0.0 + z3c.dependencychecker==2.14.3 +commands = + python -m build --sdist + dependencychecker + +[testenv:dependencies-graph] +description = generate a graph out of the dependencies of the package +skip_install = false +allowlist_externals = + sh +deps = + pipdeptree==2.5.1 + graphviz # optional dependency of pipdeptree +commands = + sh -c 'pipdeptree --exclude setuptools,wheel,pipdeptree,zope.interface,zope.component --graph-output svg > dependencies.svg' + + +[test_runner] +deps = zope.testrunner +test = + zope-testrunner --all --test-path={toxinidir}/tests -s cs_dynamicpages {posargs} +coverage = + coverage run --branch --source cs_dynamicpages {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir}/tests -s cs_dynamicpages {posargs} + coverage report -m --format markdown + coverage xml + coverage html + +[base] +description = shared configuration for tests and coverage +use_develop = true +skip_install = false +constrain_package_deps = true +set_env = + ROBOT_BROWSER=headlesschrome + +## +# Specify extra test environment variables in .meta.toml: +# [tox] +# test_environment_variables = """ +# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/ +# """ +# +# Set constrain_package_deps .meta.toml: +# [tox] +# constrain_package_deps = false +## +deps = + {[test_runner]deps} + plone62: -c https://dist.plone.org/release/6.2-dev/constraints.txt + plone61: -c https://dist.plone.org/release/6.1-dev/constraints.txt + plone60: -c https://dist.plone.org/release/6.0-dev/constraints.txt + +## +# Specify additional deps in .meta.toml: +# [tox] +# test_deps_additional = """ +# -esources/plonegovbr.portal_base[test] +# """ +# +# Specify a custom constraints file in .meta.toml: +# [tox] +# constraints_file = "https://my-server.com/constraints.txt" +## +extras = + test + + +## +# Add extra configuration options in .meta.toml: +# [tox] +# test_extras = """ +# tests +# widgets +# """ +# +# Add extra configuration options in .meta.toml: +# [tox] +# testenv_options = """ +# basepython = /usr/bin/python3.8 +# """ +## + +[testenv:test] +description = run the distribution tests +use_develop = {[base]use_develop} +skip_install = {[base]skip_install} +constrain_package_deps = {[base]constrain_package_deps} +set_env = {[base]set_env} +deps = + {[test_runner]deps} + -c https://dist.plone.org/release/6.2-dev/constraints.txt + +commands = {[test_runner]test} +extras = {[base]extras} + + +[testenv] +description = run the distribution tests (generative environments) +use_develop = {[base]use_develop} +skip_install = {[base]skip_install} +constrain_package_deps = {[base]constrain_package_deps} +set_env = {[base]set_env} +deps = {[base]deps} +commands = {[test_runner]test} +extras = {[base]extras} + + +[testenv:coverage] +description = get a test coverage report +use_develop = {[base]use_develop} +skip_install = {[base]skip_install} +constrain_package_deps = {[base]constrain_package_deps} +set_env = {[base]set_env} +deps = + {[test_runner]deps} + coverage + -c https://dist.plone.org/release/6.2-dev/constraints.txt + +commands = {[test_runner]coverage} +extras = {[base]extras} + + +[testenv:release-check] +description = ensure that the distribution is ready to release +skip_install = true +deps = + twine + build + towncrier + -c https://dist.plone.org/release/6.2-dev/constraints.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 + twine check dist/* + +[testenv:circular] +description = ensure there are no cyclic dependencies +use_develop = true +skip_install = false +# Here we must always constrain the package deps to what is already installed, +# otherwise we simply get the latest from PyPI, which may not work. +constrain_package_deps = true +set_env = + +## +# Specify extra test environment variables in .meta.toml: +# [tox] +# test_environment_variables = """ +# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/ +# """ +## +allowlist_externals = + sh +deps = + pipdeptree + pipforester + -c https://dist.plone.org/release/6.2-dev/constraints.txt +commands = + # Generate the full dependency tree + sh -c 'pipdeptree -j > forest.json' + # Generate a DOT graph with the circular dependencies, if any + pipforester -i forest.json -o forest.dot --cycles + # Report if there are any circular dependencies, i.e. error if there are any + pipforester -i forest.json --check-cycles -o /dev/null + + +## +# Add extra configuration options in .meta.toml: +# [tox] +# extra_lines = """ +# _your own configuration lines_ +# """ +## From 5a79e46c088fe4744a0c69c8808c4e5958ad46c6 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 20 Feb 2026 15:19:02 +0100 Subject: [PATCH 2/2] add missing i18n --- src/cs_dynamicpages/views/dynamic_view.pt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cs_dynamicpages/views/dynamic_view.pt b/src/cs_dynamicpages/views/dynamic_view.pt index 3f2790c..52d7b96 100644 --- a/src/cs_dynamicpages/views/dynamic_view.pt +++ b/src/cs_dynamicpages/views/dynamic_view.pt @@ -56,6 +56,7 @@ >