Skip to content

Commit

Permalink
WPTO for Matlab (#61)
Browse files Browse the repository at this point in the history
* wpto playground

* format changes

* upload temporary test script

* wpto extract with REST API

* fix directional wave spectrum bug

* upload hindcast example

* auto format time_index into datetime array

* add tests for hindcast

* remove temp file

* bug fix for available buoy data vs hindcast

* upload data

* moving test files into hindcast folder

* updating toolbox paths

* updating hindcast example

* Setup CI, v16.2, try to fix HDF5 issue, try fix outlined in Troubleshooting

* Setup CI, v16.3, try to fix HDF5 issue, try fix outlined in Troubleshooting

* Setup CI, v16.4, try to fix HDF5 issue, try fix outlined in Troubleshooting

* Setup CI, v16.5, try to fix HDF5 issue, try fix outlined in Troubleshooting

* Setup CI, v16.6, try to fix HDF5 issue, try fix outlined in Troubleshooting

* Setup CI, v16.7, list installed toolboxes and addons

* Setup CI, v17, uninstall all pre-installed toolboxes

* Setup CI, v17.1, uninstall all pre-installed toolboxes

* Setup CI, v17.2, toggle off all pre-installed toolboxes

* Setup CI, v17.3, toggle off all pre-installed toolboxes

* Setup CI, v17.4, toggle off all pre-installed toolboxes

* Setup CI, v17.5, toggle off all pre-installed toolboxes

* Setup CI, v17.6, toggle off all pre-installed toolboxes

* Setup CI, v17.7, toggle off all pre-installed toolboxes

* Setup CI, v17.8, toggle off all pre-installed toolboxes

* Setup CI, v17.9, toggle off all pre-installed toolboxes

* Setup CI, v17.10, list installed addons and toolboxes

* Setup CI, v17.11, start uninstalling toolboxes

* Setup CI, v17.12, start uninstalling toolboxes

* Setup CI, v17.13, start uninstalling toolboxes

* Setup CI, v17.14, start uninstalling toolboxes

* Setup CI, v17.15, start uninstalling toolboxes

* Setup CI, v17.16, start uninstalling toolboxes

* Setup CI, v17.17, start uninstalling toolboxes

* Setup CI, v17.18, start uninstalling toolboxes

* Setup CI, v17.19, start uninstalling toolboxes

* Setup CI, v17.20, start uninstalling toolboxes

* Setup CI, v17.21, start uninstalling toolboxes

* Setup CI, v17.22, start uninstalling toolboxes

* Setup CI, v17.23, start uninstalling toolboxes

* Setup CI, v17.24, start uninstalling toolboxes

* Setup CI, v17.25, start uninstalling toolboxes

* Setup CI, v17.26, start uninstalling toolboxes

* Setup CI, v17.27, start uninstalling toolboxes

* Setup CI, v17.28, start uninstalling toolboxes

* Setup CI, v17.29, start uninstalling toolboxes

* Setup CI, v17.30, start uninstalling toolboxes

* Setup CI, v17.31, start uninstalling toolboxes

* Setup CI, v17.32, start uninstalling toolboxes

* Setup CI, v17.33, start uninstalling toolboxes

* Setup CI, v17.34, start uninstalling toolboxes

* Setup CI, v17.35, start uninstalling toolboxes

* Setup CI, v18, simplify to most basic test

* Setup CI, v19, install mhkit toolbox

* Setup CI, v20, run a single test that uses mhkit

* Setup CI, v21, run a single different test that uses mhkit

* Setup CI, v21.1, run a single different test that uses mhkit

* Setup CI, v21.2, run a single different test that uses mhkit

* Add function to reload python in matlab after python code changes

* Fix paths to python usgs and noaa functions

* Update pierson_moskowitz_spectrum wrapper with additional Hs parameter

* Update create_spectra with additional Hs parameter

* Update tests fixing mostly broken relative file paths

Co-authored-by: rpauly18 <[email protected]>
Co-authored-by: Matthew Boyd <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2022
1 parent 80efb99 commit 0cf0143
Show file tree
Hide file tree
Showing 30 changed files with 12,891 additions and 103 deletions.
53 changes: 35 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,45 @@ jobs:
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1

- name: Query Python version used by MATLAB
uses: matlab-actions/run-command@v1
with:
command: pyversion()

- name: Install MHKiT toolbox in MATLAB
uses: matlab-actions/run-command@v1
with:
command: matlab.addons.toolbox.installToolbox('mhkit.mltbx')
# - name: Query Python version used by MATLAB
# uses: matlab-actions/run-command@v1
# with:
# command: pyversion()

- name: Uninstall MHKiT, for fixing HDF5 issue
run: |
python -m pip uninstall mhkit -y

- name: Re-install MHKiT, for fixing HDF5 issue
run: |
python -m pip install mhkit

- name: Re-install MHKiT toolbox in MATLAB, for fixing HDF5 issue
# This can cause segmentation violations
# - name: List installed MATLAB addons
# uses: matlab-actions/run-command@v1
# with:
# command: matlab.addons.installedAddons

# This can cause segmentation violations
# - name: List installed MATLAB toolboxes
# uses: matlab-actions/run-command@v1
# with:
# command: matlab.addons.toolbox.installedToolboxes
# alternative: command: ver

# - name: Toggle off all pre-installed toolboxes
# uses: matlab-actions/run-command@v1
# with:
# command: addpath('mhkit/utils'), uninstall_all_toolboxes
#
# - name: Uninstall h5py, for fixing HDF5 issue
# run: |
# python pip uninstall h5py -y
#
- name: Install MHKiT toolbox in MATLAB
uses: matlab-actions/run-command@v1
with:
command: matlab.addons.toolbox.installToolbox('mhkit.mltbx')
#
# - name: Uninstall MHKiT, for fixing HDF5 issue
# run: |
# python -m pip uninstall mhkit -y
#
# - name: Re-install MHKiT, for fixing HDF5 issue
# run: |
# python -m pip install mhkit

# - name: Change execution mode to out-of-process
# uses: matlab-actions/run-command@v1
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ test.egg-info/*
*.spec
**/build
**./dist/
*.csv
**/cache/
**/static/
.DS_Store
Expand Down
139 changes: 139 additions & 0 deletions examples/WPTO_hindcast_example.html

Large diffs are not rendered by default.

Binary file added examples/WPTO_hindcast_example.mlx
Binary file not shown.
8,749 changes: 8,749 additions & 0 deletions examples/data/wave/hindcast/hindcast_1hr_data.csv

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions examples/data/wave/hindcast/hindcast_1hr_meta.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
water_depth,latitude,longitude,distance_to_shore,timezone,jurisdiction
67.7445,44.567,-124.229,12353.165,-8,Federal
191.8491,43.08,-124.72,22735.91,-8,Federal
Loading

0 comments on commit 0cf0143

Please sign in to comment.