Skip to content

Commit

Permalink
Config with buildout recipe (#7)
Browse files Browse the repository at this point in the history
* Configuring for buildout-recipe
* Lint the code.
* Add support for Python 3.5, 3.6, 3.7, 3.8 and 3.9.
* Drop support for Python 2.6.
  • Loading branch information
Michael Howitz committed Feb 2, 2021
1 parent 1d44f7c commit 2da49bc
Show file tree
Hide file tree
Showing 15 changed files with 345 additions and 297 deletions.
28 changes: 28 additions & 0 deletions .coveragerc
@@ -0,0 +1,28 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
[run]
source = zc.recipe.deployment
plugins = coverage_python_version
branch = true
parallel = true

[paths]
source =
src/
.tox/*/lib/python*/site-packages/
.tox/pypy*/site-packages/

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

[html]
directory = parts/htmlcov
39 changes: 39 additions & 0 deletions .editorconfig
@@ -0,0 +1,39 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
#
# 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
@@ -0,0 +1,55 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
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 }}
56 changes: 22 additions & 34 deletions .gitignore
@@ -1,36 +1,24 @@
*.py[cod]

# C extensions
*.so

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
__pycache__

# Installer logs
pip-log.txt

# Unit test / coverage reports
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
*.egg-info/
*.profraw
*.pyc
*.pyo
.coverage
.tox
nosetests.xml

# Translations
*.mo

# Mr Developer
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.project
.pydevproject
.tox/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
dist/
docs/_build
eggs/
lib/
lib64
parts/
pyvenv.cfg
20 changes: 20 additions & 0 deletions .meta.toml
@@ -0,0 +1,20 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
[meta]
template = "buildout-recipe"
commit-id = "ae6fbae62663edb6a8b62d2dbdfe0589f64b8844"

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

[coverage]
fail-under = 91

[manifest]
additional-rules = [
"recursive-include src *.test",
]
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

8 changes: 7 additions & 1 deletion CHANGES.rst
@@ -1,7 +1,13 @@
Changes
*******

- Python 3 support.
1.4.0 (unreleased)
==================

- Add support for Python 3.5, 3.6, 3.7, 3.8 and 3.9.

- Drop support for Python 2.6.


1.3.0 (2015-11-11)
==================
Expand Down
16 changes: 13 additions & 3 deletions MANIFEST.in
@@ -1,4 +1,14 @@
recursive-include src/zc *.txt
recursive-include src/zc *.test
include *.txt
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
include *.rst
include *.txt
include buildout.cfg
include tox.ini
include .coveragerc

recursive-include src *.pt
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
recursive-include src *.test

0 comments on commit 2da49bc

Please sign in to comment.