Skip to content

Commit

Permalink
Merge pull request #166 from NOC-MSM/164-pre_commit
Browse files Browse the repository at this point in the history
updating pre-commit workflow
  • Loading branch information
jdha authored Apr 16, 2024
2 parents 2283400 + ebad671 commit 3ec5d9a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/[email protected].0
python-version: 3.11
- uses: pre-commit/[email protected].1

combine-environments:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install conda-merge
run: |
$CONDA/bin/python -m pip install conda-merge
Expand All @@ -42,7 +43,7 @@ jobs:
$CONDA/bin/conda-merge ci/environment-$SUFFIX.yml environment.yml > ci/combined-environment-$SUFFIX.yml || exit
done
- name: Archive combined environments
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: combined-environments
path: ci/combined-environment-*.yml
Expand All @@ -56,9 +57,9 @@ jobs:
python-version: ['3.9']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download combined environments
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: combined-environments
path: ci
Expand All @@ -82,9 +83,9 @@ jobs:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - name: Download combined environments
# uses: actions/download-artifact@v3
# uses: actions/download-artifact@v4
# with:
# name: combined-environments
# path: ci
Expand All @@ -108,9 +109,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download combined environments
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: combined-environments
path: ci
Expand Down Expand Up @@ -142,9 +143,9 @@ jobs:
extra: -integration

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download combined environments
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: combined-environments
path: ci
Expand Down Expand Up @@ -174,7 +175,7 @@ jobs:
# (needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped')

# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - name: Install packages
# run: |
# $CONDA/bin/python -m pip install build twine
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ These are the steps to take to install pyBDY:
export JAVA_HOME=$(/usr/libexec/java_home) # Mac
```

NB the above may not land at the correct directory level, but should find
the correct root. PyBDY expects this to be the directory level with `lib`
in which might be e.g. 3 directories back.
the correct root. PyBDY expects this to be the directory level with `lib`
in which might be e.g. 3 directories back.

- Install pyBDY:

Expand Down Expand Up @@ -136,7 +137,7 @@ following steps are required,
which also works on 2D tidal boundary data (note you can specify an output file name):
`python plotting/plot_bdy.py outputs/NNA_R12_bdytide_TPXO7p2_M2_grd_Z.nc z1 example_bdy_1d_data.png`
![Example plot_bdy.py output for tides](/screenshots/example_bdy_1d_data.png)

## Example: generating tidal boundary conditions on ARCHER2

- Activate the new virtual environment:
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ channels:
# - package2
# DO NOT EDIT ABOVE THIS LINE, ADD DEPENDENCIES BELOW AS SHOWN IN THE EXAMPLE
dependencies:
- python=3.9
- pip
- numpy
- xarray
Expand Down

0 comments on commit 3ec5d9a

Please sign in to comment.