Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
kklein committed Feb 5, 2024
0 parents commit d1d5e70
Show file tree
Hide file tree
Showing 22 changed files with 933 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto

*.{diff,patch} binary

*.{py,yaml,yml,sh} text eol=lf
*.bat text eol=crlf
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @kklein
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--
Thank you for pull request.
Below are a few things we ask you kindly to self-check before getting a review. Remove checks that are not relevant.
-->

# Checklist

- [ ] Added a `CHANGELOG.rst` entry
8 changes: 8 additions & 0 deletions .github/assets/.condarc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repodata_use_zst: true
channels:
- qc-internal
- conda-forge
custom_channels:
qc-internal: https://conda.prod.quantco.cloud/t/${QUETZ_API_KEY}/get/
conda_build:
pkg_format: 2
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
registries:
github:
type: git
url: https://github.com
username: x-access-token
password: ${{ secrets.DEPENDABOT_CONTENT_PAT }}
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
reviewers:
- quantco/ci
registries:
- github
groups:
dependencies:
patterns:
- "*"
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI
on: [push]

# Automatically stop old builds on the same branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -el {0}

env:
QUETZ_API_KEY: ${{ secrets.QUETZ_API_KEY }}

jobs:
pre-commit-checks:
name: Pre-commit checks - Python 3.10
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Run pre-commit-conda
uses: quantco/pre-commit-conda@v1
with:
python-version: "3.10"

linux-unittests:
name: "Linux - unit tests - Python ${{ matrix.PYTHON_VERSION }}"
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Fetch full git history
run: git fetch --prune --unshallow
- name: Set up Conda env
uses: mamba-org/setup-micromamba@8767fb704bd78032e9392f0386bf46950bdd1194
with:
condarc-file: .github/assets/.condarc
environment-file: environment.yml
cache-environment: true
create-args: >-
python=${{ matrix.PYTHON_VERSION }}
pytest-md
pytest-emoji
- name: Install repository
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
- name: Run unittests
uses: quantco/pytest-action@v2
with:
report-title: "Unit tests Linux - Python ${{ matrix.PYTHON_VERSION }}"
custom-arguments: --cov-report=xml ./tests
21 changes: 21 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Package
on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Build conda package
uses: quantco/[email protected]
with:
quetz-api-key: ${{ secrets.QUETZ_API_KEY }}
upload-quetz: ${{ startsWith(github.ref, 'refs/tags/') }}
Loading

0 comments on commit d1d5e70

Please sign in to comment.