-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a61e6ba
Showing
54 changed files
with
26,246 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This file is managed by Copier; DO NOT EDIT OR REMOVE. | ||
_commit: v0.1.0 | ||
_src_path: https://github.com/quantco/copier-template-python-open-source | ||
add_autobump_workflow: true | ||
github_url: https://github.com/quantco/tabulardelta | ||
github_user: AaronTackeQC | ||
minimal_python_version: py311 | ||
project_name: TabularDelta | ||
project_short_description: Simplify table comparisons. | ||
project_slug: tabulardelta | ||
use_devcontainer: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
* text=auto | ||
|
||
*.{diff,patch} binary | ||
|
||
*.{py,yaml,yml,sh} text eol=lf | ||
*.bat text eol=crlf | ||
|
||
pixi.lock linguist-language=YAML linguist-generated=true |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @AaronTackeQC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Motivation | ||
|
||
<!-- Why is this change necessary? Link issues here if applicable. --> | ||
|
||
# Changes | ||
|
||
<!-- What changes have been performed? --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Launch MSSQL on GitHub Linux VMs | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Cache connection details | ||
shell: bash -el {0} | ||
run: echo '{"project_name":"","port":1434,"docker_compose_file":"","cache_file":""}' > ./tests/mssql_container/.mssql_container_cache.json | ||
- name: Login to GHCR | ||
shell: bash -el {0} | ||
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ github.token }} | ||
- name: Launch MSSQL | ||
shell: bash -el {0} | ||
run: | | ||
docker compose -f ./tests/mssql_container/docker-compose.yml up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Launch MSSQL on GitHub Windows VMs | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Cache connection details | ||
shell: bash -el {0} | ||
run: echo '{"project_name":"","port":null,"docker_compose_file":"","cache_file":""}' > ./tests/mssql_container/.mssql_container_cache.json | ||
- name: Start SQL Server LocalDB | ||
shell: bash -el {0} | ||
run: | | ||
SqlLocalDB.exe create "SQLLocalDB" | ||
SqlLocalDB.exe share "SQLLocalDB" "MSSQLLocalDB" | ||
SqlLocalDB.exe start "SQLLocalDB" | ||
- name: Establish login for SQL Server LocalDB | ||
shell: bash -el {0} | ||
run: | | ||
CONN_STR=$( | ||
SqlLocalDB.exe info "SQLLocalDB" \ | ||
| grep "Instance pipe name:" \ | ||
| sed 's/^Instance pipe name: \(.*\)$/\1/' | ||
) | ||
CREATE_USER_QUERY=$( | ||
cat <<EOF | ||
ALTER LOGIN sa ENABLE; | ||
GO | ||
ALTER LOGIN sa WITH PASSWORD = 'Passw0rd' UNLOCK; | ||
GO | ||
EXIT | ||
EOF | ||
) | ||
sqlcmd -b -j -S "$CONN_STR" -Q "$CREATE_USER_QUERY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
groups: | ||
gh-actions: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# ------------------------------------- PULL REQUEST LABELS ------------------------------------- # | ||
autolabeler: | ||
# Conventional Commit Types (https://github.com/commitizen/conventional-commit-types) | ||
- label: build | ||
title: | ||
- '/^build(\(.*\))?(\!)?\:/' | ||
- label: chore | ||
title: | ||
- '/^chore(\(.*\))?(\!)?\:/' | ||
- label: ci | ||
title: | ||
- '/^ci(\(.*\))?(\!)?\:/' | ||
- label: documentation | ||
title: | ||
- '/^docs(\(.*\))?(\!)?\:/' | ||
- label: enhancement | ||
title: | ||
- '/^feat(\(.*\))?(\!)?\:/' | ||
- label: fix | ||
title: | ||
- '/^fix(\(.*\))?(\!)?\:/' | ||
- label: performance | ||
title: | ||
- '/^perf(\(.*\))?(\!)?\:/' | ||
- label: refactor | ||
title: | ||
- '/^refactor(\(.*\))?(\!)?\:/' | ||
- label: revert | ||
title: | ||
- '/^revert(\(.*\))?(\!)?\:/' | ||
- label: style | ||
title: | ||
- '/^style(\(.*\))?(\!)?\:/' | ||
- label: test | ||
title: | ||
- '/^test(\(.*\))?(\!)?\:/' | ||
# Custom Types | ||
- label: breaking | ||
title: | ||
- '/^[a-z]+(\(.*\))?\!\:/' | ||
# ------------------------------------- AUTOMATIC VERSIONING ------------------------------------ # | ||
version-resolver: | ||
major: | ||
labels: | ||
- breaking | ||
minor: | ||
labels: | ||
- enhancement | ||
default: patch | ||
# ------------------------------------ RELEASE CONFIGURATION ------------------------------------ # | ||
name-template: "v$RESOLVED_VERSION" | ||
tag-template: "v$RESOLVED_VERSION" | ||
category-template: "### $TITLE" | ||
change-template: "- $TITLE by @$AUTHOR in [#$NUMBER]($URL)" | ||
replacers: | ||
# remove conventional commit tag & scope from change list | ||
- search: '/- [a-z]+(\(.*\))?(\!)?\: /g' | ||
replace: "- " | ||
template: | | ||
## What's Changed | ||
$CHANGES | ||
categories: | ||
- title: ⚠️ Breaking Changes | ||
labels: | ||
- breaking | ||
- title: ✨ New Features | ||
labels: | ||
- enhancement | ||
- title: 🐞 Bug Fixes | ||
labels: | ||
- fix | ||
- title: 🏎️ Performance Improvements | ||
labels: | ||
- performance | ||
- title: 📚 Documentation | ||
labels: | ||
- documentation | ||
- title: 🏗️ Testing | ||
labels: | ||
- test | ||
- title: ⚙️ Automation | ||
labels: | ||
- ci | ||
- title: 🛠 Builds | ||
labels: | ||
- build | ||
- title: 💎 Code Style | ||
labels: | ||
- style | ||
- title: 📦 Refactorings | ||
labels: | ||
- refactor | ||
- title: ♻️ Chores | ||
labels: | ||
- chore | ||
- title: 🗑 Reverts | ||
labels: | ||
- revert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
fetch-depth: 0 | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 | ||
with: | ||
environments: build | ||
- name: Build project | ||
run: pixi run -e build build-wheel | ||
- name: Check build artifact | ||
run: pixi run -e build twine-check | ||
- name: Upload package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist/* | ||
|
||
release: | ||
name: Publish package | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
environment: pypi | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: Publish package on PyPi | ||
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Chore | ||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [opened, reopened, edited, synchronize] | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-pr-title: | ||
name: Check PR Title | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- name: Check valid conventional commit message | ||
id: lint | ||
uses: amannn/action-semantic-pull-request@v5 | ||
with: | ||
subjectPattern: ^[A-Z].+[^. ]$ # subject must start with uppercase letter and may not end with a dot/space | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Post comment about invalid PR title | ||
if: failure() | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: conventional-commit-pr-title | ||
message: | | ||
Thank you for opening this pull request! 👋🏼 | ||
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. | ||
<details><summary><b>Details</b></summary> | ||
``` | ||
${{ steps.lint.outputs.error_message }} | ||
``` | ||
</details> | ||
- name: Delete comment about invalid PR title | ||
if: success() | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: conventional-commit-pr-title | ||
delete: true | ||
|
||
release-drafter: | ||
name: ${{ github.event_name == 'pull_request' && 'Assign Labels' || 'Draft Release' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: ${{ github.event_name == 'pull_request' && 'Assign labels' || 'Update release draft' }} | ||
uses: release-drafter/release-drafter@v6 | ||
with: | ||
disable-releaser: ${{ github.event_name == 'pull_request' }} | ||
disable-autolabeler: ${{ github.event_name == 'push' }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CI | ||
on: [push] | ||
|
||
# Automatically stop old builds on the same branch/PR | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 | ||
with: | ||
environments: default lint | ||
- name: pre-commit | ||
run: pixi run pre-commit-run --color=always --show-diff-on-failure | ||
|
||
unit-tests: | ||
name: pytest | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
environment: | ||
- py311 | ||
- py312 | ||
- no-sql | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install msodbcsql17 (Linux Only) | ||
if: ${{ matrix.environment != 'no-sql' && matrix.os == 'ubuntu-latest' }} | ||
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql17 -y | ||
- name: Launch MSSQL (Linux Only) | ||
if: ${{ matrix.environment != 'no-sql' && matrix.os == 'ubuntu-latest' }} | ||
uses: ./.github/actions/mssql-linux | ||
- name: Launch MSSQL (Windows Only) | ||
if: ${{ matrix.environment != 'no-sql' && matrix.os == 'windows-latest' }} | ||
uses: ./.github/actions/mssql-windows | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 | ||
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 ${{ matrix.environment=='no-sql' && '-m "not sql"' || ''}} |
Oops, something went wrong.