-
Notifications
You must be signed in to change notification settings - Fork 1
Refactored main and restructured code #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a977ae7
f4ac3b4
5e995b8
91008f4
c72f9a9
61e48c2
3141e13
8f5ac66
37cfa63
91e0b53
527fcfe
55a8a16
acdb0bc
7f0b676
ee51566
91a1018
468f10c
23a7817
5ca4174
bd2ede2
a153faf
9b32880
7aba2e1
e6e043d
2165bed
9433f76
c7ff474
a4c7b5c
8068cd2
613a20f
bc67edc
035e8a0
823c1a7
228a2aa
2fdade9
6957aa0
ca350c6
df7bf1c
efe180f
e3666b3
d374d83
0977398
4afbf21
30c46ff
3d951e3
23c18fc
a022975
9c7fe8d
6519911
3303b48
3fc6f1a
8cf995a
a7bcf18
3fae733
c5a1575
b43d1f9
1aca178
bbabcbe
af39d8b
f7fd1f2
308396f
c8d9be9
02bac19
32edb8a
7f49709
a2064b4
4e38157
944b922
bf172d9
4a1bccb
554fa54
539df0b
ef4d9eb
f35b911
643b52e
cbb54a1
cac7ffb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| [run] | ||
| source = src | ||
| omit = | ||
| src/data_assimilation/* | ||
| src/inputs/* | ||
| src/utils/debug_helpers.py | ||
| */tests/* | ||
| */test_* | ||
| setup.py | ||
|
|
||
| [report] | ||
| exclude_lines = | ||
| pragma: no cover | ||
| def __repr__ | ||
| raise AssertionError | ||
| raise NotImplementedError | ||
| if __name__ == .__main__.: | ||
|
|
||
| [html] | ||
| directory = htmlcov |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| name: deploy | ||
|
|
||
| on: [push, pull_request, workflow_dispatch] | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| integration-tests: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| # Skip setup-python if running under act | ||
| - name: Set up Python (GitHub only) | ||
| if: ${{ !env.ACT }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| # Show system Python version when running under act | ||
| - name: Use system Python (act) | ||
| if: ${{ env.ACT }} | ||
| run: | | ||
| echo "Using system Python" | ||
| which python | ||
| python --version | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pip install -r dev-requirements.txt | ||
| pip install . | ||
|
|
||
| - name: Run tests without coverage | ||
| run: | | ||
| # pytest --cov=src --cov-report=xml --cov-report=html --cov-report=term | ||
| pytest ./test_scripts/test_blending.py | ||
| pytest ./test_scripts/test_flow_solver.py | ||
|
|
||
| # - name: Upload coverage HTML report | ||
| # if: ${{ !env.ACT }} | ||
| # uses: actions/upload-artifact@v4 | ||
| # with: | ||
| # name: coverage-html | ||
| # path: htmlcov/ | ||
|
|
||
| - name: Upload test plots and logs | ||
| if: ${{ !env.ACT }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-outputs | ||
| path: | | ||
| outputs/**/*.png | ||
| logs/**/*.log | ||
| !outputs/**/*.dat | ||
| !outputs/**/*.h5 | ||
|
|
||
| # docs: | ||
| # runs-on: ubuntu-latest | ||
| # steps: | ||
| # - uses: actions/checkout@v4 | ||
|
|
||
| # - uses: ConorMacBride/install-package@v1 | ||
| # with: | ||
| # apt: graphviz | ||
|
|
||
| # - uses: actions/setup-python@v5 | ||
| # with: | ||
| # python-version: '3.10' | ||
|
|
||
| # - uses: actions/cache@v4 | ||
| # with: | ||
| # path: ~/.cache/pip | ||
| # key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }} | ||
| # restore-keys: | | ||
| # ${{ runner.os }}-pip- | ||
|
|
||
| # - name: Install dependencies | ||
| # run: | | ||
| # pip install -r dev-requirements.txt | ||
| # pip install . | ||
|
|
||
| # - name: Sphinx build | ||
| # run: | | ||
| # sphinx-build docs/source _build | ||
|
|
||
| # - name: Deploy to GitHub Pages | ||
| # uses: peaceiris/actions-gh-pages@v4 | ||
| # if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
| # with: | ||
| # publish_branch: gh-pages | ||
| # github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| # publish_dir: _build/ | ||
| # force_orphan: true |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,7 +74,13 @@ A simple test can be found in [`run_scripts.test_dycore`](https://github.com/ray | |
| pytest ./run_scripts/test_dycore.py -v | ||
| ``` | ||
|
|
||
| However, the codebase is structured such that the user can easily assemble a run script to define their own experiments. Refer to the documentation for the [available APIs](https://ray-chew.github.io/pyBELLA/apis.html). | ||
| To run a simulation: | ||
| ```console | ||
| pybella -ic rb -N 1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not appear to work, at least not out of the box: |
||
| ``` | ||
| Note that only the rising bubble initial condition is implemented for now with ensemble size of 1. | ||
|
|
||
| The codebase is structured such that the user can easily assemble a run script to define their own experiments. Refer to the documentation for the [available APIs](https://ray-chew.github.io/pyBELLA/apis.html). | ||
|
|
||
| ## License | ||
|
|
||
|
|
@@ -86,3 +92,14 @@ Refer to the [open issues](https://github.com/ray-chew/pyBELLA/issues), in parti | |
|
|
||
| Any changes, improvements, or bug fixes can be submitted from your remote to upstream via a pull request. | ||
|
|
||
| ## To be tidied up | ||
|
|
||
| ### Profiler | ||
| ```bash | ||
| $ PYTHONPATH=src scalene -m pybella -ic test_lamb_wave -N 1 | ||
| ``` | ||
|
|
||
| ### Coverage | ||
| ```bash | ||
| $ pytest --cov test_scripts/ --cov-report=html | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,15 @@ | ||
| dask==2022.7.0 | ||
| dask[distributed]==2022.7.0 | ||
| dill==0.3.6 | ||
| h5py==3.7.0 | ||
| matplotlib==3.5.1 | ||
| numba==0.56.4 | ||
| numpy==1.22.1 | ||
| pyemd==1.0.0 | ||
| pytest==8.1.1 | ||
| PyYAML==6.0 | ||
| scipy==1.7.3 | ||
| termcolor==2.4.0 | ||
| dill | ||
| h5py | ||
| matplotlib | ||
| numba | ||
| numpy | ||
| pytest | ||
| scipy | ||
| dask | ||
| pytest | ||
| pytest-cov | ||
| # dependencies for documentation | ||
| sphinx==7.2.6 | ||
| sphinx_changelog==1.5.0 | ||
| sphinx-math-dollar==1.2.1 | ||
| furo==2024.1.29 | ||
| sphinx | ||
| sphinx_changelog | ||
| sphinx-math-dollar | ||
| furo |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not appear to work, at least out of the box: