Skip to content

Commit

Permalink
Configuring for pure-python
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed May 15, 2020
1 parent c719033 commit 4be03b8
Show file tree
Hide file tree
Showing 8 changed files with 181 additions and 31 deletions.
39 changes: 39 additions & 0 deletions .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
29 changes: 21 additions & 8 deletions .gitignore
@@ -1,11 +1,24 @@
.installed.cfg
bin/
eggs/
develop-eggs/
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
*.egg-info/
*.profraw
*.pyc
__pycache__/
tags
TAGS
ID
*.pyo
.coverage
.coverage.*
.installed.cfg
.mr.developer.cfg
.tox/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
dist/
docs/_build
eggs/
htmlcov/
lib/
lib64
parts/
pyvenv.cfg
7 changes: 7 additions & 0 deletions .meta.cfg
@@ -0,0 +1,7 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = pure-python
commit-id = ee6aa5dbb1a7c31c7655fb0cefe0091b9fccf6c8
fail-under = 0

35 changes: 33 additions & 2 deletions .travis.yml
@@ -1,3 +1,34 @@
version: ~> 1.0
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
language: python
import: zopefoundation/meta:travis-ci-config/minimal.yml
python:
- 2.7
- pypy
- 3.5
- 3.6
- 3.7
- 3.8
- pypy3

matrix:
include:
- name: "lint"
python: 3.7
env: TOXENV="lint"
- name: "coverage"
python: 3.7
env: TOXENV="coverage"
after_success:
- coveralls

install:
- pip install -U pip
- pip install -U tox-travis coveralls

script:
- tox

notifications:
email: false

cache: pip
21 changes: 18 additions & 3 deletions MANIFEST.in
@@ -1,6 +1,21 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
include *.rst
include *.py
include *.txt
include buildout.cfg
include tox.ini
include .travis.yml
recursive-include src id-lang.map

exclude MANIFEST.in

recursive-include docs *.bat
recursive-include docs *.py
recursive-include docs *.rst
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
13 changes: 13 additions & 0 deletions setup.cfg
@@ -0,0 +1,13 @@
# 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
.travis.yml
File renamed without changes.
68 changes: 50 additions & 18 deletions tox.ini
@@ -1,30 +1,62 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[tox]
envlist = flake8,
py27,
py35,
py36,
py37,
py38,
pypy,
pypy3,
coverage
envlist =
lint,
py27,
pypy,
py35,
py36,
py37,
py38,
pypy3,
coverage

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

[testenv:coverage]
basepython = python3.7
[testenv:lint]
basepython = python3
skip_install = true
deps =
flake8
check-manifest
check-python-versions
commands =
coverage run -m zope.testrunner --test-path=src []
coverage report --fail-under=86
flake8 src setup.py
check-manifest
check-python-versions

[testenv:coverage]
basepython = python3
deps =
coverage
coverage-python-version
zope.testrunner
commands =
coverage run -m zope.testrunner --test-path=src []
coverage html
coverage report -m --fail-under=0

[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: nocover
except ImportError:
raise NotImplementedError
if __name__ == '__main__':
self.fail
raise AssertionError

[coverage:html]
directory = htmlcov

0 comments on commit 4be03b8

Please sign in to comment.