Skip to content

Commit 8b8b9f5

Browse files
chore: Update copier template to v0.5.1
1 parent 739f583 commit 8b8b9f5

11 files changed

Lines changed: 138 additions & 113 deletions

File tree

.claude/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../AGENTS.md

.copier-answers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# This file is managed by Copier; DO NOT EDIT OR REMOVE.
2-
_commit: v0.4.1
2+
_commit: v0.5.1
33
_src_path: https://github.com/quantco/copier-template-python-open-source
44
add_autobump_workflow: false
55
author_email: noreply@quantco.com
66
author_name: QuantCo, Inc.
77
github_url: https://github.com/quantco/multiregex
88
github_user: pavelzw
9-
minimal_python_version: py39
9+
minimal_python_version: py310
1010
project_short_description: Quickly match many regexes against a string. Provides 2-10x
1111
speedups over naïve regex matching.
1212
project_slug: multiregex

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ updates:
1010
gh-actions:
1111
patterns:
1212
- "*"
13+
cooldown:
14+
default-days: 7

.github/workflows/build.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,29 @@ jobs:
1818
fetch-depth: 0
1919
- name: Set up pixi
2020
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
21-
with:
22-
environments: build
21+
- name: Derive version
22+
id: version
23+
if: startsWith(github.ref, 'refs/tags/')
24+
shell: bash
25+
run: echo "version=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
26+
- name: Replace version
27+
if: startsWith(github.ref, 'refs/tags/')
28+
run: |
29+
sed -i -e "s/0.0.0/${STEPS_VERSION_OUTPUTS_VERSION}/g" pyproject.toml
30+
env:
31+
STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }}
2332
- name: Build project
24-
run: pixi run -e build build-wheel
33+
run: pixi run build-wheel
2534
- name: Check package
26-
run: pixi run -e build check-wheel
35+
run: pixi run check-wheel
2736
- name: Upload package
37+
<<<<<<< before updating
2838
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
39+
||||||| last update
40+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
41+
=======
42+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
43+
>>>>>>> after updating
2944
with:
3045
name: artifact
3146
path: dist/*
@@ -39,7 +54,13 @@ jobs:
3954
id-token: write
4055
environment: pypi
4156
steps:
57+
<<<<<<< before updating
4258
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
59+
||||||| last update
60+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
61+
=======
62+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
63+
>>>>>>> after updating
4364
with:
4465
name: artifact
4566
path: dist

.github/workflows/ci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@ permissions:
1414
contents: read
1515

1616
jobs:
17-
pre-commit:
17+
lint:
18+
name: Lint
1819
timeout-minutes: 30
1920
runs-on: ubuntu-latest
2021
steps:
2122
- name: Checkout branch
2223
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2324
- name: Set up pixi
2425
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
25-
with:
26-
environments: default lint
27-
- name: pre-commit
28-
run: pixi run pre-commit-run --color=always --show-diff-on-failure
26+
- name: Run linting
27+
run: pixi run lint
28+
env:
29+
CLICOLOR_FORCE: 1
2930

3031
pytest:
3132
timeout-minutes: 30
@@ -34,11 +35,11 @@ jobs:
3435
fail-fast: false
3536
matrix:
3637
environment:
37-
- py39
3838
- py310
3939
- py311
4040
- py312
4141
- py313
42+
- py314
4243
os:
4344
- ubuntu-latest
4445
- macos-latest
@@ -52,7 +53,5 @@ jobs:
5253
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
5354
with:
5455
environments: ${{ matrix.environment }}
55-
- name: Install repository
56-
run: pixi run -e ${{ matrix.environment }} postinstall
5756
- name: Run pytest
5857
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes

.github/workflows/scorecard.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ jobs:
6565
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6666
# format to the repository Actions tab.
6767
- name: "Upload artifact"
68+
<<<<<<< before updating
6869
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
70+
||||||| last update
71+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
72+
=======
73+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
74+
>>>>>>> after updating
6975
with:
7076
name: SARIF file
7177
path: results.sarif
@@ -74,6 +80,12 @@ jobs:
7480
# Upload the results to GitHub's code scanning dashboard (optional).
7581
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7682
- name: "Upload to code-scanning"
83+
<<<<<<< before updating
7784
uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
85+
||||||| last update
86+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
87+
=======
88+
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
89+
>>>>>>> after updating
7890
with:
7991
sarif_file: results.sarif

.lefthook.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/evilmartians/lefthook/refs/heads/master/schema.json
2+
output: [summary]
3+
templates:
4+
run: run --quiet --no-progress
5+
no_auto_install: true
6+
pre-commit:
7+
fail_on_changes: always
8+
exclude:
9+
- assets/**/*
10+
jobs:
11+
- name: pixi-install
12+
run: pixi install
13+
- group:
14+
parallel: true
15+
jobs:
16+
- name: ruff-check
17+
glob: "*.{py,pyi}"
18+
run: pixi {run} ruff check --fix --exit-non-zero-on-fix --force-exclude
19+
- name: ruff-format
20+
glob: "*.{py,pyi}"
21+
run: pixi {run} ruff format --force-exclude
22+
- name: mypy
23+
glob: "*.py"
24+
run: pixi {run} mypy {staged_files}
25+
- name: prettier
26+
glob: "*.{md,yml,yaml}"
27+
run: pixi {run} prettier --write --no-error-on-unmatched-pattern --list-different --ignore-unknown {staged_files}
28+
- name: taplo
29+
glob: "*.toml"
30+
run: pixi {run} taplo format {staged_files}
31+
- name: trailing-whitespace-fixer
32+
glob: "*"
33+
file_types: text
34+
run: pixi {run} trailing-whitespace-fixer {staged_files}
35+
- name: end-of-file-fixer
36+
glob: "*"
37+
file_types: text
38+
run: pixi {run} end-of-file-fixer {staged_files}
39+
- name: check-merge-conflict
40+
glob: "*"
41+
file_types: text
42+
run: pixi {run} check-merge-conflict --assume-in-merge {staged_files}
43+
- name: typos
44+
glob: "*"
45+
file_types: text
46+
run: pixi {run} typos --force-exclude {staged_files}
47+
- name: zizmor
48+
glob: "*.{yml,yaml}"
49+
run: pixi {run} zizmor --no-progress --min-severity high --fix .

.pre-commit-config.yaml

Lines changed: 0 additions & 69 deletions
This file was deleted.

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Lockfiles must be consistent with package metadata. After any change to `pixi.toml`, run `pixi lock`.
2+
3+
Everything runs in a pixi environment. Any command (like `pytest`) must be prefixed with `pixi run` (e.g. `pixi run pytest`).
4+
5+
Code formatting must align with our standards. Run `pixi run lint` before `git commit`s to ensure this.

pixi.toml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,57 @@
1-
[project]
1+
[workspace]
22
name = "multiregex"
33
channels = ["conda-forge"]
44
platforms = ["osx-arm64", "osx-64", "linux-64", "win-64"]
5+
preview = ["pixi-build"]
56

6-
[tasks]
7-
postinstall = "pip install --no-build-isolation --no-deps --disable-pip-version-check -e ."
7+
[package]
8+
name = "multiregex"
9+
[package.build.backend]
10+
name = "pixi-build-python"
11+
version = "*"
12+
[package.host-dependencies]
13+
python = ">=3.10"
14+
hatchling = "*"
815

916
[dependencies]
10-
python = ">=3.9"
17+
multiregex = { path = "." }
1118
pyahocorasick = "*"
1219

13-
[host-dependencies]
14-
pip = "*"
15-
setuptools = ">=61"
16-
setuptools-scm = "*"
17-
1820
[feature.test.dependencies]
21+
<<<<<<< before updating
1922
pytest = ">=6,<8"
23+
||||||| last update
24+
pytest = ">=6"
25+
=======
26+
pytest = "*"
27+
>>>>>>> after updating
2028
pytest-cov = "*"
2129
mypy = "*"
2230
[feature.test.tasks]
2331
test = "pytest"
2432
test-coverage = "pytest --cov=multiregex --cov-report=xml --cov-report=term-missing"
2533

2634
[feature.build.dependencies]
35+
python = "*"
36+
hatchling = "*"
2737
python-build = "*"
28-
twine = "*"
29-
wheel = "*"
38+
twine = ">=6"
3039
[feature.build.tasks]
3140
build-wheel = "python -m build --no-isolation ."
3241
check-wheel = "twine check dist/*"
3342

3443
[feature.lint.dependencies]
35-
pre-commit = "*"
36-
insert-license-header = "*"
37-
docformatter = "*"
44+
lefthook = "*"
3845
ruff = "*"
3946
prettier = "*"
4047
taplo = "*"
4148
pre-commit-hooks = "*"
4249
typos = "*"
50+
zizmor = "*"
4351
[feature.lint.tasks]
44-
pre-commit-install = "pre-commit install"
45-
pre-commit-run = "pre-commit run -a"
52+
pre-commit-install = "lefthook install"
53+
lint = "lefthook run pre-commit --all-files"
4654

47-
[feature.py39.dependencies]
48-
python = "3.9.*"
4955
[feature.py310.dependencies]
5056
python = "3.10.*"
5157
[feature.py311.dependencies]
@@ -54,13 +60,13 @@ python = "3.11.*"
5460
python = "3.12.*"
5561
[feature.py313.dependencies]
5662
python = "3.13.*"
63+
[feature.py314.dependencies]
64+
python = "3.14.*"
5765

5866
[environments]
59-
default = ["test"]
60-
py39 = ["py39", "test"]
67+
default = ["test", "build", "lint"]
6168
py310 = ["py310", "test"]
6269
py311 = ["py311", "test"]
6370
py312 = ["py312", "test"]
6471
py313 = ["py313", "test"]
65-
build = ["build"]
66-
lint = { features = ["lint"], no-default-feature = true }
72+
py314 = ["py314", "test"]

0 commit comments

Comments
 (0)