Skip to content

Commit

Permalink
Merge pull request #140 from plone/plone-meta
Browse files Browse the repository at this point in the history
Add Zope to dependencies.  Update config files with plone/meta.
  • Loading branch information
thet authored Jun 19, 2024
2 parents 0719529 + 7871504 commit d94ed87
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 52 deletions.
10 changes: 6 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/meta.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -55,6 +55,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:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -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
# python related
*.egg-info
Expand Down Expand Up @@ -35,6 +35,7 @@ lib64
parts/
pyvenv.cfg
var/
local.cfg

# mxdev
/instance/
Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -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 = "68cda6e4"
commit-id = "a89af8f2"

[pyproject]
check_manifest_ignores = """
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# 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
autoupdate_schedule: monthly

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/collective/zpretty
Expand All @@ -32,7 +32,7 @@ repos:
# """
##
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8

Expand All @@ -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:
Expand All @@ -66,12 +66,12 @@ repos:
hooks:
- id: pyroma
- repo: https://github.com/mgedmin/check-python-versions
rev: "0.21.3"
rev: "0.22.0"
hooks:
- id: check-python-versions
args: ['--only', 'setup.py,pyproject.toml']
- repo: https://github.com/collective/i18ndude
rev: "6.1.0"
rev: "6.2.0"
hooks:
- id: i18ndude

Expand Down
11 changes: 11 additions & 0 deletions dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions news/1.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add Zope to dependencies. Update config files with plone/meta.
[maurits]
5 changes: 4 additions & 1 deletion plone/app/caching/browser/controlpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@

# Borrowed from zope.schema to avoid an import of a private name
_isuri = re.compile(
r"[a-zA-z0-9+.-]+:" r"\S*$" # scheme # non space (should be pickier)
# scheme
r"[a-zA-z0-9+.-]+:"
# non space (should be pickier)
r"\S*$"
).match


Expand Down
12 changes: 6 additions & 6 deletions plone/app/caching/tests/test_operation_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def test_last_modified_no_etags(self):
browser.open(
f"{self.portal['f1'].absolute_url()}/++add++Document",
)
browser.getControl(
name="form.widgets.IDublinCore.title"
).value = "dummy content"
browser.getControl(name="form.widgets.IDublinCore.title").value = (
"dummy content"
)
browser.getControl("Save").click()
self.assertNotIn("Etag", browser.headers)

Expand All @@ -79,8 +79,8 @@ def test_last_modified_no_etags(self):
url = self.portal["f1"].absolute_url()
token = getToken(TEST_USER_NAME)
browser.open(f"{url}/dummy-content/edit?_authenticator={token}")
browser.getControl(
name="form.widgets.IDublinCore.title"
).value = "dummy content"
browser.getControl(name="form.widgets.IDublinCore.title").value = (
"dummy content"
)
browser.getControl("Save").click()
self.assertIn("Etag", browser.headers)
6 changes: 3 additions & 3 deletions plone/app/caching/tests/test_operation_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,9 @@ def test_isModified_ims_not_modified_two_dates(self):
response = HTTPResponse()
request = HTTPRequest(StringIO(), environ, response)

request.environ[
"HTTP_IF_MODIFIED_SINCE"
] = "Thu, 24 Nov 2011 03:04:05 GMT; Thu, 24 Nov 2011 03:04:05"
request.environ["HTTP_IF_MODIFIED_SINCE"] = (
"Thu, 24 Nov 2011 03:04:05 GMT; Thu, 24 Nov 2011 03:04:05"
)

lastModified = datetime.datetime(2010, 11, 24, 3, 4, 5, 6, dateutil.tz.tzutc())

Expand Down
18 changes: 14 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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.md"
Expand Down Expand Up @@ -70,7 +73,7 @@ target-version = ["py38"]
##

[tool.codespell]
ignore-words-list = "discreet,ordner"
ignore-words-list = "discreet,assertin,ordner"
skip = "*.po,"
##
# Add extra configuration options in .meta.toml:
Expand Down Expand Up @@ -133,25 +136,32 @@ ignore-packages = ['zope.dublincore']
[tool.check-manifest]
ignore = [
".editorconfig",
".flake8",
".meta.toml",
".pre-commit-config.yaml",
"tox.ini",
".flake8",
"dependabot.yml",
"mx.ini",
"tox.ini",
".tox",
"constraints-mxdev.txt",
"instance.yaml",
"Makefile",
"requirements-mxdev.txt",

]

##
# 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",
# ]
# """
##


Expand Down
14 changes: 1 addition & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@
zip_safe=False,
python_requires=">=3.8",
install_requires=[
"AccessControl",
"Acquisition",
"Products.CMFCore",
"Products.CMFDynamicViewFTI",
"Products.CMFPlone",
"Products.GenericSetup",
"Products.statusmessages",
"Zope",
"setuptools",
"python-dateutil",
"plone.app.registry",
Expand All @@ -67,18 +66,7 @@
"z3c.caching",
"z3c.form",
"z3c.zcmlhook",
"zope.annotation",
"zope.browserresource",
"zope.component",
"zope.event",
"zope.globalrequest",
"zope.i18nmessageid",
"zope.interface",
"zope.lifecycleevent",
"zope.pagetemplate",
"zope.publisher",
"zope.ramcache",
"zope.schema",
],
extras_require={
"test": [
Expand Down
28 changes: 20 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -32,6 +32,14 @@ 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
Expand Down Expand Up @@ -63,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]
Expand Down Expand Up @@ -101,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]
Expand Down Expand Up @@ -144,11 +152,12 @@ deps =
coverage
zope.testrunner
-c https://dist.plone.org/release/6.0-dev/constraints.txt

commands =
coverage run --branch --source plone.app.caching {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.app.caching {posargs}
coverage report -m --format markdown
coverage xml
coverage html
extras =
test

Expand All @@ -161,19 +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 =

##
Expand All @@ -189,7 +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'
Expand Down

0 comments on commit d94ed87

Please sign in to comment.