From 2f4ca54092a2b8c518748e57f17cc2366eb4ab89 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Fri, 17 Sep 2021 08:26:09 +0200 Subject: [PATCH] Configuring for pure-python --- .editorconfig | 2 +- .github/workflows/tests.yml | 9 +++++++-- .gitignore | 7 +++++++ .meta.toml | 12 +++++++++--- MANIFEST.in | 4 ---- tox.ini | 7 ++++--- 6 files changed, 28 insertions(+), 13 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 5a1c2f6..c724a76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +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/ +etc/ lib/ lib64 +log/ parts/ pyvenv.cfg +var/ diff --git a/.meta.toml b/.meta.toml index a49903c..873537e 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,14 +2,20 @@ # https://github.com/zopefoundation/meta/tree/master/config/pure-python [meta] template = "pure-python" -commit-id = "e1a6d19b7bd98050e5ddfeb73206e1989bc56071" +commit-id = "5b60e8235223c5c73427d4cdf66be5fb2cce3cea" [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 = 100 + +[tox] +use-flake8 = true +testenv-deps = [ + "zope.testrunner", + ] diff --git a/MANIFEST.in b/MANIFEST.in index 2f22a2c..941b77f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,8 +5,4 @@ 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 diff --git a/tox.ini b/tox.ini index 3b6a8f2..a646d11 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ usedevelop = true deps = zope.testrunner commands = - zope-testrunner --test-path=src [] + zope-testrunner --test-path=src {posargs:-vc} extras = test @@ -30,6 +30,7 @@ deps = flake8 check-manifest check-python-versions + wheel commands = flake8 src setup.py check-manifest @@ -45,14 +46,14 @@ deps = zope.testrunner commands = mkdir -p {toxinidir}/parts/htmlcov - coverage run -m zope.testrunner --test-path=src [] + coverage run -m zope.testrunner --test-path=src {posargs:-vc} coverage html coverage report -m --fail-under=100 [coverage:run] branch = True plugins = coverage_python_version -source = src +source = MultiMapping [coverage:report] precision = 2