From e5a65791d2ddfe3df582ef7cbb0bb8d1846565f5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:46:16 +0000 Subject: [PATCH 1/4] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.15.2 → v3.16.0](https://github.com/asottile/pyupgrade/compare/v3.15.2...v3.16.0) - [github.com/PyCQA/flake8: 7.0.0 → 7.1.0](https://github.com/PyCQA/flake8/compare/7.0.0...7.1.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 196f8e16..36c3e458 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ ci: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.16.0 hooks: - id: pyupgrade args: [--py38-plus] @@ -32,7 +32,7 @@ repos: # """ ## - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.1.0 hooks: - id: flake8 @@ -44,7 +44,7 @@ repos: # """ ## - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell additional_dependencies: From d7d0ec6f1d451f08268416430c14f1d76512e188 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Wed, 5 Jun 2024 20:38:08 +0200 Subject: [PATCH 2/4] Configuring with plone/meta --- .editorconfig | 11 +++++--- .flake8 | 2 +- .github/workflows/meta.yml | 51 ++++++++++++++++++++++++++++++++++++-- .gitignore | 7 +++++- .meta.toml | 4 +-- .pre-commit-config.yaml | 12 ++++++++- dependabot.yml | 11 ++++++++ pyproject.toml | 19 ++++++++++---- tox.ini | 39 ++++++++++++++++++++++++++--- 9 files changed, 136 insertions(+), 20 deletions(-) create mode 100644 dependabot.yml diff --git a/.editorconfig b/.editorconfig index 919b4116..5b3c112c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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: @@ -13,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 @@ -29,13 +30,15 @@ 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 [{Makefile,.gitmodules}] # Tab indentation (no size specified, but view as 4 spaces) diff --git a/.flake8 b/.flake8 index 7ef4f64d..38918f42 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/config/default # See the inline comments on how to expand/tweak this configuration file [flake8] doctests = 1 diff --git a/.github/workflows/meta.yml b/.github/workflows/meta.yml index a7f25e02..c9848bcb 100644 --- a/.github/workflows/meta.yml +++ b/.github/workflows/meta.yml @@ -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: @@ -13,6 +13,16 @@ on: - 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@main @@ -22,7 +32,44 @@ jobs: uses: plone/meta/.github/workflows/coverage.yml@main dependencies: uses: plone/meta/.github/workflows/dependencies.yml@main - release-ready: + release_ready: uses: plone/meta/.github/workflows/release_ready.yml@main circular: uses: plone/meta/.github/workflows/circular.yml@main + +## +# To modify the list of default jobs being created add in .meta.toml: +# [github] +# jobs = [ +# "qa", +# "test", +# "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" +## + +## +# To test against a specific matrix of python versions +# when running tests jobs, add in .meta.toml: +# [github] +# py_versions = "['3.12', '3.11']" +## + + +## +# Specify additional jobs in .meta.toml: +# [github] +# extra_lines = """ +# another: +# uses: org/repo/.github/workflows/file.yml@main +# """ +## diff --git a/.gitignore b/.gitignore index 81594fde..486392f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,18 @@ # 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 *.pyc *.pyo +# translation related +*.mo + # tools related build/ .coverage +.*project coverage.xml dist/ docs/_build @@ -31,6 +35,7 @@ lib64 parts/ pyvenv.cfg var/ +local.cfg # mxdev /instance/ diff --git a/.meta.toml b/.meta.toml index 502b2b4a..529643ce 100644 --- a/.meta.toml +++ b/.meta.toml @@ -1,9 +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 [meta] template = "default" -commit-id = "cfffba8c" +commit-id = "a89af8f2" [pre_commit] extra_lines = """ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 36c3e458..62e27f55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 ci: autofix_prs: false @@ -74,6 +74,16 @@ repos: rev: "6.2.0" hooks: - id: i18ndude + + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# i18ndude_extra_lines = """ +# _your own configuration lines_ +# """ +## + exclude: (resources/.*.pt|tests/.*.pt) ## diff --git a/dependabot.yml b/dependabot.yml new file mode 100644 index 00000000..bbd3ab05 --- /dev/null +++ b/dependabot.yml @@ -0,0 +1,11 @@ +# Generated from: +# https://github.com/plone/meta/tree/main/config/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/pyproject.toml b/pyproject.toml index e442bd0f..653b7e29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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.rst" @@ -68,7 +71,7 @@ target-version = ["py38"] ## [tool.codespell] -ignore-words-list = "discreet," +ignore-words-list = "discreet,assertin," skip = "*.po," ## # Add extra configuration options in .meta.toml: @@ -125,19 +128,20 @@ python-dateutil = ['dateutil'] # "gitpython = ['git']", # "pygithub = ['github']", # ] -# """ ## [tool.check-manifest] ignore = [ ".editorconfig", + ".flake8", ".meta.toml", ".pre-commit-config.yaml", - "tox.ini", - ".flake8", + "dependabot.yml", "mx.ini", + "tox.ini", ] + ## # Add extra configuration options in .meta.toml: # [pyproject] @@ -145,6 +149,11 @@ ignore = [ # "*.map.js", # "*.pyc", # """ +# check_manifest_extra_lines = """ +# ignore-bad-ideas = [ +# "some/test/file/PKG-INFO", +# ] +# """ ## diff --git a/tox.ini b/tox.ini index 3255085e..d02d159e 100644 --- a/tox.ini +++ b/tox.ini @@ -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. @@ -32,6 +32,21 @@ 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 +commands = + echo "Initial setup complete" + + [testenv:format] description = automatically reformat code skip_install = true @@ -56,9 +71,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] @@ -86,11 +101,20 @@ set_env = # 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 = zope.testrunner -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" @@ -128,10 +152,12 @@ deps = coverage zope.testrunner -c https://dist.plone.org/release/6.0-dev/constraints.txt + commands = coverage run --branch --source plone.app.theming {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir}/src -s plone.app.theming {posargs} coverage report -m --format markdown coverage xml + coverage html extras = test @@ -144,18 +170,22 @@ deps = build towncrier -c https://dist.plone.org/release/6.0-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 --no-isolation + 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 = ## @@ -171,6 +201,7 @@ deps = pipdeptree pipforester -c https://dist.plone.org/release/6.0-dev/constraints.txt + commands = # Generate the full dependency tree sh -c 'pipdeptree -j > forest.json' From 7dae2d8f2a4c008a39abbaa77fa4df9c0ec7432b Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Wed, 5 Jun 2024 20:38:39 +0200 Subject: [PATCH 3/4] chore: typo --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 98f75f6e..4726ccd6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -678,7 +678,7 @@ Fixes: 1.2.7 (2015-07-18) ------------------ -- Provide better styling to themeing control panel, less build, finish implementation +- Provide better styling to theming control panel, less build, finish implementation [obct537] - make sure when copying themes that you try to modify the base urls From 1e9b6dcd0aba27db68d8db91601b4092d321775d Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Tue, 2 Jul 2024 07:09:32 +0200 Subject: [PATCH 4/4] chore: adjust dependencies --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d479bda8..642247db 100644 --- a/setup.py +++ b/setup.py @@ -62,8 +62,7 @@ "Products.statusmessages", "repoze.xmliter>=0.3", "setuptools", - "zope.processlifetime", - "zope.traversing", + "Zope", ], extras_require={ "test": [