Skip to content

Commit

Permalink
Merge pull request #10 from zopefoundation/config-with-pure-python
Browse files Browse the repository at this point in the history
Config with pure python and lint the code and fix test failures.
  • Loading branch information
Michael Howitz committed Jan 18, 2021
2 parents 9fa7a9d + 610bac7 commit 78c66a2
Show file tree
Hide file tree
Showing 96 changed files with 524 additions and 362 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
57 changes: 57 additions & 0 deletions .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", "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 }}
25 changes: 17 additions & 8 deletions .gitignore
@@ -1,16 +1,25 @@
__pycache__
.coverage*
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
*.egg-info/
*.profraw
*.pyc
*.pyo
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox
*.pyc
*.swp
.tox/
__pycache__/
bin/
dev/
build/
coverage.xml
develop-eggs/
dist/
docs/_build
eggs/
htmlcov/
lib/
lib64
parts/
pip-selfcheck.json
pyvenv.cfg
src/*.egg-info
32 changes: 32 additions & 0 deletions .meta.toml
@@ -0,0 +1,32 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "13207dce4ea1a51f579fedbf1b41b30fb60d4216"

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

[coverage]
fail-under = 93

[manifest]
additional-rules = [
"recursive-include src *.cache",
"recursive-include src *.css",
"recursive-include src *.empty",
"recursive-include src *.html",
"recursive-include src *.mtl",
]

[flake8]
additional-config = [
"# F401 imported but unused",
"# F403 unable to detect undefined names",
"per-file-ignores =",
" src/grokcore/view/__init__.py: F401 F403",
]
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion CHANGES.txt
Expand Up @@ -4,7 +4,9 @@ Changes
3.2 (unreleased)
----------------

- Nothing changed yet.
- Add support for Python 3.7, 3.8 and 3.9.

- Drop support for Python 3.4.


3.1 (2018-06-13)
Expand Down
19 changes: 15 additions & 4 deletions MANIFEST.in
@@ -1,6 +1,17 @@
include *.txt
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
include *.rst
include bootstrap.py
include *.txt
include buildout.cfg
include .travis.yml
recursive-include src *.pt *.py *.txt *.zcml *.html *.zpt *.mtl *.css
include tox.ini

recursive-include src *.pt
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
recursive-include src *.cache
recursive-include src *.css
recursive-include src *.empty
recursive-include src *.html
recursive-include src *.mtl
178 changes: 0 additions & 178 deletions bootstrap.py

This file was deleted.

0 comments on commit 78c66a2

Please sign in to comment.