Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to meta/config. #57

Merged
merged 3 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/toolkit
#
# 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
50 changes: 28 additions & 22 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Loosely based on:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/toolkit
name: tests

on:
Expand All @@ -16,40 +16,46 @@ jobs:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ["ubuntu", "ubuntu-20.04"]
config:
# [Python version, extra dependencies]
- ["3.7", "py37"]
- ["3.8", "py3"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
# [Python version, tox env]
- ["3.9", "lint"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["pypy-3.9", "pypy3"]
- ["3.9", "docs"]

runs-on: ubuntu-latest
runs-on: ${{ matrix.os[1] }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: ${{ matrix.config[0] }}
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config[0] }}
- name: Install library dependencies
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxslt1-dev
- name: Cache Python wheels and eggs
- name: Pip cache
uses: actions/cache@v3
with:
path: |
~/.cache/pip
eggs
key: ${{ runner.os }}-py-${{ matrix.config[0] }}-${{ hashFiles('buildout.cfg') }}
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-py-${{ matrix.config[0] }}-
${{ runner.os }}-py-
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install -U pip tox
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
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 21 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/toolkit
*.dll
*.egg-info/
*.profraw
*.pyc
*.pyo
*.so
*.egg-info
__pycache__
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
build/
.vscode/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
download-cache/
eggs/
parts/
src/
develop/
dist/
docs/_build
include/
eggs/
etc/
lib/
lib64
pip-selfcheck.json
log/
parts/
pyvenv.cfg
testing.log
var/
22 changes: 22 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/toolkit
[meta]
template = "toolkit"
commit-id = "faabd7e5"

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

[tox]
use-flake8 = true
testenv-commands = [
"{envdir}/bin/test-ztk {posargs:-cv}",
]

[coverage]
fail-under = "not applicable"
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
Generated from:
https://github.com/zopefoundation/meta/tree/master/config/toolkit
-->
# Contributing to zopefoundation projects

The projects under the zopefoundation GitHub organization are open source and
welcome contributions in different forms:

* bug reports
* code improvements and bug fixes
* documentation improvements
* pull request reviews

For any changes in the repository besides trivial typo fixes you are required
to sign the contributor agreement. See
https://www.zope.dev/developer/becoming-a-committer.html for details.

Please visit our [Developer
Guidelines](https://www.zope.dev/developer/guidelines.html) if you'd like to
contribute code changes and our [guidelines for reporting
bugs](https://www.zope.dev/developer/reporting-bugs.html) if you want to file a
bug report.
14 changes: 14 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/toolkit
include *.md
include *.rst
include *.txt
include buildout.cfg
include tox.ini

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

recursive-include src *.py
21 changes: 0 additions & 21 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,16 @@ extends =

parts =
test-ztk
sphinx
ztk-docs
checkversions

extensions = mr.developer

allow-picked-versions = false
versions = versions

[test-ztk]
# individual test runners for the ztk
recipe = z3c.recipe.compattest
include = ${ztk:packages}

[sphinx]
recipe = zc.recipe.egg
eggs =
Sphinx
repoze.sphinx.autointerface
sphinxcontrib.applehelp
lxml
${ztk:packages}
interpreter = sphinx-py

[ztk-docs]
recipe = collective.recipe.cmd
on_install = true
on_update = true
cmds =
${buildout:directory}/bin/sphinx-build -q -b html -d ${buildout:directory}/docs/_build/doctrees -a -W ${buildout:directory}/docs ${buildout:directory}/docs/_build/html

[checkversions]
# script to find newer versions
recipe = zc.recipe.egg
Expand Down
2 changes: 2 additions & 0 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Sphinx
repoze.sphinx.autointerface
Loading