Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring for buildout-recipe #25

Merged
merged 7 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 24 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# Generated from:
icemac marked this conversation as resolved.
Show resolved Hide resolved
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
[run]
source = $COVERAGE_HOME/src/zdaemon
omit = */__main__.py
source = zdaemon
plugins = coverage_python_version
branch = true
parallel = true
data_file = $COVERAGE_HOME/.coverage
data_file = $COVERAGE_HOME.coverage
omit = */__main__.py

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

[report]
precision = 2
exclude_lines =
pragma: nocover
except ImportError:
if __name__ == .__main__.:
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
Original file line number Diff line number Diff line change
@@ -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
57 changes: 57 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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"]
- ["pypy2", "pypy"]
- ["pypy3", "pypy3"]
- ["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 }}
28 changes: 23 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
*.egg-info/
*.profraw
*.pyc
*.egg-info
__pycache__
.tox/
*.pyo
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
.vscode/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
develop/
dist/
docs/_build
eggs/
etc/
lib/
lib64
log/
parts/
.coverage
.coverage.*
pyvenv.cfg
var/
33 changes: 33 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
[meta]
template = "buildout-recipe"
commit-id = "9536fe3d377f6b7ac9decad648118168d978eea3"

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

[coverage]
fail-under = 79

[coverage-run]
additional-config = [
"data_file = $COVERAGE_HOME.coverage",
"omit = */__main__.py",
]

[tox]
coverage-setenv = [
"COVERAGE_PROCESS_START={toxinidir}/.coveragerc",
"COVERAGE_HOME={toxinidir}/",
]

[manifest]
additional-rules = [
"recursive-include src *.conf",
"recursive-include src *.xml",
]
24 changes: 0 additions & 24 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 @@ Change log
4.4 (unreleased)
================

- Add support for Python 3.8.
- Add support for Python 3.8 and 3.9.

- Drop support for Python 3.4.

Expand Down
15 changes: 10 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/buildout-recipe
include *.rst
include *.txt
include tox.ini
include bootstrap.py
include buildout.cfg
include tox.ini
include .coveragerc

recursive-include src *

global-exclude *.pyc
recursive-include src *.pt
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
recursive-include src *.conf
recursive-include src *.xml