From 7d64b608133d1f39fbceff2e9b10cfca7fc987c9 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Thu, 13 Jun 2024 21:39:06 +0200 Subject: [PATCH] tox: use 6.1 constraints. --- .editorconfig | 6 ++++-- .github/workflows/meta.yml | 7 +++++++ .meta.toml | 5 ++++- .pre-commit-config.yaml | 2 +- dependabot.yml | 11 +++++++++++ pyproject.toml | 13 ++++++++++--- tox.ini | 20 ++++++++++++-------- 7 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 dependabot.yml diff --git a/.editorconfig b/.editorconfig index fa698fb1..5b3c112c 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 @@ -33,7 +34,8 @@ indent_size = 4 # 2 space indentation indent_size = 2 -[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}] # 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 b8edec02..c9848bcb 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 9a7ab5ce..20de3903 100644 --- a/.meta.toml +++ b/.meta.toml @@ -3,8 +3,11 @@ # See the inline comments on how to expand/tweak this configuration file [meta] template = "default" -commit-id = "6e36bcc4" +commit-id = "a89af8f2" [pyproject] codespell_ignores = "oder,ist,crate" dependencies_ignores = "['ZServer', 'plone.app.event', 'Products.CMFPlone',]" + +[tox] +constraints_file = "https://dist.plone.org/release/6.1-dev/constraints.txt" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d60054bd..da56023f 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: 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 7f6cc189..35e47cbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,7 @@ target-version = ["py38"] ## [tool.codespell] -ignore-words-list = "discreet,oder,ist,crate" +ignore-words-list = "discreet,assertin,oder,ist,crate" skip = "*.po," ## # Add extra configuration options in .meta.toml: @@ -134,13 +134,15 @@ ignore-packages = ['ZServer', 'plone.app.event', 'Products.CMFPlone',] [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 5cc50c67..c0b0ad2b 100644 --- a/tox.ini +++ b/tox.ini @@ -108,8 +108,8 @@ set_env = ## deps = zope.testrunner - -c https://dist.plone.org/release/6.0-dev/constraints.txt - + -c https://dist.plone.org/release/6.1-dev/constraints.txt + ## # Specify additional deps in .meta.toml: # [tox] @@ -152,13 +152,14 @@ set_env = deps = coverage zope.testrunner - -c https://dist.plone.org/release/6.0-dev/constraints.txt - + -c https://dist.plone.org/release/6.1-dev/constraints.txt + commands = rfbrowser init coverage run --branch --source plone.app.contenttypes {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.app.contenttypes {posargs} coverage report -m --format markdown coverage xml + coverage html extras = test @@ -170,8 +171,8 @@ deps = twine build towncrier - -c https://dist.plone.org/release/6.0-dev/constraints.txt - + -c https://dist.plone.org/release/6.1-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 = ## @@ -198,8 +202,8 @@ allowlist_externals = deps = pipdeptree pipforester - -c https://dist.plone.org/release/6.0-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'