From 6914bb3bd3a699f66b8e2df63a508fc4ceefb1b5 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Thu, 13 Nov 2025 16:48:46 +0100 Subject: [PATCH 01/15] Configuring with plone.meta --- .editorconfig | 56 +++++++ .flake8 | 22 +++ .github/dependabot.yml | 11 ++ .github/workflows/meta.yml | 65 ++++++++ .github/workflows/test-matrix.yml | 76 +++++++++ .gitignore | 70 +++++++-- .meta.toml | 6 + .pre-commit-config.yaml | 94 ++++++++++++ pyproject.toml | 131 ++++++++++++++++ tox.ini | 246 ++++++++++++++++++++++++++++++ 10 files changed, 761 insertions(+), 16 deletions(-) create mode 100644 .editorconfig create mode 100644 .flake8 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 pyproject.toml create mode 100644 tox.ini diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d054af1 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,56 @@ +# 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: +# http://EditorConfig.org +# EditorConfig is a convention description, that could be interpreted +# by multiple editors to enforce common coding conventions for specific +# file types + +# top-most EditorConfig file: +# Will ignore other EditorConfig files in Home directory or upper tree level. +root = true + + +[*] +# Default settings for all files. +# Unix-style newlines with a newline ending every file +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +# Set default charset +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 + +[*.{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 new file mode 100644 index 0000000..3e2d35f --- /dev/null +++ b/.flake8 @@ -0,0 +1,22 @@ +# 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 +[flake8] +doctests = 1 +ignore = + # black takes care of line length + E501, + # black takes care of where to break lines + W503, + # black takes care of spaces within slicing (list[:]) + E203, + # black takes care of spaces after commas + E231, + +## +# Add extra configuration options in .meta.toml: +# [flake8] +# extra_lines = """ +# _your own configuration lines_ +# """ +## 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..c77efdc --- /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.9", "6.0 on py3.9", "py39-plone60"] + - ["3.13", "6.0 on py3.13", "py313-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@v5 + 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@v4 + 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 e37ee52..a602abe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,58 @@ -.Python -.installed.cfg -bin -develop-eggs -include -lib -parts -var -*.egg +# 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 -output.xml -report.html -log.html -/src/collective.workspace.egg-info *.pyc -/share +*.pyo + +# translation related *.mo -.mr.developer.cfg + +# tools related +build/ +.coverage +.*project +coverage.xml +dist/ +docs/_build +__pycache__/ +.tox .vscode/ -pyvenv.cfg \ No newline at end of file +node_modules/ +forest.dot +forest.json + +# venv / buildout related +bin/ +develop-eggs/ +eggs/ +.eggs/ +etc/ +.installed.cfg +include/ +lib/ +lib64 +.mr.developer.cfg +parts/ +pyvenv.cfg +var/ +local.cfg + +# mxdev +/instance/ +/.make-sentinels/ +/*-mxdev.txt +/reports/ +/sources/ +/venv/ +.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..3c47b09 --- /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.2.3.dev0" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0b63ae5 --- /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.0 + 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.9.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" + hooks: + - id: pyroma +- repo: https://github.com/mgedmin/check-python-versions + rev: "0.23.0" + hooks: + - id: check-python-versions + args: ['--only', 'setup.py,pyproject.toml'] +- repo: https://github.com/collective/i18ndude + rev: "6.2.1" + 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/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1816845 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,131 @@ +# 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 = ["setuptools>=68.2,<80", "wheel"] + +## +# 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' +] +'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", + +] + +## +# 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..86f0a17 --- /dev/null +++ b/tox.ini @@ -0,0 +1,246 @@ +# 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 + py39-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 + 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 = + rfbrowser init + zope-testrunner --all --test-path={toxinidir}/src -s collective.workspace {posargs} +coverage = + rfbrowser init + coverage run --branch --source collective.workspace {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir}/src -s collective.workspace {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 + -c https://dist.plone.org/release/6.2-dev/constraints.txt +commands = + 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 70147e091fc74ee2fab69ff8b2b2f5b9cd48fe6d Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 08:59:07 +0100 Subject: [PATCH 02/15] Configuring with plone.meta --- .meta.toml | 6 ++++++ tox.ini | 1 + 2 files changed, 7 insertions(+) diff --git a/.meta.toml b/.meta.toml index 3c47b09..d255acf 100644 --- a/.meta.toml +++ b/.meta.toml @@ -4,3 +4,9 @@ [meta] template = "default" commit-id = "2.2.3.dev0" + + +[tox] +envlist_lines = """ + py313-plone61 +""" diff --git a/tox.ini b/tox.ini index 86f0a17..202f026 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,7 @@ envlist = py310-plone60 py39-plone60 dependencies + py313-plone61 ## From 7863579c42e4e9cb5c93d37587e97d2c372ea8a1 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:13:11 +0100 Subject: [PATCH 03/15] Configuring with plone.meta --- .github/workflows/test-matrix.yml | 5 ----- .meta.toml | 4 +--- tox.ini | 23 ++++------------------- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index c77efdc..03c36a8 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -19,12 +19,7 @@ jobs: - ["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.9", "6.0 on py3.9", "py39-plone60"] - - ["3.13", "6.0 on py3.13", "py313-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 diff --git a/.meta.toml b/.meta.toml index d255acf..fedd1a0 100644 --- a/.meta.toml +++ b/.meta.toml @@ -7,6 +7,4 @@ commit-id = "2.2.3.dev0" [tox] -envlist_lines = """ - py313-plone61 -""" +test_matrix = {"6.1" = ["3.13"]} diff --git a/tox.ini b/tox.ini index 202f026..4ad3b37 100644 --- a/tox.ini +++ b/tox.ini @@ -7,21 +7,8 @@ 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 - py39-plone60 dependencies - py313-plone61 ## @@ -122,9 +109,7 @@ set_env = ## 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: @@ -164,7 +149,7 @@ 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 + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = {[test_runner]test} extras = {[base]extras} @@ -190,7 +175,7 @@ set_env = {[base]set_env} deps = {[test_runner]deps} coverage - -c https://dist.plone.org/release/6.2-dev/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = {[test_runner]coverage} extras = {[base]extras} @@ -202,7 +187,7 @@ skip_install = true deps = twine build - -c https://dist.plone.org/release/6.2-dev/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = python -m build --sdist twine check dist/* @@ -228,7 +213,7 @@ allowlist_externals = deps = pipdeptree pipforester - -c https://dist.plone.org/release/6.2-dev/constraints.txt + -c https://dist.plone.org/release/6.1-dev/constraints.txt commands = # Generate the full dependency tree sh -c 'pipdeptree -j > forest.json' From 1cf3b8424d6670c5d5c7dd6a1ce1927fa70dfebb Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:14:28 +0100 Subject: [PATCH 04/15] Remove old GHA --- .github/workflows/tests.yml | 54 ------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 37676bb..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Inspired by: -# https://github.com/zopefoundation/meta/tree/master/config/pure-python -name: tests - -on: - push: - branches: [master] - pull_request: - schedule: - - cron: "0 12 * * 0" # run once a week on Sunday - -jobs: - tests: - runs-on: ubuntu-latest - strategy: - matrix: - config: - - ["Py2.7-Plone5.1", "2.7", "5.1"] - - ["Py2.7-Plone5.2", "2.7", "5.2"] - - ["Py3.6-Plone5.2", "3.6", "5.2"] - - ["Py3.7-Plone5.2", "3.7", "5.2"] - - ["Py3.8-Plone5.2", "3.8", "5.2"] - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.config[1] }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.config[1] }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: | - ~/.cache/pip - **/eggs - **/downloads - key: ${{ runner.os }}-cache-${{ hashFiles('setup.*', '*.cfg') }}-${{ matrix.config[0] }} - restore-keys: | - ${{ runner.os }}-cache- - - name: Install dependencies - run: | - sudo apt-get install libxml2-dev libxslt-dev xvfb - mkdir -p $HOME/buildout-cache/{eggs,downloads} - mkdir $HOME/.buildout - echo "[buildout]" > $HOME/.buildout/default.cfg - echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg - echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg - wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz - mkdir geckodriver && tar zxvf geckodriver-v0.26.0-linux64.tar.gz -C geckodriver - python -m pip install --upgrade pip - pip install -r requirements.txt - sed -ie "s#plone-x.x.x.cfg#plone-${{ matrix.config[2] }}.x.cfg#" .gha.cfg - buildout -c .gha.cfg - - name: Test - run: PATH=$PATH:$PWD/geckodriver ROBOT_HTTP_PORT=55001 xvfb-run --server-args="-screen 0 1600x1200x24" ./bin/test From 5bd6d3bb0d5371e9722a635b8be5c2e3b850e371 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:18:04 +0100 Subject: [PATCH 05/15] Configuring with plone.meta --- .github/workflows/test-matrix.yml | 2 +- .meta.toml | 2 +- tox.ini | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index 03c36a8..dd475d2 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -19,7 +19,7 @@ jobs: - ["ubuntu", "ubuntu-latest"] config: # [Python version, visual name, tox env] - - ["3.13", "6.1 on py3.13", "py313-plone61"] + - ["3.8", "5.1 on py3.8", "py38-plone51"] 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 diff --git a/.meta.toml b/.meta.toml index fedd1a0..cab937e 100644 --- a/.meta.toml +++ b/.meta.toml @@ -7,4 +7,4 @@ commit-id = "2.2.3.dev0" [tox] -test_matrix = {"6.1" = ["3.13"]} +test_matrix = {"5.1" = ["3.8"]} diff --git a/tox.ini b/tox.ini index 4ad3b37..f3da7ef 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ min_version = 4.4.0 envlist = lint test - py313-plone61 + py38-plone51 dependencies @@ -109,7 +109,7 @@ set_env = ## deps = {[test_runner]deps} - plone61: -c https://dist.plone.org/release/6.1-dev/constraints.txt + plone51: -c https://dist.plone.org/release/5.1-dev/constraints.txt ## # Specify additional deps in .meta.toml: @@ -149,7 +149,7 @@ constrain_package_deps = {[base]constrain_package_deps} set_env = {[base]set_env} deps = {[test_runner]deps} - -c https://dist.plone.org/release/6.1-dev/constraints.txt + -c https://dist.plone.org/release/5.1-dev/constraints.txt commands = {[test_runner]test} extras = {[base]extras} @@ -175,7 +175,7 @@ set_env = {[base]set_env} deps = {[test_runner]deps} coverage - -c https://dist.plone.org/release/6.1-dev/constraints.txt + -c https://dist.plone.org/release/5.1-dev/constraints.txt commands = {[test_runner]coverage} extras = {[base]extras} @@ -187,7 +187,7 @@ skip_install = true deps = twine build - -c https://dist.plone.org/release/6.1-dev/constraints.txt + -c https://dist.plone.org/release/5.1-dev/constraints.txt commands = python -m build --sdist twine check dist/* @@ -213,7 +213,7 @@ allowlist_externals = deps = pipdeptree pipforester - -c https://dist.plone.org/release/6.1-dev/constraints.txt + -c https://dist.plone.org/release/5.1-dev/constraints.txt commands = # Generate the full dependency tree sh -c 'pipdeptree -j > forest.json' From 750566c92f8070ce3cb9c34263fda47825464df9 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:18:21 +0100 Subject: [PATCH 06/15] Remove old GHA --- setup.cfg | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 58609f1..0000000 --- a/setup.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[isort] -# for details see -# https://docs.plone.org/develop/styleguide/python.html#grouping-and-sorting -force_alphabetical_sort = True -force_single_line = True -lines_after_imports = 2 -line_length = 88 -multi_line_output=3 -include_trailing_comma=True -not_skip = __init__.py - -[flake8] -exclude = bootstrap.py,docs,*.egg.,omelette -max-complexity = 15 -max-line-length = 88 -inline-quotes = " -ignore = C901,E203,W503 From 8c96c465b990c0f6e27ab56c0db05d27fa6f8e49 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:19:11 +0100 Subject: [PATCH 07/15] WIP --- .meta.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.meta.toml b/.meta.toml index cab937e..35fc93b 100644 --- a/.meta.toml +++ b/.meta.toml @@ -7,4 +7,4 @@ commit-id = "2.2.3.dev0" [tox] -test_matrix = {"5.1" = ["3.8"]} +test_matrix = {"5.2" = ["3.8"]} From d249de72c0e5167aa8206c71da13bdb5ce16fd92 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:19:25 +0100 Subject: [PATCH 08/15] Configuring with plone.meta --- .github/workflows/test-matrix.yml | 2 +- tox.ini | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index dd475d2..a16e10d 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -19,7 +19,7 @@ jobs: - ["ubuntu", "ubuntu-latest"] config: # [Python version, visual name, tox env] - - ["3.8", "5.1 on py3.8", "py38-plone51"] + - ["3.8", "5.2 on py3.8", "py38-plone52"] 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 diff --git a/tox.ini b/tox.ini index f3da7ef..d6618e9 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ min_version = 4.4.0 envlist = lint test - py38-plone51 + py38-plone52 dependencies @@ -109,7 +109,7 @@ set_env = ## deps = {[test_runner]deps} - plone51: -c https://dist.plone.org/release/5.1-dev/constraints.txt + plone52: -c https://dist.plone.org/release/5.2-dev/constraints.txt ## # Specify additional deps in .meta.toml: @@ -149,7 +149,7 @@ constrain_package_deps = {[base]constrain_package_deps} set_env = {[base]set_env} deps = {[test_runner]deps} - -c https://dist.plone.org/release/5.1-dev/constraints.txt + -c https://dist.plone.org/release/5.2-dev/constraints.txt commands = {[test_runner]test} extras = {[base]extras} @@ -175,7 +175,7 @@ set_env = {[base]set_env} deps = {[test_runner]deps} coverage - -c https://dist.plone.org/release/5.1-dev/constraints.txt + -c https://dist.plone.org/release/5.2-dev/constraints.txt commands = {[test_runner]coverage} extras = {[base]extras} @@ -187,7 +187,7 @@ skip_install = true deps = twine build - -c https://dist.plone.org/release/5.1-dev/constraints.txt + -c https://dist.plone.org/release/5.2-dev/constraints.txt commands = python -m build --sdist twine check dist/* @@ -213,7 +213,7 @@ allowlist_externals = deps = pipdeptree pipforester - -c https://dist.plone.org/release/5.1-dev/constraints.txt + -c https://dist.plone.org/release/5.2-dev/constraints.txt commands = # Generate the full dependency tree sh -c 'pipdeptree -j > forest.json' From af6745b185ef51ecb62abe8c2b88c50be8a0ffa5 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:21:44 +0100 Subject: [PATCH 09/15] Configuring with plone.meta --- .github/workflows/test-matrix.yml | 2 +- .meta.toml | 2 +- tox.ini | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-matrix.yml b/.github/workflows/test-matrix.yml index a16e10d..f8c6411 100644 --- a/.github/workflows/test-matrix.yml +++ b/.github/workflows/test-matrix.yml @@ -19,7 +19,7 @@ jobs: - ["ubuntu", "ubuntu-latest"] config: # [Python version, visual name, tox env] - - ["3.8", "5.2 on py3.8", "py38-plone52"] + - ["3.11", "6.0 on py3.11", "py311-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 diff --git a/.meta.toml b/.meta.toml index 35fc93b..59375ce 100644 --- a/.meta.toml +++ b/.meta.toml @@ -7,4 +7,4 @@ commit-id = "2.2.3.dev0" [tox] -test_matrix = {"5.2" = ["3.8"]} +test_matrix = {"6.0" = ["3.11"]} diff --git a/tox.ini b/tox.ini index d6618e9..86c8d04 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ min_version = 4.4.0 envlist = lint test - py38-plone52 + py311-plone60 dependencies @@ -109,7 +109,7 @@ set_env = ## deps = {[test_runner]deps} - plone52: -c https://dist.plone.org/release/5.2-dev/constraints.txt + plone60: -c https://dist.plone.org/release/6.0-dev/constraints.txt ## # Specify additional deps in .meta.toml: @@ -149,7 +149,7 @@ constrain_package_deps = {[base]constrain_package_deps} set_env = {[base]set_env} deps = {[test_runner]deps} - -c https://dist.plone.org/release/5.2-dev/constraints.txt + -c https://dist.plone.org/release/6.0-dev/constraints.txt commands = {[test_runner]test} extras = {[base]extras} @@ -175,7 +175,7 @@ set_env = {[base]set_env} deps = {[test_runner]deps} coverage - -c https://dist.plone.org/release/5.2-dev/constraints.txt + -c https://dist.plone.org/release/6.0-dev/constraints.txt commands = {[test_runner]coverage} extras = {[base]extras} @@ -187,7 +187,7 @@ skip_install = true deps = twine build - -c https://dist.plone.org/release/5.2-dev/constraints.txt + -c https://dist.plone.org/release/6.0-dev/constraints.txt commands = python -m build --sdist twine check dist/* @@ -213,7 +213,7 @@ allowlist_externals = deps = pipdeptree pipforester - -c https://dist.plone.org/release/5.2-dev/constraints.txt + -c https://dist.plone.org/release/6.0-dev/constraints.txt commands = # Generate the full dependency tree sh -c 'pipdeptree -j > forest.json' From 2ca5f22620e17a858fe3fbac8891887f0f2b52ff Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:33:02 +0100 Subject: [PATCH 10/15] Configuring with plone.meta --- .gitignore | 1 + .meta.toml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index a602abe..cd7788d 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ local.cfg /venv/ .installed.txt +/workspaces ## # Add extra configuration options in .meta.toml: diff --git a/.meta.toml b/.meta.toml index 59375ce..ae8fd3e 100644 --- a/.meta.toml +++ b/.meta.toml @@ -8,3 +8,8 @@ commit-id = "2.2.3.dev0" [tox] test_matrix = {"6.0" = ["3.11"]} + +[gitignore] +extra_lines = """ +/workspaces +""" From 5d66c78e4ff895ca0124e863328e152f15632754 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:33:30 +0100 Subject: [PATCH 11/15] Configuring with plone.meta --- .gitignore | 5 ++++- .meta.toml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cd7788d..764c662 100644 --- a/.gitignore +++ b/.gitignore @@ -48,7 +48,10 @@ local.cfg /venv/ .installed.txt -/workspaces +/robot_log.html +/robot_output.xml +/robot_report.html +/workspace ## # Add extra configuration options in .meta.toml: diff --git a/.meta.toml b/.meta.toml index ae8fd3e..18c3a36 100644 --- a/.meta.toml +++ b/.meta.toml @@ -11,5 +11,8 @@ test_matrix = {"6.0" = ["3.11"]} [gitignore] extra_lines = """ -/workspaces +/robot_log.html +/robot_output.xml +/robot_report.html +/workspace """ From 4d4d2614d881723c3cee2059487f2e6426f961a9 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 09:57:51 +0100 Subject: [PATCH 12/15] Compatible Open Add New Menu --- src/collective/workspace/tests/workspace.robot | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/collective/workspace/tests/workspace.robot b/src/collective/workspace/tests/workspace.robot index 70c68ba..816bb8f 100644 --- a/src/collective/workspace/tests/workspace.robot +++ b/src/collective/workspace/tests/workspace.robot @@ -32,11 +32,23 @@ Start browser a test workspace Log in as site owner Go to ${PLONE_URL} - Open Add New Menu + Compatible Open Add New Menu Click link css=.contenttype-workspace Input text form-widgets-IBasic-title Test Workspace Click button Save + +# There was a change in markup from: +# css=#plone-contentmenu-factories > div > ul +# to: +# css=#plone-contentmenu-factories > ul +Compatible Open Add New Menu + ${status}= Run Keyword And Return Status Open Add New Menu + IF '${status}' == 'FAIL' + Wait Until Element Is Visible css=#plone-contentmenu-factories > ul + END + + the test user is added to the roster Click link css=#contentview-team-roster a Click Overlay Link workspace-add-user From 0464b95c3d3be4c66c98c21e8590c4be1141e3c0 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 10:35:08 +0100 Subject: [PATCH 13/15] Switch to chrome --- src/collective/workspace/tests/workspace.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collective/workspace/tests/workspace.robot b/src/collective/workspace/tests/workspace.robot index 816bb8f..18179c1 100644 --- a/src/collective/workspace/tests/workspace.robot +++ b/src/collective/workspace/tests/workspace.robot @@ -9,7 +9,7 @@ Suite Teardown Close All Browsers *** Variables *** -${BROWSER} = firefox +${BROWSER} = chrome *** Test Cases *** From 2e7959e78a31e7b0407c586a8adf7a61145ff8be Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 10:41:47 +0100 Subject: [PATCH 14/15] WIP --- src/collective/workspace/tests/workspace.robot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/collective/workspace/tests/workspace.robot b/src/collective/workspace/tests/workspace.robot index 18179c1..e044d6e 100644 --- a/src/collective/workspace/tests/workspace.robot +++ b/src/collective/workspace/tests/workspace.robot @@ -9,7 +9,7 @@ Suite Teardown Close All Browsers *** Variables *** -${BROWSER} = chrome +${BROWSER} = firefox *** Test Cases *** @@ -28,6 +28,7 @@ Scenario: Workspace member gains access to workspace Start browser Open browser ${START_URL} browser=${BROWSER} + Set Window Size 1200 1000 a test workspace Log in as site owner From 0decac89f9e7556e25e38eda03462495ef56d72f Mon Sep 17 00:00:00 2001 From: ale-rt Date: Fri, 14 Nov 2025 11:03:29 +0100 Subject: [PATCH 15/15] WIP --- src/collective/workspace/tests/workspace.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collective/workspace/tests/workspace.robot b/src/collective/workspace/tests/workspace.robot index e044d6e..79e8f59 100644 --- a/src/collective/workspace/tests/workspace.robot +++ b/src/collective/workspace/tests/workspace.robot @@ -28,7 +28,7 @@ Scenario: Workspace member gains access to workspace Start browser Open browser ${START_URL} browser=${BROWSER} - Set Window Size 1200 1000 + Set window size 1200 1000 a test workspace Log in as site owner