From 25197cca0e4424486ca728d48f20bebaf89001ee Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Tue, 7 Sep 2021 08:09:47 +0200 Subject: [PATCH] Configuring for pure-python --- .editorconfig | 2 +- .github/workflows/tests.yml | 9 +++++++-- .gitignore | 8 +++++++- .meta.toml | 12 +++++++++--- MANIFEST.in | 5 ++--- tox.ini | 15 +++++++++------ 6 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.editorconfig b/.editorconfig index f3e46f5..c5508b9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0d787a0..dc3859c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,15 +4,20 @@ 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"] @@ -26,7 +31,7 @@ jobs: - ["pypy3", "pypy3"] - ["3.8", "coverage"] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }}-latest name: ${{ matrix.config[1] }} steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 0aadbae..c724a76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,31 @@ # Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python +*.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/ -htmlcov/ +etc/ lib/ lib64 +log/ parts/ pyvenv.cfg +var/ diff --git a/.meta.toml b/.meta.toml index a7ac41a..45c49d3 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,14 +2,14 @@ # https://github.com/zopefoundation/meta/tree/master/config/pure-python [meta] template = "pure-python" -commit-id = "2f8a259d7589d70e4fa73654d5a28f174f0959a0" +commit-id = "d3627ba9bcb25d0c7cb09b96d695040a20e0ab2b" [python] -with-appveyor = false with-pypy = true with-legacy-python = true -with-docs = false with-sphinx-doctests = false +with-windows = false +with-future-python = false [coverage] fail-under = 98 @@ -17,6 +17,9 @@ fail-under = 98 [manifest] additional-rules = [ "recursive-include src *.gif", + "recursive-include src *.pt", + "recursive-include src *.rst", + "recursive-include src *.zcml", ] [flake8] @@ -30,3 +33,6 @@ additional-config = [ " src/zope/app/catalog/keyword.py: F401", " src/zope/app/catalog/text.py: F401", ] + +[tox] +use-flake8 = true diff --git a/MANIFEST.in b/MANIFEST.in index 0b5df24..3816af4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,9 +5,8 @@ include *.txt include buildout.cfg include tox.ini -recursive-include src *.pt recursive-include src *.py +recursive-include src *.gif +recursive-include src *.pt recursive-include src *.rst -recursive-include src *.txt recursive-include src *.zcml -recursive-include src *.gif diff --git a/tox.ini b/tox.ini index d6b1153..ffaba36 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ # Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python [tox] +minversion = 3.18 envlist = lint py27 @@ -16,9 +17,8 @@ envlist = [testenv] usedevelop = true deps = - zope.testrunner commands = - zope-testrunner --test-path=src [] + zope-testrunner --test-path=src {posargs:-vc} extras = test @@ -29,6 +29,7 @@ deps = flake8 check-manifest check-python-versions + wheel commands = flake8 src setup.py check-manifest @@ -36,19 +37,21 @@ commands = [testenv:coverage] basepython = python3 +allowlist_externals = + mkdir deps = coverage coverage-python-version - zope.testrunner commands = - coverage run -m zope.testrunner --test-path=src [] + mkdir -p {toxinidir}/parts/htmlcov + coverage run -m zope.testrunner --test-path=src {posargs:-vc} coverage html coverage report -m --fail-under=98 [coverage:run] branch = True plugins = coverage_python_version -source = src +source = zope.app.catalog [coverage:report] precision = 2 @@ -62,4 +65,4 @@ exclude_lines = raise AssertionError [coverage:html] -directory = htmlcov +directory = parts/htmlcov