Skip to content

Commit 9d20984

Browse files
authored
Merge pull request #10 from dataflake/config-with-zope-product-template-9fcd3d67
Drop Python 3.7, 3.8, 3.9, add Python 3.13, 3.14, convert to PEP 420
2 parents 7c68e78 + 5a6d129 commit 9d20984

24 files changed

+288
-211
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
33
#
44
# EditorConfig Configuration file, for more details see:
5-
# http://EditorConfig.org
5+
# https://EditorConfig.org
66
# EditorConfig is a convention description, that could be interpreted
77
# by multiple editors to enforce common coding conventions for specific
88
# file types

.github/workflows/pre-commit.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Generated from:
2+
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
3+
name: pre-commit
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- master
10+
# Allow to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
env:
14+
FORCE_COLOR: 1
15+
16+
jobs:
17+
pre-commit:
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
name: linting
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v5
25+
- uses: actions/setup-python@v6
26+
with:
27+
python-version: '3.13'
28+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1
29+
with:
30+
extra_args: --all-files --show-diff-on-failure
31+
env:
32+
PRE_COMMIT_COLOR: always
33+
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 #v1.1.0
34+
if: always()
35+
with:
36+
msg: Apply pre-commit code formatting

.github/workflows/tests.yml

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,55 +12,57 @@ on:
1212

1313
jobs:
1414
build:
15+
permissions:
16+
contents: read
17+
pull-requests: write
1518
strategy:
1619
# We want to see all failures:
1720
fail-fast: false
1821
matrix:
1922
os:
20-
- ["ubuntu", "ubuntu-20.04"]
23+
- ["ubuntu", "ubuntu-latest"]
2124
config:
2225
# [Python version, tox env]
23-
- ["3.9", "release-check"]
24-
- ["3.9", "lint"]
25-
- ["3.7", "py37"]
26-
- ["3.8", "py38"]
27-
- ["3.9", "py39"]
28-
- ["3.10", "py310"]
29-
- ["3.11", "py311"]
30-
- ["3.12", "py312"]
31-
- ["3.9", "docs"]
32-
- ["3.9", "coverage"]
26+
- ["3.11", "release-check"]
27+
- ["3.10", "py310"]
28+
- ["3.11", "py311"]
29+
- ["3.12", "py312"]
30+
- ["3.13", "py313"]
31+
- ["3.14", "py314"]
32+
- ["3.11", "docs"]
33+
- ["3.11", "coverage"]
3334

3435
runs-on: ${{ matrix.os[1] }}
3536
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
3637
name: ${{ matrix.config[1] }}
3738
steps:
38-
- uses: actions/checkout@v3
39-
- name: Set up Python
40-
uses: actions/setup-python@v4
39+
- uses: actions/checkout@v5
4140
with:
42-
python-version: ${{ matrix.config[0] }}
43-
- name: Pip cache
44-
uses: actions/cache@v3
45-
with:
46-
path: ~/.cache/pip
47-
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
48-
restore-keys: |
49-
${{ runner.os }}-pip-${{ matrix.config[0] }}-
50-
${{ runner.os }}-pip-
51-
- name: Install dependencies
41+
persist-credentials: false
42+
- name: Install additional dependencies
5243
run: |
53-
python -m pip install --upgrade pip
54-
pip install tox
5544
set -ex
5645
sudo apt update
5746
sudo apt install -y ldap-utils slapd libldap2-dev libsasl2-dev
47+
- name: Install uv + caching
48+
# astral/setup-uv@7.1.3
49+
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3
50+
with:
51+
enable-cache: true
52+
cache-dependency-glob: |
53+
setup.*
54+
tox.ini
55+
python-version: ${{ matrix.config[0] }}
56+
github-token: ${{ secrets.GITHUB_TOKEN }}
5857
- name: Test
59-
run: tox -e ${{ matrix.config[1] }}
58+
if: ${{ !startsWith(runner.os, 'Mac') }}
59+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
60+
- name: Test (macOS)
61+
if: ${{ startsWith(runner.os, 'Mac') }}
62+
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
6063
- name: Coverage
6164
if: matrix.config[1] == 'coverage'
6265
run: |
63-
pip install coveralls
64-
coveralls --service=github
66+
uvx coveralls --service=github
6567
env:
6668
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.meta.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
33
[meta]
44
template = "zope-product"
5-
commit-id = "acd8d239"
5+
commit-id = "9fcd3d67"
66

77
[python]
88
with-windows = false
@@ -26,6 +26,7 @@ additional-rules = [
2626
[check-manifest]
2727
additional-ignores = [
2828
"docs/_build/html/_static/*",
29+
"docs/_build/html/_static/scripts/*",
2930
]
3031

3132
[coverage]

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated from:
2+
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
3+
minimum_pre_commit_version: '3.6'
4+
repos:
5+
- repo: https://github.com/pycqa/isort
6+
rev: "7.0.0"
7+
hooks:
8+
- id: isort
9+
- repo: https://github.com/hhatto/autopep8
10+
rev: "v2.3.2"
11+
hooks:
12+
- id: autopep8
13+
args: [--in-place, --aggressive, --aggressive]
14+
- repo: https://github.com/asottile/pyupgrade
15+
rev: v3.21.0
16+
hooks:
17+
- id: pyupgrade
18+
args: [--py310-plus]
19+
- repo: https://github.com/isidentical/teyit
20+
rev: 0.4.3
21+
hooks:
22+
- id: teyit
23+
- repo: https://github.com/PyCQA/flake8
24+
rev: "7.3.0"
25+
hooks:
26+
- id: flake8
27+
additional_dependencies:
28+
- flake8-debugger == 4.1.2

CHANGES.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ releases, see the file `HISTORY.txt` in this folder.
88
----------------
99

1010

11+
- Add support for Python 3.13, 3.14.
12+
13+
- Drop support for Python 3.7, 3.8, 3.9.
14+
1115
5.2 (2024-01-03)
1216
----------------
1317
- update to latest zope meta config templates

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
Generated from:
3+
https://github.com/zopefoundation/meta/tree/master/config/zope-product
4+
-->
15
# Contributing to dataflake projects
26

37
The projects under the dataflake GitHub organization are open source and

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ include *.rst
55
include *.txt
66
include buildout.cfg
77
include tox.ini
8+
include .pre-commit-config.yaml
89

910
recursive-include docs *.py
1011
recursive-include docs *.rst

buildout.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[buildout]
22
extends =
3-
https://zopefoundation.github.io/Zope/releases/master/versions-prod.cfg
3+
https://zopefoundation.github.io/Zope/releases/master/versions.cfg
44
develop = .
55
parts =
66
test

docs/conf.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,25 @@
55

66
import datetime
77
import os
8-
import pkginfo
98
import sys
9+
from importlib.metadata import distribution
10+
1011

11-
parent = os.path.dirname(os.path.dirname(__file__))
12-
parent_dir = os.path.abspath(parent)
13-
pkg_info = pkginfo.Develop(parent_dir)
14-
pkg_version = pkg_info.version or ''
1512
year = datetime.datetime.now().year
13+
sys.path.append(os.path.abspath('../src'))
14+
rqmt = distribution('Products.LDAPUserFolder')
1615

1716
# -- Project information -----------------------------------------------------
1817
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1918

2019
project = 'Products.LDAPUserFolder'
21-
copyright = '2000-%i, Jens Vagelpohl and Contributors' % year
20+
copyright = f'2000-{year}, Jens Vagelpohl and Contributors'
2221
author = 'Jens Vagelpohl'
2322

2423
# The short X.Y version.
25-
version = pkg_version.replace('.dev0', '')
24+
version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
2625
# The full version, including alpha/beta/rc tags.
27-
release = pkg_version
26+
release = rqmt.version
2827

2928
# -- General configuration ---------------------------------------------------
3029
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -37,5 +36,5 @@
3736
# -- Options for HTML output -------------------------------------------------
3837
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
3938

40-
html_theme = 'sphinx_rtd_theme'
39+
html_theme = 'furo'
4140
html_static_path = ['_static']

0 commit comments

Comments
 (0)