Skip to content

Commit

Permalink
Configuring for buildout-recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Oct 30, 2024
1 parent e238382 commit 3b9f44c
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 46 deletions.
28 changes: 0 additions & 28 deletions .coveragerc

This file was deleted.

16 changes: 9 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ jobs:
- ["ubuntu", "ubuntu-latest"]
config:
# [Python version, tox env]
- ["3.11", "release-check"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
- ["3.11", "release-check"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
- ["3.13", "py313"]
- ["pypy-3.10", "pypy3"]
- ["3.11", "coverage"]
- ["3.11", "coverage"]

runs-on: ${{ matrix.os[1] }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
Expand All @@ -38,6 +39,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config[0] }}
allow-prereleases: true
- name: Pip cache
uses: actions/cache@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
[meta]
template = "buildout-recipe"
commit-id = "51f62256"
commit-id = "f317618e"

[python]
with-pypy = true
Expand All @@ -13,7 +13,7 @@ with-macos = false
with-docs = false

[coverage]
fail-under = 19
fail-under = 18.5

[tox]
use-flake8 = true
Expand Down
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ repos:
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit
- repo: https://github.com/PyCQA/flake8
rev: "7.1.1"
hooks:
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ include *.txt
include buildout.cfg
include tox.ini
include .pre-commit-config.yaml
include .coveragerc

recursive-include src *.py
recursive-include src *.rst
Expand Down
25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe

[build-system]
requires = ["setuptools < 74"]
build-backend = "setuptools.build_meta"

[tool.coverage.run]
branch = true
source = ["z3c.recipe.i18n"]
parallel = true

[tool.coverage.report]
fail_under = 18.5
precision = 2
ignore_errors = true
show_missing = true
exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"]

[tool.coverage.html]
directory = "parts/htmlcov"

[tool.coverage.paths]
source = ["src/", ".tox/*/lib/python*/site-packages/", ".tox/pypy*/site-packages/"]
19 changes: 11 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,30 @@ envlist =
py310
py311
py312
py313
pypy3
coverage

[testenv]
usedevelop = true
deps =
setuptools < 69
setenv =
py312: VIRTUALENV_PIP=23.1.2
py312: PIP_REQUIRE_VIRTUALENV=0
setuptools < 74
commands =
zope-testrunner --test-path=src {posargs:-vc}
extras =
test

[testenv:setuptools-latest]
basepython = python3
deps =
git+https://github.com/pypa/setuptools.git\#egg=setuptools

[testenv:release-check]
description = ensure that the distribution is ready to release
basepython = python3
skip_install = true
deps =
setuptools < 74
twine
build
check-manifest
Expand Down Expand Up @@ -57,14 +61,13 @@ basepython = python3
allowlist_externals =
mkdir
setenv =
COVERAGE_PROCESS_START={toxinidir}/.coveragerc
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
deps =
coverage
setuptools < 69
coverage[toml]
commands =
mkdir -p {toxinidir}/parts/htmlcov
coverage erase
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
coverage combine
coverage html
coverage report -m --fail-under=19
coverage report

0 comments on commit 3b9f44c

Please sign in to comment.