Skip to content

Commit

Permalink
Update 5.x to current meta/config. (#135)
Browse files Browse the repository at this point in the history
(This seems the only place where we have meta/config on a maintenance branch)

We cannot support Python 3.10 because it requires a version of the multipart library which is not allowed by the Zope 4.x version pins used.
  • Loading branch information
Michael Howitz committed Apr 14, 2022
1 parent 45d2988 commit 675ae9c
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Expand Up @@ -28,7 +28,7 @@ max_line_length = off
# 4 space indentation
indent_size = 4

[*.{yml,zpt,pt,dtml}]
[*.{yml,zpt,pt,dtml,zcml}]
# 2 space indentation
indent_size = 2

Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/tests.yml
Expand Up @@ -4,27 +4,32 @@ name: tests

on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
strategy:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ubuntu
config:
# [Python version, tox env]
- ["3.8", "lint"]
- ["3.9", "lint"]
- ["2.7", "py27"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.8", "coverage"]
- ["3.9", "coverage"]

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
Expand All @@ -42,7 +47,7 @@ jobs:
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip==20.3.4
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
@@ -1,24 +1,32 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
*.dll
*.egg-info/
*.profraw
*.pyc
*.pyo
*.so
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
.vscode/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
develop/
dist/
docs/_build
eggs/
etc/
lib/
lib64
log/
parts/
pyvenv.cfg
testing.log
var/
9 changes: 6 additions & 3 deletions .meta.toml
Expand Up @@ -2,14 +2,14 @@
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "dff30b80f91fd1b4e68f2a73f7de721d9559de17"
commit-id = "3a251aab94eff9cf2aa2fd87d7266593251e4b76"

[python]
with-appveyor = false
with-pypy = false
with-legacy-python = true
with-docs = false
with-sphinx-doctests = false
with-windows = false
with-future-python = false

[coverage]
fail-under = 87
Expand All @@ -18,10 +18,13 @@ fail-under = 87
testenv-commands-pre = [
"{envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test",
]
use-flake8 = true

[manifest]
additional-rules = [
"recursive-include src *.dtml",
"recursive-include src *.gif",
"recursive-include src *.zpt",
"recursive-include src *.txt",
"recursive-include src *.zcml",
]
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,23 @@
<!--
Generated from:
https://github.com/zopefoundation/meta/tree/master/config/zope-product
-->
# Contributing to zopefoundation projects

The projects under the zopefoundation GitHub organization are open source and
welcome contributions in different forms:

* bug reports
* code improvements and bug fixes
* documentation improvements
* pull request reviews

For any changes in the repository besides trivial typo fixes you are required
to sign the contributor agreement. See
https://www.zope.dev/developer/becoming-a-committer.html for details.

Please visit our [Developer
Guidelines](https://www.zope.dev/developer/guidelines.html) if you'd like to
contribute code changes and our [guidelines for reporting
bugs](https://www.zope.dev/developer/reporting-bugs.html) if you want to file a
bug report.
7 changes: 3 additions & 4 deletions MANIFEST.in
@@ -1,15 +1,14 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
include *.md
include *.rst
include *.txt
include buildout.cfg
include tox.ini

recursive-include src *.pt
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
recursive-include src *.dtml
recursive-include src *.gif
recursive-include src *.zpt
recursive-include src *.txt
recursive-include src *.zcml
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -17,9 +17,9 @@ ignore =
force_single_line = True
combine_as_imports = True
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
known_first_party =
known_third_party = six, docutils, pkg_resources
known_zope =
known_first_party =
default_section = ZOPE
line_length = 79
lines_after_imports = 2
19 changes: 8 additions & 11 deletions tox.ini
Expand Up @@ -14,24 +14,24 @@ envlist =

[testenv]
skip_install = true
# We need to pin setuptools until we have zc.buildout 3.0.
deps =
setuptools < 52
zc.buildout
py36,py37,py38,py39,coverage: pip == 20.3.4
zc.buildout >= 3.0.0rc3
wheel > 0.37
commands_pre =
{envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
commands =
{envbindir}/test {posargs:-cv}

[testenv:lint]
basepython = python3
allowlist_externals =
mkdir
commands_pre =
mkdir -p {toxinidir}/parts/flake8
allowlist_externals =
mkdir
commands =
isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py
- flake8 --format=html {toxinidir}/src {toxinidir}/setup.py
- flake8 {toxinidir}/src {toxinidir}/setup.py
flake8 {toxinidir}/src {toxinidir}/setup.py
check-manifest
check-python-versions
Expand All @@ -40,12 +40,9 @@ deps =
check-python-versions
flake8
isort
# helper to generate HTML reports:
flake8-html
# Useful flake8 plugins that are Python and Plone specific:
flake8-coding
flake8-debugger
flake8-string-format
mccabe

[testenv:isort-apply]
Expand All @@ -69,12 +66,12 @@ commands =
mkdir -p {toxinidir}/parts/htmlcov
coverage run {envbindir}/test {posargs:-cv}
coverage html
coverage report -m --fail-under=87
coverage report -m --fail-under=86

[coverage:run]
branch = True
plugins = coverage_python_version
source = src
source = Products.ZCatalog

[coverage:report]
precision = 2
Expand Down

0 comments on commit 675ae9c

Please sign in to comment.