Skip to content
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

Speed up Wind Toolkit tests #338

Merged
merged 18 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/generate_notebook_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@
"cdip_example.ipynb": 180,
"Delft3D_example.ipynb": 180,
"directional_waves.ipynb": 180,
"environmental_contours_example.ipynb": 720,
"environmental_contours_example.ipynb": 360,
"extreme_response_contour_example.ipynb": 360,
"extreme_response_full_sea_state_example.ipynb": 420,
"extreme_response_MLER_example.ipynb": 650,
"extreme_response_full_sea_state_example.ipynb": 360,
"extreme_response_MLER_example.ipynb": 360,
"loads_example.ipynb": 180,
"metocean_example.ipynb": 240,
"mooring_example.ipynb": 300,
"metocean_example.ipynb": 180,
"mooring_example.ipynb": 240,
"PacWave_resource_characterization_example.ipynb": 780,
"power_example.ipynb": 180,
"qc_example.ipynb": 180,
"river_example.ipynb": 240,
"river_example.ipynb": 180,
"short_term_extremes_example.ipynb": 180,
"SWAN_example.ipynb": 180,
"tidal_example.ipynb": 240,
"tidal_example.ipynb": 180,
"tidal_performance_example.ipynb": 180,
"upcrossing_example.ipynb": 180,
"wave_example.ipynb": 180,
"wecsim_example.ipynb": 180,
"WPTO_hindcast_example.ipynb": 1200,
"default": 300, # Default timeout for other notebooks
"WPTO_hindcast_example.ipynb": 180,
"default": 60, # Default timeout for other notebooks
}
notebooks = []
for root, dirs, files in os.walk("examples"):
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- master
- develop

jobs:
set-os:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -429,6 +430,39 @@ jobs:
echo "conda activate TESTconda" >> ~/.bashrc
source ~/.bashrc

- name: Download non-hindcast data
uses: actions/download-artifact@v4
with:
name: data
path: ~/.cache/mhkit

- name: Download Wave Hindcast data (if available)
if: (needs.check-changes.outputs.should-run-hindcast == 'true')
uses: actions/download-artifact@v4
with:
name: wave-hindcast-data
path: ~/.cache/mhkit/wave-hindcast

- name: Download Wind Hindcast data (if available)
if: (needs.check-changes.outputs.should-run-hindcast == 'true')
uses: actions/download-artifact@v4
with:
name: wind-hindcast-data
path: ~/.cache/mhkit/wind-hindcast

- name: Consolidate hindcast data
if: (needs.check-changes.outputs.should-run-hindcast == 'true')
run: |
mkdir -p ~/.cache/mhkit/hindcast
mv ~/.cache/mhkit/wave-hindcast/hindcast/* ~/.cache/mhkit/hindcast/
mv ~/.cache/mhkit/wind-hindcast/hindcast/* ~/.cache/mhkit/hindcast/
shell: bash

- name: Copy .hscfg file to examples directory
shell: bash -l {0}
run: |
cp .hscfg examples/

- name: Run notebook
shell: bash -l {0}
run: |
Expand Down
Loading
Loading