Skip to content

Commit

Permalink
Rename and integrate into meta/config. (#44)
Browse files Browse the repository at this point in the history
* Rename and integrate into meta/config.

* Restrict to pytest 7 to get it working for now.

* Add support for Python 3.12 (#46)

Co-authored-by: Wolfgang Schnerring <wolfgang.schnerring@zeit.de>
  • Loading branch information
icemac and wosc committed May 15, 2024
1 parent 83af9f1 commit 7fc1b2c
Show file tree
Hide file tree
Showing 95 changed files with 591 additions and 308 deletions.
10 changes: 0 additions & 10 deletions .coveragerc

This file was deleted.

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/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
43 changes: 27 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
type: [ "opened", "reopened", "synchronize" ]
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
tests:
build:
strategy:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ["ubuntu", "ubuntu-latest"]
config:
# [Python version, tox env]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["pypy-3.7", "pypy3"]
- ["3.9", "coverage"]
runs-on: ubuntu-latest
- ["3.9", "release-check"]
- ["3.9", "lint"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
- ["pypy-3.10", "pypy3"]
- ["3.9", "docs"]
- ["3.9", "coverage"]

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[1] }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.*', 'tox.ini') }}
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: |
Expand All @@ -47,7 +58,7 @@ jobs:
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 25 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
syntax: glob

*.egg-info
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
*.dll
*.egg-info/
*.profraw
*.pyc
*.swp
.DS_Store
.cache
*.pyo
*.so
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.pytest_cache/
.tox/
__pycache__
bin
build
coverage-report
.vscode/
__pycache__/
bin/
build/
coverage.xml
develop-eggs
dist
doc/_api
eggs
include
junit-*.xml
lib
local
local.cfg
parts
develop-eggs/
develop/
dist/
docs/_build
eggs/
etc/
lib/
lib64
log/
parts/
pyvenv.cfg
testing.log
var/
44 changes: 44 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "7713fd86"

[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 = [
"pytest []"
]
testenv-deps = [
"pytest",
"pytest-cov",
"pytest-remove-stale-bytecode",
]
coverage-command = [
"pytest --cov=src --cov-report=html []",
]

[coverage]
fail-under = 98

[flake8]
additional-config = [
"# E501 line too long",
"per-file-ignores =",
" src/zope/pytestlayer/tests/test_integration.py: E501",
]

[manifest]
additional-rules = [
"include *.yaml",
"include pytest.ini",
"recursive-include src *.txt",
]
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: flake8
language_version: python3
additional_dependencies: [flake8-typing-imports==1.14.0]
args: ["--per-file-ignores=src/gocept/pytestlayer/tests/test_integration.py:E501"]
args: ["--per-file-ignores=src/zope/pytestlayer/tests/test_integration.py:E501"]
- repo: https://github.com/hhatto/autopep8
rev: v2.0.4
hooks:
Expand Down
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
9 changes: 7 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
=================================
Change log for gocept.pytestlayer
Change log for zope.pytestlayer
=================================

8.2 (unreleased)
================

- Make tests compatible with pytest >= 7.3.
- Make tests compatible with pytest >= 7.3. (Caution: We do not yet support
pytest >= 8)

- Add support for Python 3.11.

- Add support for Python 3.12.

- Rename from ``gocept.pytestlayer`` to ``zope.pytestlayer``.


8.1 (2022-09-05)
================
Expand Down
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/pure-python
-->
# 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.
1 change: 1 addition & 0 deletions COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2013-2016, 2021 gocept gmbh & co. kg
Copyright (c) 2024 Zope Foundation and contributors
All Rights Reserved.

This software is subject to the provisions of the Zope Public License,
Expand Down
16 changes: 8 additions & 8 deletions HACKING.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
=============================
Developing gocept.pytestlayer
=============================
===========================
Developing zope.pytestlayer
===========================

:Author:
`gocept <http://gocept.com/>`_ <mail@gocept.com>,
gocept,
Godefroid Chapelle <gotcha@bubblenet.be>

:PyPI page:
http://pypi.python.org/pypi/gocept.pytestlayer/
https://pypi.org/project/zope.pytestlayer/

:Issues:
https://github.com/gocept/gocept.pytestlayer/issues
https://github.com/gocept/zope.pytestlayer/issues

:Source code:
https://github.com/gocept/gocept.pytestlayer
https://github.com/zope/zope.pytestlayer

:Current change log:
https://raw.githubusercontent.com/gocept/gocept.pytestlayer/master/CHANGES.rst
https://raw.githubusercontent.com/zope/zope.pytestlayer/master/CHANGES.rst
15 changes: 10 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
include *.md
include *.rst
include *.txt
include .coveragerc
include buildout.cfg
include pytest.ini
include tox.ini
include *.yaml

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

recursive-include src *.py
include *.yaml
include pytest.ini
recursive-include src *.txt
Loading

0 comments on commit 7fc1b2c

Please sign in to comment.