Skip to content
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# https://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
name: pre-commit

on:
pull_request:
push:
branches:
- master
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:

env:
FORCE_COLOR: 1

jobs:
pre-commit:
permissions:
contents: read
pull-requests: write
name: linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1
with:
extra_args: --all-files --show-diff-on-failure
env:
PRE_COMMIT_COLOR: always
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 #v1.1.0
if: always()
with:
msg: Apply pre-commit code formatting
60 changes: 31 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,55 +12,57 @@ on:

jobs:
build:
permissions:
contents: read
pull-requests: write
strategy:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ["ubuntu", "ubuntu-20.04"]
- ["ubuntu", "ubuntu-latest"]
config:
# [Python version, tox env]
- ["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"]
- ["3.9", "docs"]
- ["3.9", "coverage"]
- ["3.11", "release-check"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["3.12", "py312"]
- ["3.13", "py313"]
- ["3.14", "py314"]
- ["3.11", "docs"]
- ["3.11", "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@v3
- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/checkout@v5
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v3
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
persist-credentials: false
- name: Install additional dependencies
run: |
python -m pip install --upgrade pip
pip install tox
set -ex
sudo apt update
sudo apt install -y ldap-utils slapd libldap2-dev libsasl2-dev
- name: Install uv + caching
# astral/setup-uv@7.1.3
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3
with:
enable-cache: true
cache-dependency-glob: |
setup.*
tox.ini
python-version: ${{ matrix.config[0] }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: tox -e ${{ matrix.config[1] }}
if: ${{ !startsWith(runner.os, 'Mac') }}
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}
- name: Test (macOS)
if: ${{ startsWith(runner.os, 'Mac') }}
run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls
coveralls --service=github
uvx coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "acd8d239"
commit-id = "9fcd3d67"

[python]
with-windows = false
Expand All @@ -26,6 +26,7 @@ additional-rules = [
[check-manifest]
additional-ignores = [
"docs/_build/html/_static/*",
"docs/_build/html/_static/scripts/*",
]

[coverage]
Expand Down
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
minimum_pre_commit_version: '3.6'
repos:
- repo: https://github.com/pycqa/isort
rev: "7.0.0"
hooks:
- id: isort
- repo: https://github.com/hhatto/autopep8
rev: "v2.3.2"
hooks:
- id: autopep8
args: [--in-place, --aggressive, --aggressive]
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
- id: teyit
- repo: https://github.com/PyCQA/flake8
rev: "7.3.0"
hooks:
- id: flake8
additional_dependencies:
- flake8-debugger == 4.1.2
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ releases, see the file `HISTORY.txt` in this folder.
----------------


- Add support for Python 3.13, 3.14.

- Drop support for Python 3.7, 3.8, 3.9.

5.2 (2024-01-03)
----------------
- update to latest zope meta config templates
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
Generated from:
https://github.com/zopefoundation/meta/tree/master/config/zope-product
-->
# Contributing to dataflake projects

The projects under the dataflake GitHub organization are open source and
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include *.rst
include *.txt
include buildout.cfg
include tox.ini
include .pre-commit-config.yaml

recursive-include docs *.py
recursive-include docs *.rst
Expand Down
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[buildout]
extends =
https://zopefoundation.github.io/Zope/releases/master/versions-prod.cfg
https://zopefoundation.github.io/Zope/releases/master/versions.cfg
develop = .
parts =
test
Expand Down
17 changes: 8 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,25 @@

import datetime
import os
import pkginfo
import sys
from importlib.metadata import distribution


parent = os.path.dirname(os.path.dirname(__file__))
parent_dir = os.path.abspath(parent)
pkg_info = pkginfo.Develop(parent_dir)
pkg_version = pkg_info.version or ''
year = datetime.datetime.now().year
sys.path.append(os.path.abspath('../src'))
rqmt = distribution('Products.LDAPUserFolder')

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

project = 'Products.LDAPUserFolder'
copyright = '2000-%i, Jens Vagelpohl and Contributors' % year
copyright = f'2000-{year}, Jens Vagelpohl and Contributors'
author = 'Jens Vagelpohl'

# The short X.Y version.
version = pkg_version.replace('.dev0', '')
version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
# The full version, including alpha/beta/rc tags.
release = pkg_version
release = rqmt.version

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

html_theme = 'sphinx_rtd_theme'
html_theme = 'furo'
html_static_path = ['_static']
3 changes: 0 additions & 3 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
These are the configuration options sorted by the :term:`ZMI` navigation tab
they appear on.

.. contents::
:local:
:depth: 1

Configure: Basic configuration
------------------------------
Expand Down
4 changes: 1 addition & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
docutils<0.19
sphinx
sphinx_rtd_theme>1
pkginfo
furo
repoze.sphinx.autointerface
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product

[build-system]
requires = [
"setuptools >= 78.1.1,< 81",
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.coverage.run]
branch = true
source = ["Products.LDAPUserFolder"]

[tool.coverage.report]
fail_under = 81
precision = 2
ignore_errors = true
show_missing = true
exclude_lines = [
"pragma: no cover",
"pragma: nocover",
"except ImportError:",
"raise NotImplementedError",
"if __name__ == '__main__':",
"self.fail",
"raise AssertionError",
"raise unittest.Skip",
]

[tool.coverage.html]
directory = "parts/htmlcov"
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[bdist_wheel]
universal = 0

[flake8]
doctests = 1
Expand All @@ -14,6 +12,7 @@ ignore =
.meta.toml
docs/_build/html/_sources/*
docs/_build/html/_static/*
docs/_build/html/_static/scripts/*

[isort]
force_single_line = True
Expand Down
Loading