Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Merge e8b6729 into 03340fe
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jan 27, 2021
2 parents 03340fe + e8b6729 commit 8e0c490
Show file tree
Hide file tree
Showing 12 changed files with 199 additions and 53 deletions.
6 changes: 0 additions & 6 deletions .coveragerc

This file was deleted.

39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

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

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset
55 changes: 55 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: tests

on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday

jobs:
build:
strategy:
matrix:
config:
# [Python version, tox env]
- ["3.8", "lint"]
- ["2.7", "py27"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.8", "coverage"]

runs-on: ubuntu-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
*.egg-info/
*.py[co]
*.profraw
*.pyc
*.pyo
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
__pycache__/
bin/
build/
coverage.xml
htmlcov/
develop-eggs/
dist/
docs/_build
eggs/
lib/
lib64
parts/
pyvenv.cfg
15 changes: 15 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "ae6fbae62663edb6a8b62d2dbdfe0589f64b8844"

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

[coverage]
fail-under = 93
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Changes
1.1 (unreleased)
----------------

- Nothing changed yet.
- Add support for Python 3.5, 3.8 and 3.9.


1.0 (2018-12-21)
Expand Down
8 changes: 5 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
include *.rst
include *.txt
include .coveragerc
include buildout.cfg
include tox.ini

exclude MANIFEST.in

recursive-include src *.pt
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[bdist_wheel]
universal = 1

[flake8]
doctests = 1

[check-manifest]
ignore =
.editorconfig
.meta.toml
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ def read(path):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Internet :: WWW/HTTP',
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
71 changes: 54 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,30 +1,67 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[tox]
minversion = 3.18
envlist =
flake8,
py27,
py36,
py37,
coverage,
lint
py27
py35
py36
py37
py38
py39
coverage

[testenv]
usedevelop = true
deps =
zope.testrunner
commands =
zope-testrunner --test-path=src []
extras = test
extras =
test

[testenv:lint]
basepython = python3
skip_install = true
deps =
zope.testrunner
flake8
check-manifest
check-python-versions
commands =
flake8 src setup.py
check-manifest
check-python-versions

[testenv:coverage]
basepython = python3.7
commands =
coverage run -m zope.testrunner --test-path=src []
coverage report --fail-under=93
basepython = python3
allowlist_externals =
mkdir
deps =
zope.testrunner
coverage
coverage-python-version
zope.testrunner
commands =
mkdir -p {toxinidir}/parts/htmlcov
coverage run -m zope.testrunner --test-path=src []
coverage html
coverage report -m --fail-under=93

[testenv:flake8]
basepython = python3.6
skip_install = true
deps = flake8
commands = flake8 --doctests src setup.py
[coverage:run]
branch = True
plugins = coverage_python_version
source = src

[coverage:report]
precision = 2
exclude_lines =
pragma: no cover
pragma: nocover
except ImportError:
raise NotImplementedError
if __name__ == '__main__':
self.fail
raise AssertionError

[coverage:html]
directory = parts/htmlcov

0 comments on commit 8e0c490

Please sign in to comment.