Skip to content

Commit

Permalink
Add support for Python 3.9. (#99)
Browse files Browse the repository at this point in the history
* Add support for Python 3.9.
* Configuring for zope-product
* Apply isort rules.
* Make sure tests can run in parallel.
  • Loading branch information
Michael Howitz committed Jan 26, 2021
1 parent c46e0a4 commit b0e6ef2
Show file tree
Hide file tree
Showing 119 changed files with 249 additions and 367 deletions.
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/zope-product
#
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
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 }}
47 changes: 16 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,39 +1,24 @@
*.egg
*.egg-info
*.mo
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
*.egg-info/
*.profraw
*.pyc
*.pyo
.coverage
.coverage.*
.eggs
.eggs/
.installed.cfg
.mr.developer.cfg
.Python
.tox
bin
build
.tox/
__pycache__/
bin/
build/
coverage.xml
develop-eggs
dist
default.profraw
downloads
eggs
htmlcov
local.cfg
parts
src
var
/include
/lib*
pip-selfcheck.json
develop-eggs/
dist/
docs/_build
eggs/
lib/
lib64
parts/
pyvenv.cfg
/src
docs/_build/

# VirtualEnv on Windows:
Include/
Lib/
Scripts/

# Editor Backups:
*~
29 changes: 29 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "fa5e2a952a937751fc91774c2c9d2e429a8e02ed"

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

[coverage]
fail-under = 92

[isort]
known_first_party = "Products.PluginIndexes, Products.ZCTextIndex, Products.ZCatalog"

[manifest]
additional-rules = [
"include buildout4.cfg",
"recursive-include docs *.py",
"recursive-include docs *.rst",
"recursive-include docs Makefile",
"recursive-include src *.png",
"recursive-include src *.xml",
"recursive-include src *.zpt",
]
34 changes: 0 additions & 34 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 @@ -4,7 +4,7 @@ Changelog
2.0.4 (unreleased)
------------------

- Nothing changed yet.
- Add support for Python 3.9.


2.0.3 (2020-09-28)
Expand Down
20 changes: 12 additions & 8 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
include *.rst
include *.txt
include buildout.cfg
include tox.ini

exclude MANIFEST.in

recursive-include Products *.png
recursive-include Products *.txt
recursive-include Products *.xml
recursive-include Products *.zcml
recursive-include Products *.pt
recursive-include Products *.zpt
recursive-include src *.pt
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
include buildout4.cfg
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs Makefile
recursive-include src *.png
recursive-include src *.xml
recursive-include src *.zpt

0 comments on commit b0e6ef2

Please sign in to comment.