Skip to content

Commit

Permalink
Merge cf8d671 into 9880499
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Jul 29, 2021
2 parents 9880499 + cf8d671 commit 988e7aa
Show file tree
Hide file tree
Showing 14 changed files with 271 additions and 84 deletions.
11 changes: 0 additions & 11 deletions .coveragerc

This file was deleted.

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,zcml}]
# 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
61 changes: 61 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,61 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: tests

on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
strategy:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ubuntu
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", "docs"]
- ["3.8", "coverage"]

runs-on: ${{ matrix.os }}-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 }}
46 changes: 27 additions & 19 deletions .gitignore
@@ -1,23 +1,31 @@
*.py[co]
*.mo
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
*.dll
*.egg-info/
*.profraw
*.pyc
*.pyo
*.so
.coverage
.coverage.*
.eggs/
.installed.cfg
.project
.pydevproject
.tox
__pycache__
bin
coverage
docs/_build/
develop-eggs
htmls
parts
*.egg-info
tags
htmls
include/
lib*
pip-selfcheck.json
.mr.developer.cfg
.tox/
.vscode/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
develop/
dist/
docs/_build
eggs/
etc/
lib/
lib64
log/
parts/
pyvenv.cfg
venv/
var/
42 changes: 42 additions & 0 deletions .meta.toml
@@ -0,0 +1,42 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "81a3fca06e30c8fba7256352591a7a298d676a41"

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

[tox]
testenv-deps = [
"zope.testrunner",
]
use-flake8 = false

[coverage]
fail-under = 95

[manifest]
additional-rules = [
"recursive-include src *.rst",
"recursive-include src *.zcml",
"recursive-include src *.pt",
"recursive-include src *.js",
"recursive-include src *.png",
"recursive-include src *.dot",
"recursive-include src *.ps",
"recursive-include src *.po",
"recursive-include src *.pot",
"recursive-include src *.css",
"recursive-include benchmark *.py",
]

[check-manifest]
additional-ignores = [
"docs/_build/**",
]
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -5,6 +5,10 @@ Changelog
4.2 (unreleased)
----------------

- Added Python 3.9 compatibility and testing.

- Applied `zopefoundation.meta` config

- Fixed tests for the `zope.schema.Bool` required default change.

- Fixed tests for the `zope.interface` `repr()` change.
Expand Down
27 changes: 19 additions & 8 deletions MANIFEST.in
@@ -1,13 +1,24 @@
global-include *.mo
include *.txt
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
include *.rst
include *.txt
include buildout.cfg
include dev.cfg
include tox.ini
include .travis.yml
include .coveragerc
recursive-include src/z3c/form *.zcml *.pt *.js *.rst *.png *.dot *.ps *.po *.pot *.css
recursive-include benchmark *.py

recursive-include docs *.rst
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs *.txt
recursive-include docs Makefile

recursive-include src *.py
recursive-include src *.rst
recursive-include src *.zcml
recursive-include src *.pt
recursive-include src *.js
recursive-include src *.png
recursive-include src *.dot
recursive-include src *.ps
recursive-include src *.po
recursive-include src *.pot
recursive-include src *.css
recursive-include benchmark *.py
7 changes: 0 additions & 7 deletions dev.cfg

This file was deleted.

2 changes: 0 additions & 2 deletions doc-requirements.txt

This file was deleted.

12 changes: 12 additions & 0 deletions setup.cfg
@@ -1,2 +1,14 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[bdist_wheel]
universal = 1

[flake8]
doctests = 1

[check-manifest]
ignore =
.editorconfig
.meta.toml
docs/_build/html/_sources/*
docs/_build/**
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -67,6 +67,7 @@ def alltests():
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Natural Language :: English',
'Operating System :: OS Independent',
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/testing.py
Expand Up @@ -606,7 +606,7 @@ def addTemplate(form, fname):


def saveHtml(content, fname):
path = os.path.join(os.getcwd(), 'htmls')
path = os.path.join(os.getcwd(), 'var', 'htmls')
if not os.path.exists(path):
os.makedirs(path)
fullfname = os.path.join(path, fname)
Expand Down

0 comments on commit 988e7aa

Please sign in to comment.