Skip to content

Commit 57bb349

Browse files
adityagoel4512cbourjauneNasko1
committed
Squash up to 0.4.0
Co-authored-by: Aditya Goel <[email protected]> Co-authored-by: Christian Bourjau <[email protected]> Co-authored-by: Atanas Dimitrov <[email protected]>
0 parents  commit 57bb349

Some content is hidden

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

72 files changed

+22318
-0
lines changed

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
* text=auto
2+
3+
*.{diff,patch} binary
4+
5+
*.{py,yaml,yml,sh} text eol=lf
6+
*.bat text eol=crlf
7+
8+
pixi.lock linguist-language=YAML linguist-generated=true

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @adityagoel4512 @cbourjau

.github/dependabot.yml

+12
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+
reviewers:
8+
- quantco/ci
9+
groups:
10+
gh-actions:
11+
patterns:
12+
- "*"

.github/workflows/array-api.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Array API coverage tests
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
schedule:
7+
- cron: "0 8 * * *"
8+
9+
# Automatically stop old builds on the same branch/PR
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
array-api-tests:
16+
# Run if the commit message contains 'run array-api tests' or if the job is triggered on schedule
17+
if: >-
18+
contains(github.event.head_commit.message, 'run array-api tests') ||
19+
github.event_name == 'schedule'
20+
name: Array API test
21+
timeout-minutes: 90
22+
runs-on: ubuntu-latest-8core
23+
steps:
24+
- name: Checkout branch
25+
uses: actions/checkout@v4
26+
with:
27+
ref: ${{ github.head_ref }}
28+
fetch-depth: 0
29+
submodules: recursive
30+
- name: Set up pixi
31+
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
32+
- name: Install repository
33+
run: pixi run postinstall
34+
- name: Run Array API tests
35+
env:
36+
ARRAY_API_TESTS_MODULE: ndonnx
37+
run: |
38+
pushd api-coverage-tests
39+
pixi run pytest --ci --max-examples 2 array_api_tests/ --json-report --json-report-file=api-coverage-tests.json -n auto -vv --skips-file=../skips.txt
40+
popd
41+
- name: Upload Array API tests report
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: api-coverage-tests
45+
path: api-coverage-tests/api-coverage-tests.json

.github/workflows/build.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- "*"
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
ref: ${{ github.ref }}
17+
fetch-depth: 0
18+
- name: Set up pixi
19+
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
20+
with:
21+
environments: build
22+
- name: Build project
23+
run: pixi run -e build build-wheel
24+
- name: Upload package
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: artifact
28+
path: dist/*
29+
30+
release:
31+
name: Publish package
32+
if: startsWith(github.ref, 'refs/tags/')
33+
needs: [build]
34+
runs-on: ubuntu-latest
35+
permissions:
36+
id-token: write
37+
environment: pypi
38+
steps:
39+
- uses: actions/download-artifact@v4
40+
with:
41+
name: artifact
42+
path: dist
43+
- name: Publish package on TestPyPi
44+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
45+
with:
46+
repository-url: https://test.pypi.org/legacy/
47+
- name: Publish package on PyPi
48+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450

.github/workflows/ci.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
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@v4
20+
- name: Set up pixi
21+
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
22+
with:
23+
environments: default lint
24+
- name: pre-commit
25+
run: pixi run pre-commit-run --color=always --show-diff-on-failure
26+
27+
unit-tests:
28+
name: pytest
29+
timeout-minutes: 30
30+
runs-on: ${{ matrix.os }}
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
os:
35+
- ubuntu-latest
36+
- macos-latest
37+
- windows-latest
38+
environment:
39+
- py310
40+
- py311
41+
- py312
42+
steps:
43+
- name: Checkout branch
44+
uses: actions/checkout@v4
45+
with:
46+
ref: ${{ github.head_ref }}
47+
fetch-depth: 0
48+
- name: Set up pixi
49+
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
50+
with:
51+
environments: ${{ matrix.environment }}
52+
- name: Install repository
53+
run: pixi run -e ${{ matrix.environment }} postinstall
54+
- name: Run pytest
55+
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes

.github/workflows/docs.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Documentation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
name: Build Docs
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.head_ref }}
21+
fetch-depth: 0
22+
- name: Set up pixi
23+
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659
24+
with:
25+
environments: docs
26+
- name: Install package
27+
run: pixi run -e docs postinstall
28+
- name: Build docs
29+
run: pixi run docs
30+
- name: Upload html
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: docs
34+
path: docs/_build/html
35+
- name: Publish docs
36+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
37+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_dir: ./docs/_build/html

0 commit comments

Comments
 (0)