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
41 changes: 39 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,40 @@ jobs:
with:
fetch-depth: 0
- name: Set up pixi
<<<<<<< before updating
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
environments: build
||||||| last update
uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
with:
environments: build
=======
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
- name: Derive version
id: version
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: echo "version=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
- name: Replace version
if: startsWith(github.ref, 'refs/tags/')
run: |
sed -i -e "s/0.0.0/${STEPS_VERSION_OUTPUTS_VERSION}/g" pyproject.toml
env:
STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }}
>>>>>>> after updating
- name: Build project
run: pixi run -e build build-wheel
run: pixi run build-wheel
- name: Check package
run: pixi run -e build check-wheel
run: pixi run check-wheel
- name: Upload package
<<<<<<< before updating
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
||||||| last update
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
=======
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
>>>>>>> after updating
with:
name: artifact
path: dist/*
Expand All @@ -38,9 +63,21 @@ jobs:
id-token: write
environment: pypi
steps:
<<<<<<< before updating
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
||||||| last update
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
=======
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
>>>>>>> after updating
with:
name: artifact
path: dist
- name: Publish package on PyPi
<<<<<<< before updating
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
||||||| last update
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
=======
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
>>>>>>> after updating
50 changes: 49 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,33 @@ permissions:
contents: read

jobs:
pre-commit:
lint:
name: Lint
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up pixi
<<<<<<< before updating
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
environments: default lint
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
||||||| last update
uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
with:
environments: default lint
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
=======
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
- name: Run linting
run: pixi run lint
env:
CLICOLOR_FORCE: 1
>>>>>>> after updating

pytest:
timeout-minutes: 30
Expand All @@ -40,6 +55,7 @@ jobs:
strategy:
fail-fast: false
matrix:
<<<<<<< before updating
environment: [py311, py312, py313]
database: [sqlite, mssql, duckdb]
include:
Expand All @@ -49,6 +65,26 @@ jobs:
connection-string: mssql+pyodbc://sa:Passw0rd@localhost:1433/master?driver=ODBC+Driver+18+for+SQL+Server&Encrypt=no
- database: duckdb
connection-string: duckdb:///test.duckdb
||||||| last update
environment:
- py311
- py312
- py313
os:
- ubuntu-latest
- macos-latest
- windows-latest
=======
environment:
- py311
- py312
- py313
- py314
os:
- ubuntu-latest
- macos-latest
- windows-latest
>>>>>>> after updating
steps:
- name: Checkout branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -58,12 +94,24 @@ jobs:
if: matrix.database == 'mssql'
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y
- name: Set up pixi
<<<<<<< before updating
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
||||||| last update
uses: prefix-dev/setup-pixi@19eac09b398e3d0c747adc7921926a6d802df4da # v0.8.8
=======
uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
>>>>>>> after updating
with:
environments: ${{ matrix.environment }}
<<<<<<< before updating
activate-environment: true
- name: Install repository
run: pixi run postinstall
||||||| last update
- name: Install repository
run: pixi run -e ${{ matrix.environment }} postinstall
=======
>>>>>>> after updating
- name: Run pytest
run: pixi run test-coverage --color=yes
env:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ 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"
<<<<<<< before updating
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
||||||| last update
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
=======
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
>>>>>>> after updating
with:
name: SARIF file
path: results.sarif
Expand All @@ -74,6 +80,12 @@ 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"
<<<<<<< before updating
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
||||||| last update
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
=======
uses: github/codeql-action/upload-sarif@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
>>>>>>> after updating
with:
sarif_file: results.sarif
49 changes: 49 additions & 0 deletions .lefthook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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: 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}
- 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 .
80 changes: 0 additions & 80 deletions .pre-commit-config.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Lockfiles must be consistent with package metadata. After any change to `pixi.toml`, run `pixi lock`.

Everything runs in a pixi environment. Any command (like `pytest`) must be prefixed with `pixi run` (e.g. `pixi run pytest`).

Code formatting must align with our standards. Run `pixi run lint` before `git commit`s to ensure this.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ git clone https://github.com/quantco/sqlcompyre
cd sqlcompyre

pixi run pre-commit-install
<<<<<<< before updating
pixi run postinstall
||||||| last update
pixi run postinstall
pixi run test
=======
pixi run test
>>>>>>> after updating
```

### Running Tests Locally
Expand Down
Loading
Loading