Skip to content

Commit 42d0d96

Browse files
chore: Update copier template to v0.5.3
1 parent 8013722 commit 42d0d96

11 files changed

Lines changed: 147 additions & 114 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: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# This file is managed by Copier; DO NOT EDIT OR REMOVE.
2-
_commit: v0.4.1
2+
#
3+
# If you want to change any of the copier answers, run one of the following:
4+
# 1. If you want to answer _all_ questions again:
5+
# `copier update --trust --vcs-ref=:current: .`
6+
# 2. If you want to answer a _specific_ question again:
7+
# `copier update --trust --defaults --vcs-ref=:current: --data answer_name=answer_value .`
8+
#
9+
# If you want to run this as a one-off command, prefix with:
10+
# `pixi exec --spec copier --spec ruamel.yaml -- {command}`
11+
_commit: v0.5.3
312
_src_path: https://github.com/quantco/copier-template-python-open-source
413
add_autobump_workflow: false
514
author_email: noreply@quantco.com
615
author_name: QuantCo, Inc.
716
github_url: https://github.com/quantco/multiregex
817
github_user: pavelzw
9-
minimal_python_version: py39
18+
minimal_python_version: py310
1019
project_short_description: Quickly match many regexes against a string. Provides 2-10x
1120
speedups over naïve regex matching.
1221
project_slug: multiregex

.github/workflows/build.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,28 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919
- name: Set up pixi
20+
<<<<<<< before updating
2021
uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
21-
with:
22-
environments: build
22+
||||||| last update
23+
uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
24+
=======
25+
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
26+
>>>>>>> after updating
27+
- name: Derive version
28+
id: version
29+
if: startsWith(github.ref, 'refs/tags/')
30+
shell: bash
31+
run: echo "version=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
32+
- name: Replace version
33+
if: startsWith(github.ref, 'refs/tags/')
34+
run: |
35+
sed -i -e "s/0.0.0/${STEPS_VERSION_OUTPUTS_VERSION}/g" pyproject.toml
36+
env:
37+
STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }}
2338
- name: Build project
24-
run: pixi run -e build build-wheel
39+
run: pixi run build-wheel
2540
- name: Check package
26-
run: pixi run -e build check-wheel
41+
run: pixi run check-wheel
2742
- name: Upload package
2843
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
2944
with:

.github/workflows/ci.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,25 @@ 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
25+
<<<<<<< before updating
2426
uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
25-
with:
26-
environments: default lint
27-
- name: pre-commit
28-
run: pixi run pre-commit-run --color=always --show-diff-on-failure
27+
||||||| last update
28+
uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
29+
=======
30+
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
31+
>>>>>>> after updating
32+
- name: Run linting
33+
run: pixi run lint
34+
env:
35+
CLICOLOR_FORCE: 1
2936

3037
pytest:
3138
timeout-minutes: 30
@@ -34,11 +41,11 @@ jobs:
3441
fail-fast: false
3542
matrix:
3643
environment:
37-
- py39
3844
- py310
3945
- py311
4046
- py312
4147
- py313
48+
- py314
4249
os:
4350
- ubuntu-latest
4451
- macos-latest
@@ -49,10 +56,14 @@ jobs:
4956
with:
5057
fetch-depth: 0
5158
- name: Set up pixi
59+
<<<<<<< before updating
5260
uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
61+
||||||| last update
62+
uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
63+
=======
64+
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
65+
>>>>>>> after updating
5366
with:
5467
environments: ${{ matrix.environment }}
55-
- name: Install repository
56-
run: pixi run -e ${{ matrix.environment }} postinstall
5768
- name: Run pytest
5869
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes

.github/workflows/scorecard.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ jobs:
7474
# Upload the results to GitHub's code scanning dashboard (optional).
7575
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7676
- name: "Upload to code-scanning"
77+
<<<<<<< before updating
7778
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
79+
||||||| last update
80+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
81+
=======
82+
uses: github/codeql-action/upload-sarif@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
83+
>>>>>>> after updating
7884
with:
7985
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 --as-is --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 --offline .

.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.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ git clone https://github.com/quantco/multiregex
2121
cd multiregex
2222

2323
pixi run pre-commit-install
24-
pixi run postinstall
2524
pixi run test
2625
```
2726

pixi.toml

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,59 @@
1-
[project]
1+
[workspace]
22
name = "multiregex"
33
channels = ["conda-forge"]
4+
exclude-newer = "7d"
45
platforms = ["osx-arm64", "osx-64", "linux-64", "win-64"]
6+
preview = ["pixi-build"]
57

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

918
[dependencies]
10-
python = ">=3.9"
19+
multiregex = { path = "." }
1120
pyahocorasick = "*"
1221

13-
[host-dependencies]
14-
pip = "*"
15-
setuptools = ">=61"
16-
setuptools-scm = "*"
17-
1822
[feature.test.dependencies]
23+
<<<<<<< before updating
1924
pytest = ">=6,<8"
25+
||||||| last update
26+
pytest = ">=6"
27+
=======
28+
pytest = "*"
29+
>>>>>>> after updating
2030
pytest-cov = "*"
2131
mypy = "*"
2232
[feature.test.tasks]
2333
test = "pytest"
2434
test-coverage = "pytest --cov=multiregex --cov-report=xml --cov-report=term-missing"
2535

2636
[feature.build.dependencies]
37+
python = "*"
38+
hatchling = "*"
2739
python-build = "*"
28-
twine = "*"
29-
wheel = "*"
40+
twine = ">=6"
3041
[feature.build.tasks]
3142
build-wheel = "python -m build --no-isolation ."
3243
check-wheel = "twine check dist/*"
3344

3445
[feature.lint.dependencies]
35-
pre-commit = "*"
36-
insert-license-header = "*"
37-
docformatter = "*"
46+
lefthook = "*"
3847
ruff = "*"
3948
prettier = "*"
4049
taplo = "*"
4150
pre-commit-hooks = "*"
4251
typos = "*"
52+
zizmor = "*"
4353
[feature.lint.tasks]
44-
pre-commit-install = "pre-commit install"
45-
pre-commit-run = "pre-commit run -a"
54+
pre-commit-install = "lefthook install"
55+
lint = "lefthook run pre-commit --all-files"
4656

47-
[feature.py39.dependencies]
48-
python = "3.9.*"
4957
[feature.py310.dependencies]
5058
python = "3.10.*"
5159
[feature.py311.dependencies]
@@ -54,13 +62,13 @@ python = "3.11.*"
5462
python = "3.12.*"
5563
[feature.py313.dependencies]
5664
python = "3.13.*"
65+
[feature.py314.dependencies]
66+
python = "3.14.*"
5767

5868
[environments]
59-
default = ["test"]
60-
py39 = ["py39", "test"]
69+
default = ["test", "build", "lint"]
6170
py310 = ["py310", "test"]
6271
py311 = ["py311", "test"]
6372
py312 = ["py312", "test"]
6473
py313 = ["py313", "test"]
65-
build = ["build"]
66-
lint = { features = ["lint"], no-default-feature = true }
74+
py314 = ["py314", "test"]

0 commit comments

Comments
 (0)