Skip to content

Commit 13887c3

Browse files
committed
Initial commit
0 parents  commit 13887c3

File tree

159 files changed

+31471
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+31471
-0
lines changed

.copier-answers.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is managed by Copier; DO NOT EDIT OR REMOVE.
2+
_commit: v0.3.0
3+
_src_path: https://github.com/quantco/copier-template-python-open-source
4+
add_autobump_workflow: true
5+
author_email: [email protected]
6+
author_name: Oliver Borchert
7+
github_url: https://github.com/quantco/dataframely
8+
github_user: borchero
9+
minimal_python_version: py311
10+
project_short_description: A declarative, polars-native data frame validation library
11+
project_slug: dataframely
12+
use_devcontainer: false

.envrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
watch_file pixi.toml pixi.lock
2+
eval "$(pixi shell-hook)"

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pixi.lock linguist-language=YAML linguist-generated=true

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @borchero @AndreasAlbertQC @delsner

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Motivation
2+
3+
<!-- Why is this change necessary? Link issues here if applicable. -->
4+
5+
# Changes
6+
7+
<!-- What changes have been performed? -->

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
groups:
8+
gh-actions:
9+
patterns:
10+
- "*"
11+
commit-message:
12+
prefix: ci

.github/release-drafter.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# ------------------------------------- PULL REQUEST LABELS ------------------------------------- #
2+
autolabeler:
3+
# Conventional Commit Types (https://github.com/commitizen/conventional-commit-types)
4+
- label: build
5+
title:
6+
- '/^build(\(.*\))?(\!)?\:/'
7+
- label: chore
8+
title:
9+
- '/^chore(\(.*\))?(\!)?\:/'
10+
- label: ci
11+
title:
12+
- '/^ci(\(.*\))?(\!)?\:/'
13+
- label: documentation
14+
title:
15+
- '/^docs(\(.*\))?(\!)?\:/'
16+
- label: enhancement
17+
title:
18+
- '/^feat(\(.*\))?(\!)?\:/'
19+
- label: fix
20+
title:
21+
- '/^fix(\(.*\))?(\!)?\:/'
22+
- label: performance
23+
title:
24+
- '/^perf(\(.*\))?(\!)?\:/'
25+
- label: refactor
26+
title:
27+
- '/^refactor(\(.*\))?(\!)?\:/'
28+
- label: revert
29+
title:
30+
- '/^revert(\(.*\))?(\!)?\:/'
31+
- label: style
32+
title:
33+
- '/^style(\(.*\))?(\!)?\:/'
34+
- label: test
35+
title:
36+
- '/^test(\(.*\))?(\!)?\:/'
37+
# Custom Types
38+
- label: breaking
39+
title:
40+
- '/^[a-z]+(\(.*\))?\!\:/'
41+
# ------------------------------------- AUTOMATIC VERSIONING ------------------------------------ #
42+
version-resolver:
43+
major:
44+
labels:
45+
- breaking
46+
minor:
47+
labels:
48+
- enhancement
49+
default: patch
50+
# ------------------------------------ RELEASE CONFIGURATION ------------------------------------ #
51+
name-template: "v$RESOLVED_VERSION"
52+
tag-template: "v$RESOLVED_VERSION"
53+
category-template: "### $TITLE"
54+
change-template: "- $TITLE by @$AUTHOR in [#$NUMBER]($URL)"
55+
replacers:
56+
# remove conventional commit tag & scope from change list
57+
- search: '/- [a-z]+(\(.*\))?(\!)?\: /g'
58+
replace: "- "
59+
template: |
60+
## What's Changed
61+
62+
$CHANGES
63+
64+
**Full Changelog:** [`$PREVIOUS_TAG...v$RESOLVED_VERSION`](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION)
65+
categories:
66+
- title: ⚠️ Breaking Changes
67+
labels:
68+
- breaking
69+
- title: ✨ New Features
70+
labels:
71+
- enhancement
72+
- title: 🐞 Bug Fixes
73+
labels:
74+
- fix
75+
- title: 🏎️ Performance Improvements
76+
labels:
77+
- performance
78+
- title: 📚 Documentation
79+
labels:
80+
- documentation
81+
- title: 🏗️ Testing
82+
labels:
83+
- test
84+
- title: ⚙️ Automation
85+
labels:
86+
- ci
87+
- title: 🛠 Builds
88+
labels:
89+
- build
90+
- title: 💎 Code Style
91+
labels:
92+
- style
93+
- title: 📦 Refactorings
94+
labels:
95+
- refactor
96+
- title: ♻️ Chores
97+
labels:
98+
- chore
99+
- title: 🗑 Reverts
100+
labels:
101+
- revert

.github/workflows/build.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
build-sdist:
11+
name: Build Sdist
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
with:
16+
fetch-depth: 0
17+
- name: Set up pixi
18+
uses: prefix-dev/setup-pixi@0f64e482e3d251f735019b1bc7fb0413ead75b2c # v0.8.2
19+
with:
20+
environments: build
21+
- name: Set version
22+
run: pixi run -e build set-version
23+
- name: Build project
24+
run: pixi run -e build build-sdist
25+
- name: Upload package
26+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
27+
with:
28+
name: sdist
29+
path: dist/*
30+
31+
build-wheel:
32+
name: Build Wheel (${{ matrix.target-platform }})
33+
runs-on: ${{ matrix.os }}
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- target-platform: linux-64
39+
os: ubuntu-latest
40+
- target-platform: linux-aarch64
41+
os: ubuntu-24.04-arm
42+
- target-platform: osx-64
43+
os: macos-13
44+
- target-platform: osx-arm64
45+
os: macos-latest
46+
- target-platform: win-64
47+
os: windows-latest
48+
steps:
49+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50+
with:
51+
fetch-depth: 0
52+
- name: Set up pixi
53+
uses: prefix-dev/setup-pixi@0f64e482e3d251f735019b1bc7fb0413ead75b2c # v0.8.2
54+
with:
55+
environments: build
56+
- name: Set version
57+
run: pixi run -e build set-version
58+
- name: Build project
59+
run: pixi run -e build build-wheel
60+
- name: Check package
61+
run: pixi run -e build check-wheel
62+
- name: Upload package
63+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
64+
with:
65+
name: wheel-${{ matrix.target-platform }}
66+
path: dist/*
67+
68+
release:
69+
name: Publish package
70+
if: github.event_name == 'release'
71+
needs: build-wheel
72+
runs-on: ubuntu-latest
73+
permissions:
74+
id-token: write
75+
environment: pypi
76+
steps:
77+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
78+
with:
79+
path: dist
80+
merge-multiple: true
81+
- name: Publish package on PyPi
82+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4

.github/workflows/chore.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Chore
2+
on:
3+
pull_request:
4+
branches: [main]
5+
types: [opened, reopened, edited, synchronize]
6+
push:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
check-pr-title:
15+
name: Check PR Title
16+
if: github.event_name == 'pull_request'
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
steps:
22+
- name: Check valid conventional commit message
23+
id: lint
24+
uses: amannn/action-semantic-pull-request@v5
25+
with:
26+
subjectPattern: ^[A-Z].+[^. ]$ # subject must start with uppercase letter and may not end with a dot/space
27+
env:
28+
GITHUB_TOKEN: ${{ github.token }}
29+
- name: Post comment about invalid PR title
30+
if: failure()
31+
uses: marocchino/sticky-pull-request-comment@v2
32+
with:
33+
header: conventional-commit-pr-title
34+
message: |
35+
Thank you for opening this pull request! 👋🏼
36+
37+
This repository requires pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
38+
39+
<details><summary><b>Details</b></summary>
40+
41+
```
42+
${{ steps.lint.outputs.error_message }}
43+
```
44+
45+
</details>
46+
- name: Delete comment about invalid PR title
47+
if: success()
48+
uses: marocchino/sticky-pull-request-comment@v2
49+
with:
50+
header: conventional-commit-pr-title
51+
delete: true
52+
53+
release-drafter:
54+
name: ${{ github.event_name == 'pull_request' && 'Assign Labels' || 'Draft Release' }}
55+
runs-on: ubuntu-latest
56+
permissions:
57+
contents: write
58+
pull-requests: write
59+
steps:
60+
- name: ${{ github.event_name == 'pull_request' && 'Assign labels' || 'Update release draft' }}
61+
uses: release-drafter/release-drafter@v6
62+
with:
63+
disable-releaser: ${{ github.event_name == 'pull_request' }}
64+
disable-autolabeler: ${{ github.event_name == 'push' }}
65+
env:
66+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
# Automatically stop old builds on the same branch/PR
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
pre-commit-checks:
14+
name: Pre-commit Checks
15+
timeout-minutes: 30
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout branch
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
with:
21+
# needed for 'pre-commit-mirrors-insert-license'
22+
fetch-depth: 0
23+
- name: Set up pixi
24+
uses: prefix-dev/setup-pixi@0f64e482e3d251f735019b1bc7fb0413ead75b2c # v0.8.2
25+
with:
26+
environments: default lint
27+
- name: Install repository
28+
run: pixi run -e default postinstall
29+
- name: pre-commit
30+
run: pixi run pre-commit-run --color=always --show-diff-on-failure
31+
32+
unit-tests:
33+
name: Unit Tests (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Windows' }}) - ${{ matrix.environment }}
34+
timeout-minutes: 30
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
fail-fast: true
38+
matrix:
39+
os: [ubuntu-latest, windows-latest]
40+
environment: [py311, py312, py313]
41+
steps:
42+
- name: Checkout branch
43+
uses: actions/checkout@v4
44+
- name: Set up pixi
45+
uses: prefix-dev/setup-pixi@8eaba7c61d661f73d558b0b477156b7b62667fa4
46+
with:
47+
environments: ${{ matrix.environment }}
48+
- name: Install repository
49+
run: pixi run -e ${{ matrix.environment }} postinstall
50+
- name: Run pytest
51+
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes
52+
- name: Upload codecov
53+
uses: codecov/codecov-action@v5
54+
with:
55+
files: ./coverage.xml

0 commit comments

Comments
 (0)