Skip to content
Open
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
1 change: 1 addition & 0 deletions .claude/CLAUDE.md
11 changes: 10 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# This file is managed by Copier; DO NOT EDIT OR REMOVE.
_commit: v0.4.1
#
# If you want to change any of the copier answers, run one of the following:
# 1. If you want to answer _all_ questions again:
# `copier update --trust --vcs-ref=:current: .`
# 2. If you want to answer a _specific_ question again:
# `copier update --trust --defaults --vcs-ref=:current: --data answer_name=answer_value .`
#
# If you want to run this as a one-off command, prefix with:
# `pixi exec --spec copier --spec ruamel.yaml -- {command}`
_commit: v0.5.2
_src_path: https://github.com/quantco/copier-template-python-open-source
add_autobump_workflow: false
author_email: oliver.borchert@quantco.com
Expand Down
37 changes: 30 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
with:
environments: build
- name: Set version
run: pixi run -e build set-version
- name: Build project
run: pixi run -e build build-sdist
- name: Upload package
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sdist
path: dist/*
Expand All @@ -52,22 +52,45 @@ jobs:
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
with:
environments: build
- name: Set version
run: pixi run -e build set-version
- name: Install cargo-auditable
if: github.event_name == 'release' && runner.os != 'Linux'
run: cargo install cargo-auditable@0.7.4 --locked
- name: Prepare cargo-auditable wrapper (macOS)
if: github.event_name == 'release' && runner.os == 'macOS'
run: |
# cargo-auditable must be invoked as "cargo auditable <cmd>", not as a direct CARGO
# replacement — the latter does not support "cargo rustc --profile". A wrapper delegates
# to the real cargo via PATH (no recursion risk since CARGO is set via env, not PATH).
printf '#!/bin/sh\nexec cargo auditable "$@"\n' > /usr/local/bin/cargo-auditable-wrapper
chmod +x /usr/local/bin/cargo-auditable-wrapper
echo "CARGO=/usr/local/bin/cargo-auditable-wrapper" >> "$GITHUB_ENV"
- name: Prepare cargo-auditable wrapper (Windows)
if: github.event_name == 'release' && runner.os == 'Windows'
shell: bash
run: |
printf '@cargo auditable %%*\n' > "C:/cargo-auditable-wrapper.cmd"
echo "CARGO=C:\\cargo-auditable-wrapper.cmd" >> "$GITHUB_ENV"
- name: Build wheel
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1.50.1
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 # zizmor: ignore[cache-poisoning]
with:
command: build
args: --out dist --release -i python3.10
manylinux: auto
sccache: true
sccache: ${{ github.event_name != 'release' }}
# NOTE: We also need to set up cargo-auditable inside the docker container
# where the linux build is performed.
docker-options: ${{ case(github.event_name == 'release', format('-e CARGO={0}', env.CARGO), '') }}
before-script-linux: |
${{ case(github.event_name == 'release', 'cargo install cargo-auditable@0.7.4 --locked && printf ''#!/bin/sh\nexec cargo auditable "$@"\n'' > /usr/local/bin/cargo-auditable-wrapper && chmod +x /usr/local/bin/cargo-auditable-wrapper', '') }}
- name: Check package
run: pixi run -e build check-wheel
- name: Upload package
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheel-${{ matrix.target-platform }}
path: dist/*
Expand All @@ -86,4 +109,4 @@ jobs:
path: dist
merge-multiple: true
- name: Publish package on PyPi
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Chore
on:
pull_request_target:
pull_request_target: # zizmor: ignore[dangerous-triggers]
branches: [main]
types: [opened, reopened, edited, synchronize]

Expand All @@ -25,7 +25,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
- name: Post comment about invalid PR title
if: failure()
uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3.0.2
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
with:
header: conventional-commit-pr-title
message: |
Expand All @@ -42,7 +42,7 @@ jobs:
</details>
- name: Delete comment about invalid PR title
if: success()
uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3.0.2
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
with:
header: conventional-commit-pr-title
delete: true
Expand All @@ -54,6 +54,6 @@ jobs:
pull-requests: write
steps:
- name: Assign labels
uses: release-drafter/release-drafter/autolabeler@139054aeaa9adc52ab36ddf67437541f039b88e2 # v7.1.1
uses: release-drafter/release-drafter/autolabeler@5de93583980a40bd78603b6dfdcda5b4df377b32 # v7.2.0
with:
token: ${{ github.token }}
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ permissions:
contents: read

jobs:
pre-commit-checks:
name: Pre-commit Checks
lint:
name: Lint
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
Expand All @@ -24,15 +24,17 @@ jobs:
# needed for 'pre-commit-mirrors-insert-license'
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
with:
environments: default lint polars-minimal
- name: Install Rust
run: rustup show
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
- name: Run linting
run: pixi run lint
env:
CLICOLOR_FORCE: 1

unit-tests:
name: Unit Tests (${{ contains(matrix.os, 'ubuntu') && 'Linux' || (contains(matrix.os, 'windows') && 'Windows' || 'macOS') }}) - ${{ matrix.environment }}
Expand Down Expand Up @@ -63,7 +65,7 @@ jobs:
- name: Checkout branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
with:
environments: ${{ matrix.environment }}
# FIXME: Remove when `s3_server` fixture does not start a process anymore
Expand All @@ -77,7 +79,7 @@ jobs:
- name: Run pytest
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes ${{ matrix.with_optionals && '-m with_optionals' || '-m "not with_optionals"'}} --cov=dataframely --cov-report=xml
- name: Upload codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Checkout branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
with:
environments: default
- name: Install Rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Checkout branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up pixi
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
with:
environments: nightly
- name: Install polars nightly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Chore
name: Release Drafter
on:
push:
branches: [main]
Expand All @@ -16,6 +16,6 @@ jobs:
pull-requests: read
steps:
- name: Update release draft
uses: release-drafter/release-drafter@139054aeaa9adc52ab36ddf67437541f039b88e2 # v7.1.1
uses: release-drafter/release-drafter@5de93583980a40bd78603b6dfdcda5b4df377b32 # v7.2.0
with:
token: ${{ github.token }}
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
Expand All @@ -74,6 +74,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
with:
sarif_file: results.sarif
57 changes: 57 additions & 0 deletions .lefthook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/evilmartians/lefthook/refs/heads/master/schema.json
output: [summary]
templates:
run: run --as-is --quiet --no-progress
no_auto_install: true
pre-commit:
fail_on_changes: always
exclude:
- assets/**/*
jobs:
- name: pixi-install
run: pixi install
- group:
parallel: true
jobs:
- name: ruff-check
glob: "*.{py,pyi}"
run: pixi {run} ruff check --fix --exit-non-zero-on-fix --force-exclude
- name: ruff-format
glob: "*.{py,pyi}"
run: pixi {run} ruff format --force-exclude
- name: mypy
glob: "*.py"
run: pixi {run} mypy {staged_files}
- name: prettier
glob: "*.{md,yml,yaml}"
run: pixi {run} prettier --write --no-error-on-unmatched-pattern --list-different --ignore-unknown {staged_files}
- name: taplo
glob: "*.toml"
run: pixi {run} taplo format {staged_files}
- name: cargo-fmt
glob: "*.rs"
run: pixi {run} cargo fmt
- name: cargo-clippy
glob: "*.rs"
run: pixi {run} cargo clippy --all-targets
- name: trailing-whitespace-fixer
glob: "*"
file_types: text
run: pixi {run} trailing-whitespace-fixer {staged_files}
- name: end-of-file-fixer
glob: "*"
file_types: text
run: pixi {run} end-of-file-fixer {staged_files}
- name: check-merge-conflict
glob: "*"
file_types: text
run: pixi {run} check-merge-conflict --assume-in-merge {staged_files}
exclude:
- "*.rst"
- name: typos
glob: "*"
file_types: text
run: pixi {run} typos --force-exclude {staged_files}
- name: zizmor
glob: "*.{yml,yaml}"
run: pixi {run} zizmor --no-progress --min-severity high --fix --offline .
110 changes: 0 additions & 110 deletions .pre-commit-config.yaml

This file was deleted.

Loading
Loading