-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
4f31692
commit 411f9af
Showing
86 changed files
with
25,941 additions
and
211 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
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
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,80 +1,69 @@ | ||
name: CI | ||
|
||
on: push | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit-checks: | ||
name: "Linux - pre-commit hooks - Python 3.8" | ||
name: Pre-commit Checks | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
- name: Install Python 3.8 | ||
uses: actions/setup-python@v5 | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 | ||
with: | ||
python-version: 3.8 | ||
- name: Run pre-commit checks | ||
uses: pre-commit/[email protected] | ||
environments: default lint | ||
- name: pre-commit | ||
run: pixi run pre-commit-run --color=always --show-diff-on-failure | ||
|
||
tests: | ||
name: "Linux - unit tests - ${{ matrix.OS }} - Python ${{ matrix.PYTHON_VERSION }}" | ||
runs-on: ${{ matrix.OS }} | ||
env: | ||
CI: True | ||
unit-tests: | ||
name: pytest | ||
timeout-minutes: 30 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
OS: ["ubuntu-latest"] | ||
PYTHON_VERSION: ['3.8', '3.9', '3.10', '3.11'] | ||
include: | ||
- OS: macos-latest-xlarge | ||
PYTHON_VERSION: "3.11" | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
environment: | ||
- py39 | ||
- py310 | ||
- py311 | ||
- py312 | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- uses: mamba-org/setup-micromamba@v1 | ||
fetch-depth: 0 | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 | ||
with: | ||
environment-file: environment.yml | ||
create-args: >- | ||
python=${{ matrix.PYTHON_VERSION }} | ||
- name: Run unit tests | ||
shell: bash -l {0} | ||
run: | | ||
pip install . | ||
pytest | ||
environments: ${{ matrix.environment }} | ||
- name: Install repository | ||
run: pixi run -e ${{ matrix.environment }} postinstall | ||
- name: Run pytest | ||
run: pixi run -e ${{ matrix.environment }} test | ||
|
||
opset-generation: | ||
name: "Linux - opset generation - ${{ matrix.OS }} - Python ${{ matrix.PYTHON_VERSION }}" | ||
runs-on: ${{ matrix.OS }} | ||
name: "Linux - opset generation" | ||
runs-on: ubuntu-latest | ||
env: | ||
CI: True | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
OS: ["ubuntu-latest", "macos-latest"] | ||
PYTHON_VERSION: ['3.8'] | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- uses: mamba-org/setup-micromamba@v1 | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 | ||
with: | ||
environment-file: environment.yml | ||
create-args: >- | ||
python=${{ matrix.PYTHON_VERSION }} | ||
environments: opset-generation | ||
- name: Run code generation | ||
shell: bash -l {0} | ||
env: | ||
PRE_COMMIT_USE_MICROMAMBA: 1 | ||
run: | | ||
pip install . | ||
pre-commit install | ||
python tools/generate_opset.py | ||
git diff --exit-code | ||
run: pixi run -e opset-generation generate-opset |
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
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 |
---|---|---|
|
@@ -124,3 +124,6 @@ mlruns | |
|
||
# MacOS | ||
.DS_Store | ||
# 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,22 +1,52 @@ | ||
exclude: ^.pixi$ | ||
repos: | ||
- repo: https://github.com/Quantco/pre-commit-mirrors-ruff | ||
rev: 0.6.2 | ||
- repo: local | ||
hooks: | ||
- id: ruff-conda | ||
- id: ruff-format-conda | ||
- repo: https://github.com/Quantco/pre-commit-mirrors-mypy | ||
rev: "1.10.1" | ||
hooks: | ||
- id: mypy-conda | ||
additional_dependencies: [-c, conda-forge, types-setuptools] | ||
- repo: https://github.com/Quantco/pre-commit-mirrors-pyupgrade | ||
rev: 3.15.2 | ||
hooks: | ||
- id: pyupgrade-conda | ||
args: | ||
- --py38 | ||
- repo: https://github.com/Quantco/pre-commit-mirrors-prettier | ||
rev: 3.2.5 | ||
hooks: | ||
- id: prettier-conda | ||
files: "\\.md$" | ||
# ensure pixi environments are up to date | ||
# workaround for https://github.com/prefix-dev/pixi/issues/1482 | ||
- id: pixi-install | ||
name: pixi-install | ||
entry: pixi install -e py39 -e lint | ||
language: system | ||
always_run: true | ||
require_serial: true | ||
pass_filenames: false | ||
# insert-license | ||
- id: insert-license | ||
name: insert-license | ||
entry: >- | ||
pixi run -e lint | ||
insert-license | ||
--license-base64 Q29weXJpZ2h0IChjKSBRdWFudENvIDIwMjMtMjAyNApTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQlNELTMtQ2xhdXNlCg== | ||
--dynamic-years | ||
--comment-style "#" | ||
language: system | ||
types: [python] | ||
# ruff | ||
- id: ruff | ||
name: ruff | ||
entry: pixi run -e lint ruff check --fix --exit-non-zero-on-fix --force-exclude --target-version py39 | ||
language: system | ||
types_or: [python, pyi] | ||
require_serial: true | ||
- id: ruff-format | ||
name: ruff-format | ||
entry: pixi run -e lint ruff format --force-exclude --target-version py39 | ||
language: system | ||
types_or: [python, pyi] | ||
require_serial: true | ||
# mypy | ||
- id: mypy | ||
name: mypy | ||
entry: pixi run -e default mypy | ||
language: system | ||
types: [python] | ||
require_serial: true | ||
exclude: ^(tests|api-coverage-tests)/ | ||
# prettier | ||
- id: prettier | ||
name: prettier | ||
entry: pixi run -e lint prettier --write --list-different --ignore-unknown | ||
language: system | ||
types: [text] | ||
files: \.(md|yml|yaml)$ |
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,15 +1,10 @@ | ||
version: 2 | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: mambaforge-4.10 | ||
sphinx: | ||
configuration: docs/conf.py | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
conda: | ||
environment: environment.yml | ||
formats: | ||
os: "ubuntu-22.04" | ||
commands: | ||
- curl -fsSL https://pixi.sh/install.sh | bash | ||
- chmod +x ~/.pixi/bin/pixi | ||
- ~/.pixi/bin/pixi run -e docs postinstall | ||
- ~/.pixi/bin/pixi run -e docs build-docs | ||
- mkdir -p $READTHEDOCS_OUTPUT/html/ | ||
- cp -r docs/_build/html/** $READTHEDOCS_OUTPUT/html/ |
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.