-
Notifications
You must be signed in to change notification settings - Fork 0
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 5864140
Showing
77 changed files
with
9,438 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,19 @@ | ||
# This file is managed by Copier; DO NOT EDIT OR REMOVE. | ||
_commit: v0.11.1 | ||
_src_path: [email protected]:Quantco/copier-template-python.git | ||
add_windows_tests_to_ci: false | ||
build_conda_package: true | ||
build_docs: true | ||
github_url: https://github.com/quantco/ndonnx | ||
github_user: adityagoel4512 | ||
lint_sql_dialect: none | ||
project_name: ndonnx | ||
project_short_description: "ONNX-backed array library that is compliant with the Array API standard" | ||
project_slug: ndonnx | ||
project_versioning: semver-pre-v1 | ||
strip_jupyter_notebook_output: false | ||
use_changelog: true | ||
use_conventional_commits: false | ||
use_devcontainer: false | ||
use_mypy: true | ||
use_rattler_build: true |
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,6 @@ | ||
* text=auto | ||
|
||
*.{diff,patch} binary | ||
|
||
*.{py,yaml,yml,sh} text eol=lf | ||
*.bat text eol=crlf |
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 @@ | ||
* @adityagoel4512 @cbourjau |
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,3 @@ | ||
# Checklist | ||
|
||
- [ ] Added a `CHANGELOG.rst` entry |
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,5 @@ | ||
repodata_use_zst: true | ||
channels: | ||
- conda-forge | ||
conda_build: | ||
pkg_format: 2 |
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,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: | ||
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,59 @@ | ||
name: Array API coverage tests | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
schedule: | ||
- cron: "0 8 * * *" | ||
|
||
# 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: | ||
array-api-tests: | ||
# Run if the commit message contains 'run array-api tests' or if the job is triggered on schedule | ||
if: >- | ||
contains(github.event.head_commit.message, 'run array-api tests') || | ||
github.event_name == 'schedule' | ||
name: "Array API test" | ||
timeout-minutes: 90 | ||
runs-on: ubuntu-latest-16core | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.head_ref }} | ||
fetch-depth: 0 | ||
submodules: "recursive" | ||
- name: Set up Conda env | ||
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 | ||
with: | ||
condarc-file: .github/assets/.condarc | ||
environment-file: environment.yml | ||
create-args: >- | ||
python=3.12 | ||
pytest-md | ||
pytest-emoji | ||
- name: Install repository | ||
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e . | ||
- name: Run Array API tests | ||
env: | ||
ARRAY_API_TESTS_MODULE: ndonnx | ||
run: | | ||
pushd api-coverage-tests | ||
pytest --ci --max-examples 2 array_api_tests/ --json-report --json-report-file=api-coverage-tests.json -n auto -vv --skips-file=../skips.txt | ||
popd | ||
- name: Upload Array API tests report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: api-coverage-tests | ||
path: api-coverage-tests/api-coverage-tests.json |
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,88 @@ | ||
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 | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
env: | ||
PRE_COMMIT_USE_MICROMAMBA: 1 | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
# needed for 'pre-commit-mirrors-insert-license' | ||
fetch-depth: 0 | ||
- name: Run pre-commit-conda | ||
uses: quantco/pre-commit-conda@v1 | ||
mypy-type-checks: | ||
name: Mypy Type Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
fetch-depth: 0 | ||
- name: Set up Conda env | ||
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 | ||
with: | ||
condarc-file: .github/assets/.condarc | ||
environment-file: environment.yml | ||
cache-environment: true | ||
- name: Install repository | ||
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e . | ||
- name: Run mypy | ||
run: mypy . | ||
|
||
unit-tests: | ||
name: Unit Tests - ${{ matrix.os == 'ubuntu-latest-8core' && 'Linux' || 'Windows' }} - Python ${{ matrix.python-version }} | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.head_ref }} | ||
fetch-depth: 0 | ||
- name: Set up Conda env | ||
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 | ||
with: | ||
condarc-file: .github/assets/.condarc | ||
environment-file: environment.yml | ||
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: Checkout Quantco/pytest-action | ||
uses: actions/[email protected] | ||
with: | ||
repository: Quantco/pytest-action | ||
ref: v2 | ||
token: ${{ secrets.FQ_GH_TOKEN }} | ||
path: .github/pytest-action | ||
- name: Run unittests | ||
uses: quantco/pytest-action@v2 | ||
with: | ||
report-title: "Unit tests Linux - Python ${{ matrix.PYTHON_VERSION }}" |
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,68 @@ | ||
name: Documentation | ||
on: [push] | ||
|
||
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: | ||
build: | ||
name: Build Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
fetch-depth: 0 | ||
- name: Setup conda | ||
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 | ||
with: | ||
condarc-file: .github/assets/.condarc | ||
environment-file: environment.yml | ||
- name: Install package | ||
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e . | ||
- name: Build docs | ||
run: cd docs && make html | ||
- name: Upload html | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: docs/_build/html | ||
|
||
upload: | ||
name: Upload Docs | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: Download html | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: docs | ||
- name: Authenticate with GCP | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
workload_identity_provider: projects/610600912298/locations/global/workloadIdentityPools/doqker-devel-github-actions-pool/providers/github-actions-provider | ||
service_account: [email protected] | ||
token_format: access_token | ||
- name: Setup gcloud | ||
uses: google-github-actions/setup-gcloud@v2 | ||
- name: Set ref (release) | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: echo "docs-path=${{ github.ref_name }}" >> $GITHUB_ENV | ||
- name: Set ref (main) | ||
if: github.ref == 'refs/heads/main' | ||
run: echo "docs-path=latest" >> $GITHUB_ENV | ||
- name: Set ref (pull_request) | ||
if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/main' | ||
run: echo "docs-path=${{ github.ref }}" >> $GITHUB_ENV | ||
- name: Upload to Google Cloud Storage | ||
run: gcloud storage cp -r * gs://qc-github-artifacts/${{ github.repository }}/${{ env.docs-path }}/ |
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,22 @@ | ||
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 }} | ||
fetch-depth: 0 | ||
- name: Build conda package | ||
uses: quantco/[email protected] | ||
with: | ||
quetz-api-key: ${{ secrets.QUETZ_API_KEY }} | ||
upload-quetz: ${{ startsWith(github.ref, 'refs/tags/') }} |
Oops, something went wrong.