-
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.
Merge pull request #1 from VectorInstitute/initial_port
Initial commit, porting from cyclops repo
- Loading branch information
Showing
78 changed files
with
14,475 additions
and
1 deletion.
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,26 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Describe the bug | ||
A clear and concise description of what the bug is. | ||
|
||
### To Reproduce | ||
Code snippet or clear steps to reproduce behaviour. | ||
|
||
### Expected behavior | ||
A clear and concise description of what you expected to happen. | ||
|
||
### Screenshots | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
### Version | ||
- Version info such as v0.1.5 | ||
|
||
### Additional context | ||
Add any other context about the problem here. |
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 @@ | ||
blank_issues_enabled: false |
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 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Is your feature request related to a problem? Please describe. | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
### Describe the solution you'd like | ||
A clear and concise description of what you want to happen. | ||
|
||
### Describe alternatives you've considered | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
### Additional context | ||
Add any other context or screenshots about the feature request here. |
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,7 @@ | ||
# PR Type ([Feature | Fix | Documentation | Test]) | ||
|
||
## Short Description | ||
... | ||
|
||
## Tests Added | ||
... |
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,41 @@ | ||
name: code checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .pre-commit-config.yaml | ||
- .github/workflows/code_checks.yml | ||
- '**.py' | ||
- poetry.lock | ||
- pyproject.toml | ||
- '**.ipynb' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- .pre-commit-config.yaml | ||
- .github/workflows/code_checks.yml | ||
- '**.py' | ||
- poetry.lock | ||
- pyproject.toml | ||
- '**.ipynb' | ||
|
||
jobs: | ||
run-code-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- name: Install dependencies and check code | ||
run: | | ||
poetry env use '3.10' | ||
source $(poetry env info --path)/bin/activate | ||
poetry install --without docs | ||
pre-commit run --all-files |
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,48 @@ | ||
name: docs (build) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- .pre-commit-config.yaml | ||
- .github/workflows/docs_build.yml | ||
- '**.py' | ||
- '**.ipynb' | ||
- poetry.lock | ||
- pyproject.toml | ||
- '**.rst' | ||
- '**.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, db] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
- name: Install dependencies, build docs and coverage report | ||
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- run: | | ||
python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
poetry env use '3.10' | ||
source $(poetry env info --path)/bin/activate | ||
poetry install | ||
# pandoc README.md -f markdown -t rst -s -o docs/source/intro.rst | ||
cd docs && rm -rf source/reference/api/_autosummary && make html | ||
cd .. && coverage run -m pytest -m "not integration_test" && coverage xml && coverage report -m | ||
- name: Upload coverage to Codecov | ||
uses: Wandalen/[email protected] | ||
with: | ||
action: codecov/[email protected] | ||
with: | | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
name: codecov-umbrella | ||
fail_ci_if_error: true | ||
attempt_limit: 5 | ||
attempt_delay: 30000 |
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,56 @@ | ||
name: docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .pre-commit-config.yaml | ||
- .github/workflows/code_checks.yml | ||
- .github/workflows/docs_build.yml | ||
- .github/workflows/docs_deploy.yml | ||
- .github/workflows/integration_tests.yml | ||
- '**.py' | ||
- '**.ipynb' | ||
- poetry.lock | ||
- pyproject.toml | ||
- '**.rst' | ||
- '**.md' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: [self-hosted, db] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
- name: Install dependencies, build docs and coverage report | ||
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
- run: | | ||
poetry env use '3.10' | ||
source $(poetry env info --path)/bin/activate | ||
poetry install | ||
# pandoc README.md -f markdown -t rst -s -o docs/source/intro.rst | ||
cd docs && rm -rf source/reference/api/_autosummary && make html | ||
cd .. && coverage run -m pytest -m "not integration_test" && coverage xml && coverage report -m | ||
- name: Upload coverage to Codecov | ||
uses: Wandalen/[email protected] | ||
with: | ||
action: codecov/[email protected] | ||
with: | | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
name: codecov-umbrella | ||
fail_ci_if_error: true | ||
attempt_limit: 5 | ||
attempt_delay: 30000 | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: github_pages | ||
publish_dir: docs/build |
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,61 @@ | ||
name: integration tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .pre-commit-config.yaml | ||
- .github/workflows/code_checks.yml | ||
- .github/workflows/docs_build.yml | ||
- .github/workflows/docs_deploy.yml | ||
- .github/workflows/integration_tests.yml | ||
- '**.py' | ||
- '**.ipynb' | ||
- poetry.lock | ||
- pyproject.toml | ||
- '**.rst' | ||
- '**.md' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- .pre-commit-config.yaml | ||
- .github/workflows/code_checks.yml | ||
- .github/workflows/docs_build.yml | ||
- .github/workflows/docs_deploy.yml | ||
- .github/workflows/integration_tests.yml | ||
- '**.py' | ||
- '**.ipynb' | ||
- poetry.lock | ||
- pyproject.toml | ||
- '**.rst' | ||
- '**.md' | ||
|
||
jobs: | ||
integration-tests: | ||
runs-on: [self-hosted, db] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pip install poetry | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies and check code | ||
run: | | ||
poetry env use '3.10' | ||
source $(poetry env info --path)/bin/activate | ||
poetry install --without docs | ||
coverage run -m pytest -m integration_test && coverage xml && coverage report -m | ||
- name: Upload coverage to Codecov | ||
uses: Wandalen/[email protected] | ||
with: | ||
action: codecov/[email protected] | ||
with: | | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
name: codecov-umbrella | ||
fail_ci_if_error: true | ||
attempt_limit: 5 | ||
attempt_delay: 30000 |
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,27 @@ | ||
name: publish package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install apt dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libcurl4-openssl-dev libssl-dev | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Build package | ||
run: poetry build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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,30 @@ | ||
*__pycache__* | ||
*.log | ||
docs/build | ||
.python-version | ||
*.DS_Store | ||
htmlcov | ||
.coverage | ||
venv | ||
.ipynb_checkpoints | ||
*.pt | ||
*.csv | ||
mlruns | ||
.profile | ||
.env | ||
*.html | ||
_extract | ||
*.gzip | ||
*checkpoint* | ||
*.parquet | ||
*.npy | ||
*.pkl | ||
*.npz | ||
*.csv | ||
*.pickle | ||
dist/ | ||
outputs/ | ||
multirun/ | ||
_autosummary | ||
*cyclops_reports* | ||
*dummy_reports* |
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,61 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 # Use the ref you want to point at | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: requirements-txt-fixer | ||
- id: check-yaml | ||
- id: check-toml | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: 'v0.1.0' | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
types_or: [python, jupyter] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.5.1 | ||
hooks: | ||
- id: mypy | ||
entry: python3 -m mypy --config-file pyproject.toml | ||
language: system | ||
types: [python] | ||
exclude: "tests" | ||
|
||
- repo: local | ||
hooks: | ||
- id: nbstripout | ||
name: nbstripout | ||
language: python | ||
entry: nbstripout | ||
exclude: ^docs/source/tutorials/gemini.ipynb | ||
|
||
- repo: https://github.com/nbQA-dev/nbQA | ||
rev: 1.7.0 | ||
hooks: | ||
- id: nbqa-black | ||
- id: nbqa-ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
|
||
- repo: local | ||
hooks: | ||
- id: pytest | ||
name: pytest | ||
entry: python3 -m pytest -m "not integration_test" | ||
language: system | ||
pass_filenames: false | ||
always_run: true |
Oops, something went wrong.