-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from OpenNTI/native-ns-pkg
Drop support for < 3.10; use native namespace packages.
- Loading branch information
Showing
20 changed files
with
161 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Keep GitHub Actions up to date with GitHub's Dependabot... | ||
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
groups: | ||
github-actions: | ||
patterns: | ||
- "*" # Group all Actions updates into a single larger pull request | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,79 @@ | ||
# 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: | ||
on: [push, pull_request] | ||
|
||
env: | ||
PYTHONHASHSEED: 1042466059 | ||
ZOPE_INTERFACE_STRICT_IRO: 1 | ||
# To use editable installs of our nti namespace package combined with | ||
# non-editable installs of other packages, you must set this. | ||
# This is because setuptools has become broken thanks to PEP660. | ||
# Adding the pkg_util line to __init__.py is a partial workaround, | ||
# When it is loaded first on the path. | ||
# | ||
# With setuptools 75.3.0, nothing else worked for all the tools: not | ||
# a strict editable_mode, not an empty __init__.py, | ||
# | ||
# See https://github.com/pypa/pip/issues/11587 | ||
# And https://github.com/pypa/setuptools/issues/4039 | ||
PYTHONPATH: src | ||
|
||
|
||
|
||
jobs: | ||
build: | ||
test: | ||
strategy: | ||
# We want to see all failures: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ["ubuntu", "ubuntu-latest"] | ||
config: | ||
# [Python version, tox env] | ||
- ["3.12", "lint"] | ||
- ["3.8", "py38"] | ||
- ["3.9", "py39"] | ||
- ["3.10", "py310"] | ||
- ["3.11", "py311"] | ||
- ["3.12", "py312"] | ||
- ["3.13.0-beta.1", "py313"] | ||
- ["pypy-3.10", "pypy3"] | ||
- ["3.12", "docs"] | ||
- ["3.12", "coverage"] | ||
python-version: | ||
- "pypy-3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
extras: | ||
- "[test,docs]" | ||
include: | ||
- python-version: "3.13" | ||
extras: "[test,docs,gevent,pyramid]" | ||
|
||
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] }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.config[0] }} | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: setup.py | ||
cache-dependency-path: 'setup.py' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
python -m pip install -U pip setuptools wheel | ||
python -m pip install -U coverage | ||
python -m pip install -v -U -e ".${{ matrix.extras }}" --config-settings editable_mode=compat | ||
python -c 'from nti import transactions; print(transactions)' | ||
ls -l /opt/hostedtoolcache/Py*/*/*/lib/*/site-packages/nti | ||
cat /opt/hostedtoolcache/Py*/*/*/lib/*/site-packages/nti/*py | ||
cat /opt/hostedtoolcache/Py*/*/*/lib/*/site-packages/*.pth | ||
- 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 }} | ||
python -m coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress | ||
coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctests | ||
coverage combine || true | ||
coverage report -i || true | ||
- name: Lint | ||
if: matrix.python-version == '3.12' | ||
run: | | ||
python -m pip install -U pylint | ||
pylint nti.transactions | ||
- name: Submit to Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
parallel: true | ||
|
||
coveralls_finish: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
parallel-finished: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[build-system] | ||
requires = [ | ||
"wheel", | ||
"setuptools>=75.3", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover | ||
from pkgutil import extend_path; __path__ = extend_path(__path__, __name__) # pylint:disable=multiple-statements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.