From cf3d3e00887577a90c894e5b1a87d8c027dfd00f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:59:03 +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/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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e92fa7..6c2b385 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 f1fc82a96e2341695d4f1befd10c4bdffd59ea0b Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Thu, 6 Jun 2024 08:58:44 +0200 Subject: [PATCH 2/4] Configuring with plone/meta --- .editorconfig | 8 +++++--- .github/workflows/meta.yml | 7 +++++++ .meta.toml | 2 +- dependabot.yml | 11 +++++++++++ pyproject.toml | 13 ++++++++++--- tox.ini | 14 +++++++++----- 6 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 dependabot.yml diff --git a/.editorconfig b/.editorconfig index 9365ef1..5b3c112 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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,11 +30,12 @@ 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 diff --git a/.github/workflows/meta.yml b/.github/workflows/meta.yml index b8edec0..c9848bc 100644 --- a/.github/workflows/meta.yml +++ b/.github/workflows/meta.yml @@ -57,6 +57,13 @@ jobs: # 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: diff --git a/.meta.toml b/.meta.toml index 65dd6fd..83e7178 100644 --- a/.meta.toml +++ b/.meta.toml @@ -3,7 +3,7 @@ # See the inline comments on how to expand/tweak this configuration file [meta] template = "default" -commit-id = "6a477508" +commit-id = "a89af8f2" [pyproject] codespell_ignores = "alog,ist," diff --git a/dependabot.yml b/dependabot.yml new file mode 100644 index 0000000..bbd3ab0 --- /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 5c88d53..4e28da3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ target-version = ["py38"] ## [tool.codespell] -ignore-words-list = "discreet,alog,ist," +ignore-words-list = "discreet,assertin,alog,ist," skip = "*.po," ## # Add extra configuration options in .meta.toml: @@ -134,13 +134,15 @@ ignore-packages = ['plone.namedfile', 'z3c.blobfile', 'Products.CMFDiffTool'] [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] @@ -148,6 +150,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 7597a44..ce531d3 100644 --- a/tox.ini +++ b/tox.ini @@ -71,7 +71,7 @@ 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 dependencychecker @@ -109,7 +109,7 @@ set_env = deps = zope.testrunner -c https://dist.plone.org/release/6.0-dev/constraints.txt - + ## # Specify additional deps in .meta.toml: # [tox] @@ -153,12 +153,13 @@ deps = coverage zope.testrunner -c https://dist.plone.org/release/6.0-dev/constraints.txt - + commands = rfbrowser init coverage run --branch --source Products.CMFEditions {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s Products.CMFEditions {posargs} coverage report -m --format markdown coverage xml + coverage html extras = test @@ -171,7 +172,7 @@ 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 @@ -184,6 +185,9 @@ commands = 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 = ## @@ -199,7 +203,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 55368cb9e398b0a4d8f1a91ed1314c009e5732d4 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Thu, 6 Jun 2024 09:13:08 +0200 Subject: [PATCH 3/4] chore: typo --- Products/CMFEditions/interfaces/IModifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Products/CMFEditions/interfaces/IModifier.py b/Products/CMFEditions/interfaces/IModifier.py index 3142609..13a2d42 100644 --- a/Products/CMFEditions/interfaces/IModifier.py +++ b/Products/CMFEditions/interfaces/IModifier.py @@ -116,7 +116,7 @@ def afterRetrieveModifier(obj, repo_clone, preserve=()): - re-add data that was removed by the 'beforeSaveHook' - manipulate data before it get restored - - return data that gets overwritte in this process + - return data that gets overwrite in this process It does kind of the inverse of the method ``beforeSaveModifier``. From 9a382582b5de3a09a6a62ba5cacb568bec754870 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Thu, 6 Jun 2024 09:13:20 +0200 Subject: [PATCH 4/4] chore: ignore a word --- .meta.toml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.meta.toml b/.meta.toml index 83e7178..98dc447 100644 --- a/.meta.toml +++ b/.meta.toml @@ -6,7 +6,7 @@ template = "default" commit-id = "a89af8f2" [pyproject] -codespell_ignores = "alog,ist," +codespell_ignores = "alog,ist,checkin" dependencies_ignores = "['plone.namedfile', 'z3c.blobfile', 'Products.CMFDiffTool']" [pre_commit] diff --git a/pyproject.toml b/pyproject.toml index 4e28da3..178b3df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ target-version = ["py38"] ## [tool.codespell] -ignore-words-list = "discreet,assertin,alog,ist," +ignore-words-list = "discreet,assertin,alog,ist,checkin" skip = "*.po," ## # Add extra configuration options in .meta.toml: