-
Notifications
You must be signed in to change notification settings - Fork 1
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 #3 from scientificcomputing/finsberg/updates
Restructure repo and add workflow for reproducing results
- Loading branch information
Showing
25 changed files
with
935 additions
and
380 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
data/* | ||
code/results/* | ||
code/figures/* | ||
_build | ||
|
||
|
||
### Python ### | ||
|
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.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Pre-commit | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
|
||
jobs: | ||
check-code: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
# This action sets the current path to the root of your github repo | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install pre-commit | ||
run: python3 -m pip install pre-commit | ||
|
||
- name: Run hooks | ||
run: pre-commit run --all |
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 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Reproduce results | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
# Directory that will be published on github pages | ||
DATAPATH: ./artifacts/data/data.json | ||
FIGDIR: ./artifacts/figures | ||
RESULTDIR: ./artifacts/results | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Cache | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
key: cache_v1 | ||
restore-keys: | | ||
cache_v1 | ||
- name: Install dependencies | ||
run: python3 -m pip install -r requirements.txt | ||
|
||
- name: Run pre-processing | ||
run: python3 code/pre_processing.py --datapath=${{ env.DATAPATH }} | ||
|
||
- name: Run simulation | ||
run: python3 code/run_all.py --resultdir=${{ env.RESULTDIR }} | ||
|
||
- name: Postprocess | ||
run: python3 code/postprocess.py --resultdir=${{ env.RESULTDIR }} --datapath=${{ env.DATAPATH }} --figdir=${{ env.FIGDIR }} | ||
|
||
- name: Upload artifact | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./artifacts | ||
if-no-files-found: error |
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,41 +1,40 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-docstring-first | ||
- id: debug-statements | ||
- id: requirements-txt-fixer | ||
- id: check-added-large-files | ||
- id: check-toml | ||
|
||
- repo: https://github.com/asottile/reorder_python_imports | ||
rev: v3.8.3 | ||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v3.1.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
- id: add-trailing-comma | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
rev: 23.10.1 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.0.0 | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
# Ruff version. | ||
rev: 'v0.1.4' | ||
hooks: | ||
- id: flake8 | ||
- id: ruff | ||
|
||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v2.3.0 | ||
hooks: | ||
- id: add-trailing-comma | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.982 | ||
rev: v1.6.1 | ||
hooks: | ||
- id: mypy | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.1.0 | ||
- repo: https://github.com/streetsidesoftware/cspell-cli | ||
rev: v7.3.2 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
- id: cspell | ||
files: docs/(.+).md|README.md |
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,5 +1,5 @@ | ||
format: jb-book | ||
root: index | ||
root: README | ||
|
||
chapters: | ||
- file: docs/abstract | ||
|
Oops, something went wrong.