-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
17 changed files
with
18,176 additions
and
2,315 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
|
||
*.{py,yaml,yml,sh} text eol=lf | ||
*.bat text eol=crlf | ||
pixi.lock linguist-language=YAML linguist-generated=true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: "weekly" | ||
reviewers: | ||
- "quantco/ci" | ||
interval: monthly | ||
groups: | ||
gh-actions: | ||
patterns: | ||
- "*" |
File renamed without changes.
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 |
---|---|---|
|
@@ -2,30 +2,54 @@ name: Release | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*.*.*' | ||
pull_request: | ||
|
||
jobs: | ||
release: | ||
name: 'Build and Release on PyPi' | ||
build: | ||
name: Build Package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Environment | ||
uses: ./.github/actions/setup | ||
- name: Set up pixi | ||
uses: prefix-dev/setup[email protected] | ||
with: | ||
python-version: '3.11' | ||
environments: release | ||
|
||
- name: Build | ||
run: poetry build | ||
run: pixi run -e release hatch build | ||
|
||
- name: Check distributions | ||
run: ls -la dist | ||
- name: List files | ||
run: ls -l dist/ | ||
|
||
- name: Publish to PyPI | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | ||
run: poetry publish | ||
- 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 | ||
contents: write | ||
environment: pypi | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: Publish package on TestPyPi | ||
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
- 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 |
---|---|---|
|
@@ -13,56 +13,62 @@ on: | |
- '**' | ||
|
||
jobs: | ||
|
||
Linting: | ||
name: "Linting - pre-commit hooks - Python 3.9" | ||
lint: | ||
name: Pre-commit Checks | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Python 3.9 | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Linting - Run pre-commit checks | ||
uses: pre-commit/[email protected].0 | ||
uses: pre-commit/[email protected].1 | ||
|
||
Tests: | ||
name: "${{ matrix.os }} / ${{ matrix.python-version }}" | ||
runs-on: ${{ matrix.os }}-latest | ||
test: | ||
name: pytest | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [Ubuntu] | ||
python-version: ['3.9', '3.10', '3.11'] | ||
os: | ||
- ubuntu-latest | ||
environment: | ||
- py39 | ||
- py310 | ||
- py311 | ||
- py312ibmdb | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Environment | ||
uses: ./.github/actions/setup | ||
- name: Setup Pixi | ||
uses: prefix-dev/setup[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
poetry-flags: --all-extras --with=tests | ||
environments: ${{ matrix.environment }} | ||
|
||
- name: Start Docker Compose | ||
uses: isbang/compose-action@v1.4.1 | ||
uses: isbang/compose-action@e5813a5909aca4ae36058edae58f6e52b9c971f8 | ||
with: | ||
compose-file: ./docker-compose.yaml | ||
compose-file: docker-compose.yaml | ||
|
||
- name: Install Microsoft ODBC | ||
run: sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 | ||
|
||
- name: Wait for Docker Servers | ||
timeout-minutes: 1 | ||
shell: bash | ||
run: | | ||
until bash ./.github/workflows/resources/docker_compose_ready.sh; do | ||
sleep 2 | ||
until bash ./.github/scripts/docker_compose_ready.sh; do | ||
sleep 1 | ||
done | ||
- name: Run Tests | ||
uses: ./.github/actions/test | ||
with: | ||
arguments: --postgres --mssql | ||
- name: Run tests | ||
env: | ||
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }} | ||
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }} | ||
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }} | ||
run: | | ||
pixi run -e ${{ matrix.environment }} pytest tests -ra ${RUNNER_DEBUG:+-v} --color=yes --workers=4 --postgres --mssql | ||
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,36 @@ | ||
name: Update lockfiles | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 5 1 * * | ||
|
||
jobs: | ||
pixi-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up pixi | ||
uses: prefix-dev/[email protected] | ||
with: | ||
run-install: false | ||
- name: Update lockfiles | ||
run: | | ||
set -euo pipefail | ||
pixi update --json --no-install | pixi exec pixi-diff-to-markdown >> diff.md | ||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Update pixi lockfile | ||
title: Update pixi lockfile | ||
body-path: diff.md | ||
branch: update-pixi | ||
base: main | ||
labels: pixi | ||
delete-branch: true | ||
add-paths: pixi.lock |
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 |
---|---|---|
|
@@ -120,3 +120,6 @@ mlruns | |
|
||
# direnv | ||
.envrc | ||
# pixi environments | ||
.pixi | ||
*.egg-info |
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 |
---|---|---|
@@ -1,16 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
language_version: python3.9 | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.270 | ||
rev: v0.5.7 | ||
hooks: | ||
- id: ruff | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py39-plus | ||
- id: ruff-format |
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
Oops, something went wrong.