Skip to content

Commit 1814aaa

Browse files
author
Michael Howitz
authored
Config with pure python (#209)
* Replace AppVeyor by GHA running on Windows. * Update datetime tests to Python 3.8.
1 parent 189ebb5 commit 1814aaa

23 files changed

+431
-451
lines changed

.editorconfig

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# EditorConfig Configurtaion file, for more details see:
1+
# Generated from:
2+
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
3+
#
4+
# EditorConfig Configuration file, for more details see:
25
# http://EditorConfig.org
36
# EditorConfig is a convention description, that could be interpreted
47
# by multiple editors to enforce common coding conventions for specific
@@ -25,7 +28,7 @@ max_line_length = off
2528
# 4 space indentation
2629
indent_size = 4
2730

28-
[*.{yml}]
31+
[*.{yml,zpt,pt,dtml,zcml}]
2932
# 2 space indentation
3033
indent_size = 2
3134

@@ -34,10 +37,3 @@ indent_size = 2
3437
indent_style = tab
3538
indent_size = unset
3639
tab_width = unset
37-
38-
[*.bat]
39-
indent_style = tab
40-
end_of_line = crlf
41-
42-
[LICENSE]
43-
insert_final_newline = false

.github/workflows/tests.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Generated from:
2+
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
3+
name: tests
4+
5+
on:
6+
push:
7+
pull_request:
8+
schedule:
9+
- cron: '0 12 * * 0' # run once a week on Sunday
10+
# Allow to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
strategy:
16+
# We want to see all failures:
17+
fail-fast: false
18+
matrix:
19+
os:
20+
- ubuntu
21+
- windows
22+
config:
23+
# [Python version, tox env]
24+
- ["3.8", "lint"]
25+
- ["2.7", "py27"]
26+
- ["3.5", "py35"]
27+
- ["3.6", "py36"]
28+
- ["3.7", "py37"]
29+
- ["3.8", "py38"]
30+
- ["3.9", "py39"]
31+
- ["3.8", "docs"]
32+
- ["3.8", "coverage"]
33+
- ["3.8", "py38-datetime"]
34+
exclude:
35+
- { os: windows, config: ["3.8", "lint"] }
36+
- { os: windows, config: ["3.8", "docs"] }
37+
- { os: windows, config: ["3.8", "coverage"] }
38+
39+
runs-on: ${{ matrix.os }}-latest
40+
name: ${{ matrix.os }}-${{ matrix.config[1] }}
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: Set up Python
44+
uses: actions/setup-python@v2
45+
with:
46+
python-version: ${{ matrix.config[0] }}
47+
- name: Pip cache
48+
uses: actions/cache@v2
49+
with:
50+
path: ~/.cache/pip
51+
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
52+
restore-keys: |
53+
${{ runner.os }}-pip-${{ matrix.config[0] }}-
54+
${{ runner.os }}-pip-
55+
- name: Install dependencies
56+
run: |
57+
python -m pip install --upgrade pip
58+
pip install tox
59+
- name: Test
60+
run: tox -e ${{ matrix.config[1] }}
61+
- name: Coverage
62+
if: matrix.config[1] == 'coverage'
63+
run: |
64+
pip install coveralls coverage-python-version
65+
coveralls --service=github
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 30 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,31 @@
1-
# Python
2-
*.py[cod]
3-
.cache
4-
/.Python
5-
6-
#PyENV
7-
/.python-version
8-
pyvenv.cfg
9-
10-
# Packages / zc.buildout
11-
*.egg
12-
*.egg-info
13-
/local.cfg
14-
/.eggs/
15-
/.installed.cfg
16-
/.mr.developer.cfg
17-
/_build/
18-
/bin/
19-
/_build/
20-
/develop-eggs/
21-
/dist/
22-
/eggs/
23-
/etc/
24-
/include/
25-
/lib/
26-
/local/
27-
/parts/
28-
/sdist/
29-
/share/
30-
/src-mrd/
31-
/var/
32-
33-
# Installer logs
34-
pip-log.txt
35-
pip-selfcheck.json
36-
.plone.versioncheck.cache
37-
.plone.versioncheck.tracked.json
38-
39-
# Unit test / coverage reports
40-
/.coverage*
41-
/coverage.xml
42-
/.tox
43-
.pytest_cache
44-
45-
#Translations
46-
*.mo
47-
48-
#Mr Developer
1+
# Generated from:
2+
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
3+
*.dll
4+
*.egg-info/
5+
*.profraw
6+
*.pyc
7+
*.pyo
8+
*.so
9+
.coverage
10+
.coverage.*
11+
.eggs/
12+
.installed.cfg
4913
.mr.developer.cfg
50-
51-
# local config
52-
local.cfg
53-
secret.cfg
54-
55-
# Codeintel
56-
.codeintel
57-
58-
# Editors specific
59-
/.idea/
60-
/.Python
61-
/.ropeproject/
62-
/.project
63-
/.pydevproject
64-
.mypy_cache/
65-
66-
# Import Data
67-
/*.csv
68-
69-
# JavaScript specific
70-
node_modules/
71-
72-
# MAC specifics
73-
.DS_Store
74-
default.profraw
14+
.tox/
15+
.vscode/
16+
__pycache__/
17+
bin/
18+
build/
19+
coverage.xml
20+
develop-eggs/
21+
develop/
22+
dist/
23+
docs/_build
24+
eggs/
25+
etc/
26+
lib/
27+
lib64
28+
log/
29+
parts/
30+
pyvenv.cfg
31+
var/

.meta.toml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Generated from:
2+
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
3+
[meta]
4+
template = "pure-python"
5+
commit-id = "81a3fca06e30c8fba7256352591a7a298d676a41"
6+
7+
[python]
8+
with-pypy = false
9+
with-legacy-python = true
10+
with-docs = true
11+
with-sphinx-doctests = true
12+
with-windows = true
13+
with-future-python = false
14+
15+
[tox]
16+
use-flake8 = true
17+
additional-envlist = [
18+
"py38-datetime",
19+
"combined-coverage",
20+
]
21+
testenv-deps = [
22+
"datetime: DateTime",
23+
"-cconstraints.txt",
24+
"pytest-cov",
25+
"coverage-python-version",
26+
]
27+
testenv-setenv = [
28+
"COVERAGE_FILE=.coverage.{envname}",
29+
]
30+
testenv-commands = [
31+
"python -V",
32+
"pip list",
33+
"pytest --cov=src --cov=tests --cov-report= {posargs}",
34+
]
35+
testenv-additional = [
36+
"",
37+
"[testenv:combined-coverage]",
38+
"basepython = python3",
39+
"allowlist_externals =",
40+
" mkdir",
41+
"deps =",
42+
" coverage",
43+
" coverage-python-version",
44+
" # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it:",
45+
" Sphinx < 4",
46+
" -cconstraints.txt",
47+
"setenv =",
48+
" COVERAGE_FILE=.coverage",
49+
"commands =",
50+
" mkdir -p {toxinidir}/parts/htmlcov",
51+
" coverage combine",
52+
" coverage html",
53+
" coverage report -m --fail-under=100",
54+
"depends = py27,py35,py36,py38-datetime,py37,py38,py39,coverage",
55+
]
56+
coverage-basepython = "python3.8"
57+
coverage-command = "pytest --cov=src --cov=tests --cov-report= {posargs}"
58+
coverage-setenv = [
59+
"COVERAGE_FILE=.coverage",
60+
]
61+
62+
[coverage]
63+
fail-under = 99.2
64+
65+
[manifest]
66+
additional-rules = [
67+
"recursive-include docs *.ast",
68+
"recursive-include docs *.bat",
69+
"recursive-include docs *.jpg",
70+
"recursive-include tests *.py",
71+
]
72+
73+
[check-manifest]
74+
additional-ignores = [
75+
"docs/CHANGES.rst",
76+
"docs/_build/html/_images/*",
77+
"docs/_build/html/_sources/contributing/*",
78+
"docs/_build/html/_sources/install/*",
79+
"docs/_build/html/_sources/roadmap/*",
80+
"docs/_build/html/_sources/upgrade_dependencies/*",
81+
"docs/_build/html/_sources/usage/*",
82+
]
83+
84+
[github-actions]
85+
additional-config = [
86+
"- [\"3.8\", \"py38-datetime\"]",
87+
]

.travis.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

CHANGES.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ Fixes
4646
Breaking changes
4747
++++++++++++++++
4848

49-
- Revert the Allowance of the ``...`` (Ellipsis) statement, as of 4.0. It is not needed to support Python 3.8.
50-
The security implications of the Ellipsis Statement is not 100 % clear and is not checked.
51-
``...`` (Ellipsis) is disallowed again.
49+
- Revert the allowance of the ``...`` (Ellipsis) statement, as of 4.0. It is
50+
not needed to support Python 3.8.
51+
The security implications of the Ellipsis Statement is not 100 % clear and is
52+
not checked. ``...`` (Ellipsis) is disallowed again.
5253

5354
Features
5455
++++++++

MANIFEST.in

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
1-
include *.py
1+
# Generated from:
2+
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
23
include *.rst
34
include *.txt
45
include buildout.cfg
56
include tox.ini
67

7-
include .editorconfig
8-
exclude .editorconfig
9-
10-
include *.yml
11-
exclude *.yml
12-
13-
include .gitignore
14-
exclude .gitignore
15-
16-
exclude MANIFEST.in
17-
18-
recursive-include docs *.ast
19-
recursive-include docs *.bat
20-
recursive-include docs *.jpg
218
recursive-include docs *.py
229
recursive-include docs *.rst
10+
recursive-include docs *.txt
2311
recursive-include docs Makefile
12+
2413
recursive-include src *.py
14+
recursive-include docs *.ast
15+
recursive-include docs *.bat
16+
recursive-include docs *.jpg
2517
recursive-include tests *.py

0 commit comments

Comments
 (0)