Skip to content

Commit

Permalink
Merge pull request #22 from zms-publishing/config-with-zope-product
Browse files Browse the repository at this point in the history
Apply new common configuration
  • Loading branch information
dataflake committed Mar 29, 2021
2 parents 9d03677 + 2e82649 commit 36fa86c
Show file tree
Hide file tree
Showing 53 changed files with 297 additions and 353 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
62 changes: 62 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
name: tests

on:
push:
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", "docs"]
- ["3.8", "coverage"]
- ["2.7", "py27-zope2"]

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: Start and prepare MySQL service
run: |
sudo systemctl start mysql.service
echo 'CREATE DATABASE IF NOT EXISTS zmysqldatest;' | mysql -uroot -proot
echo "CREATE USER 'zmysqldatest'@'localhost' IDENTIFIED BY 'zmysqldatest';" | mysql -uroot -proot
echo "GRANT ALL PRIVILEGES ON zmysqldatest.* TO 'zmysqldatest'@'localhost';" | mysql -uroot -proot
- 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 }}
22 changes: 17 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
*.egg-info
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
*.egg-info/
*.profraw
*.pyc
*.swp
.coverage*
*.pyo
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
.vscode/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
develop/
dist/
docs/_build/
htmlcov/
docs/_build
eggs/
etc/
lib/
lib64
log/
parts/
pyvenv.cfg
var/
51 changes: 51 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "8e3ff0f1e85f122605b6f35fed07dcc93e02c502"

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

[coverage]
fail-under = 90

[isort]
known_third_party = "six, MySQLdb, pkg_resources"

[check-manifest]
additional-ignores = [
"docs/_build/html/_static/*",
]

[manifest]
additional-rules = [
"include buildout4.cfg",
"include buildout2.cfg",
"recursive-include src *.dtml",
"recursive-include src *.gif",
"recursive-include src *.svg",
]

[tox]
additional-envlist = [
"py27-zope2",
]
testenv-additional = [
"",
"[testenv:py27-zope2]",
"commands_pre =",
" {envbindir}/buildout -nc {toxinidir}/buildout2.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test",
"commands =",
" {envbindir}/test {posargs:-cv}",
]
use-flake8 = true

[github-actions]
additional-config = [
"- [\"2.7\", \"py27-zope2\"]",
]
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

16 changes: 10 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
include *.txt
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
include *.rst
include *.txt
include buildout.cfg
include tox.ini
include buildout*.cfg

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

recursive-include Products *.dtml
recursive-include Products *.gif
recursive-include Products *.py
recursive-include Products *.svg
recursive-include src *.py
include buildout4.cfg
include buildout2.cfg
recursive-include src *.dtml
recursive-include src *.gif
recursive-include src *.svg

0 comments on commit 36fa86c

Please sign in to comment.