diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 8f0d530..0000000 --- a/.coveragerc +++ /dev/null @@ -1,8 +0,0 @@ -[run] -source = zope.dublincore - -[report] -exclude_lines = - pragma: no cover - if __name__ == '__main__': - raise NotImplementedError diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f3e46f5 --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..1079b83 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,57 @@ +# 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"] + - ["pypy2", "pypy"] + - ["pypy3", "pypy3"] + - ["3.8", "docs"] + - ["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-${{ hashFiles('setup.*', 'tox.ini') }} + restore-keys: | + ${{ 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 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 59023f6..7bd5e56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,24 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/pure-python *.egg-info/ +*.profraw *.pyc +*.pyo .coverage +.coverage.* .installed.cfg +.mr.developer.cfg .tox/ +__pycache__/ bin/ +build/ coverage.xml develop-eggs/ -docs/_build/ +dist/ +docs/_build +eggs/ htmlcov/ lib/ -nosetests.xml +lib64 +parts/ pyvenv.cfg diff --git a/.meta.cfg b/.meta.cfg new file mode 100644 index 0000000..ec8f8cc --- /dev/null +++ b/.meta.cfg @@ -0,0 +1,10 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/pure-python +[meta] +template = pure-python +commit-id = 7139a1ecd82333471a42824a6e11b160bc1d6594 +with-pypy = True +with-docs = True +with-sphinx-doctests = True +fail-under = 92 + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7be8500..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: python -python: - - 2.7 - - 3.6 - - 3.7 - - 3.8 - - 3.9 - - pypy - - pypy3 - -matrix: - include: - - name: "lint" - python: 3.6 - install: - - pip install -U tox - script: - - tox -e lint - after_success: - -install: - - pip install -U pip setuptools - - pip install -U coverage coveralls - - pip install -U -e .[test,docs] - -script: - - coverage run -m zope.testrunner --test-path=src - - coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctest -after_success: - - coveralls -notifications: - email: false -cache: pip -before_cache: - - rm -f $HOME/.cache/pip/log/debug.log diff --git a/CHANGES.rst b/CHANGES.rst index b1a9660..6dda8f8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ Changes 4.3.1 (unreleased) ------------------ -- Nothing changed yet. +- Add back support for Python 3.5. 4.3.0 (2020-10-14) diff --git a/MANIFEST.in b/MANIFEST.in index c71c1ec..8bbe95c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,14 +1,21 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/pure-python include *.rst include *.txt include buildout.cfg include tox.ini -include .travis.yml include .coveragerc -recursive-include src *.pt -recursive-include src *.zcml - recursive-include docs *.bat recursive-include docs *.py recursive-include docs *.rst +recursive-include docs *.txt recursive-include docs Makefile + +recursive-include src *.gif +recursive-include src *.pt +recursive-include src *.py +recursive-include src *.rst +recursive-include src *.txt +recursive-include src *.xml +recursive-include src *.zcml diff --git a/setup.cfg b/setup.cfg index 7c06b42..92fc4d8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,14 @@ -[aliases] -dev = develop easy_install zope.dublincore[testing] -docs = easy_install zope.dublincore[docs] - +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/pure-python [bdist_wheel] universal = 1 + +[flake8] +doctests = 1 + +[check-manifest] +ignore = + .editorconfig + .meta.cfg + docs/_build/html/_sources/* + docs/_build/doctest/* diff --git a/setup.py b/setup.py index e82074a..5ec3039 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,7 @@ 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', diff --git a/tox.ini b/tox.ini index 9de271f..32f8150 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,18 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/pure-python [tox] envlist = lint, py27, - pypy, + py35, py36, py37, py38, py39, + pypy, pypy3, - coverage, - docs + docs, + coverage [testenv] usedevelop = true @@ -34,25 +37,39 @@ commands = check-manifest check-python-versions -[flake8] -doctests = 1 +[testenv:docs] +basepython = python3 +commands = + sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html + sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest [testenv:coverage] -usedevelop = true -basepython = - python2.7 +basepython = python3 +deps = + coverage + coverage-python-version + zope.testrunner commands = coverage run -m zope.testrunner --test-path=src [] coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest - coverage report coverage html -deps = - coverage + coverage report -m --fail-under=92 +[coverage:run] +branch = True +plugins = coverage_python_version +source = src -[testenv:docs] -basepython = - python2.7 -commands = - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html - sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest +[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 = htmlcov