Skip to content

Commit b339296

Browse files
chore: Update copier template to v0.5.2 (#341)
Co-authored-by: quant-ranger[bot] <132915763+quant-ranger[bot]@users.noreply.github.com> Co-authored-by: Oliver Borchert <oliver.borchert@quantco.com>
1 parent cdb1ac9 commit b339296

14 files changed

Lines changed: 26987 additions & 27273 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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
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.2
312
_src_path: https://github.com/quantco/copier-template-python-open-source
413
add_autobump_workflow: false
514
author_email: oliver.borchert@quantco.com

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
printf '@cargo auditable %%*\n' > "C:/cargo-auditable-wrapper.cmd"
7777
echo "CARGO=C:\\cargo-auditable-wrapper.cmd" >> "$GITHUB_ENV"
7878
- name: Build wheel
79-
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
79+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 # zizmor: ignore[cache-poisoning]
8080
with:
8181
command: build
8282
args: --out dist --release -i python3.10
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Chore
22
on:
3-
pull_request_target:
3+
pull_request_target: # zizmor: ignore[dangerous-triggers]
44
branches: [main]
55
types: [opened, reopened, edited, synchronize]
66

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
pre-commit-checks:
17-
name: Pre-commit Checks
16+
lint:
17+
name: Lint
1818
timeout-minutes: 30
1919
runs-on: ubuntu-latest
2020
steps:
@@ -31,8 +31,10 @@ jobs:
3131
run: rustup show
3232
- name: Cache Rust dependencies
3333
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
34-
- name: pre-commit
35-
run: pixi run pre-commit-run --color=always --show-diff-on-failure
34+
- name: Run linting
35+
run: pixi run lint
36+
env:
37+
CLICOLOR_FORCE: 1
3638

3739
unit-tests:
3840
name: Unit Tests (${{ contains(matrix.os, 'ubuntu') && 'Linux' || (contains(matrix.os, 'windows') && 'Windows' || 'macOS') }}) - ${{ matrix.environment }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Chore
1+
name: Release Drafter
22
on:
33
push:
44
branches: [main]

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ 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-
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
77+
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
7878
with:
7979
sarif_file: results.sarif

.lefthook.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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: cargo-fmt
32+
glob: "*.rs"
33+
run: pixi {run} cargo fmt
34+
- name: cargo-clippy
35+
glob: "*.rs"
36+
run: pixi {run} cargo clippy --all-targets
37+
- name: trailing-whitespace-fixer
38+
glob: "*"
39+
file_types: text
40+
run: pixi {run} trailing-whitespace-fixer {staged_files}
41+
- name: end-of-file-fixer
42+
glob: "*"
43+
file_types: text
44+
run: pixi {run} end-of-file-fixer {staged_files}
45+
- name: check-merge-conflict
46+
glob: "*"
47+
file_types: text
48+
run: pixi {run} check-merge-conflict --assume-in-merge {staged_files}
49+
exclude:
50+
- "*.rst"
51+
- name: typos
52+
glob: "*"
53+
file_types: text
54+
run: pixi {run} typos --force-exclude {staged_files}
55+
- name: zizmor
56+
glob: "*.{yml,yaml}"
57+
run: pixi {run} zizmor --no-progress --min-severity high --fix --offline .

.pre-commit-config.yaml

Lines changed: 0 additions & 110 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.

0 commit comments

Comments
 (0)