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
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-60-g881f631
#
# 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.6.0
_src_path: https://github.com/quantco/copier-template-python-open-source
add_autobump_workflow: false
author_email: ege.karaismailoglu@quantco.com
Expand Down
3 changes: 1 addition & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
watch_file pixi.toml pixi.lock
eval "$(pixi shell-hook)"
layout pixi

dotenv_if_exists .env
32 changes: 21 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Build
on:
pull_request:
push:
branches: [main]
release:
types: [published]
branches:
- main
tags:
- "*"

jobs:
build:
Expand All @@ -16,29 +17,38 @@ jobs:
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
with:
environments: build
uses: prefix-dev/setup-pixi@ad1da6449d9e506fd127fd67ab2d054a769f6a94 # v0.11.2
- 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 -e "s/(^|[^0-9])0\.0\.0([^0-9]|$)/\1${STEPS_VERSION_OUTPUTS_VERSION}\2/g" pyproject.toml
env:
STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }}
- 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
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: artifact
path: dist/*

release:
name: Publish package
if: github.event_name == 'release'
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
permissions:
id-token: write
environment: pypi
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: artifact
path: dist
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:

jobs:
lint:
name: Pre-commit Checks
name: Lint
timeout-minutes: 30
runs-on: ubuntu-latest
permissions:
Expand All @@ -21,16 +21,14 @@ jobs:
- name: Check out branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# needed for 'pre-commit-mirrors-insert-license'
# needed for insert-license's dynamic copyright years
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
with:
environments: default lint py311
- name: Install repository
run: pixi run -e default postinstall
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
uses: prefix-dev/setup-pixi@ad1da6449d9e506fd127fd67ab2d054a769f6a94 # v0.11.2
- name: Run linting
run: pixi run lint
env:
CLICOLOR_FORCE: 1
- name: Upload coverage
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
Expand All @@ -51,19 +49,20 @@ jobs:
- py312
- py313
- py314
- py315
- no-optional-dependencies
os:
- ubuntu-latest
- windows-latest
steps:
- name: Check out branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
uses: prefix-dev/setup-pixi@ad1da6449d9e506fd127fd67ab2d054a769f6a94 # v0.11.2
with:
environments: ${{ matrix.environment }}
- name: Install repository
run: pixi run -e ${{ matrix.environment }} postinstall
- name: Run pytest
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes
- name: Upload coverage
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
- name: Checkout branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up pixi
uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
uses: prefix-dev/setup-pixi@ad1da6449d9e506fd127fd67ab2d054a769f6a94 # v0.11.2
with:
environments: default lint
- name: Install repository
run: pixi run postinstall
environments: default
4 changes: 1 addition & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ jobs:
- name: Check out branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up pixi
uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
uses: prefix-dev/setup-pixi@ad1da6449d9e506fd127fd67ab2d054a769f6a94 # v0.11.2
with:
environments: nightly
- name: Install latest Polars including prereleases
run: pixi run -e nightly install-polars-nightly
- name: Show Polars version
run: pixi run -e nightly python -c "import polars as pl; print(pl.__version__)"
- name: Install repository
run: pixi run -e nightly postinstall
- name: Run pytest
run: pixi run -e nightly test-coverage --color=yes
10 changes: 6 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ jobs:
# actions: read

steps:
- name: "Checkout code"
- name: "Check out code"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -63,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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: SARIF file
path: results.sarif
Expand All @@ -72,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@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
uses: github/codeql-action/upload-sarif@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
sarif_file: results.sarif
Loading
Loading