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

v0.5.0 #138

Merged
merged 240 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
0cf0143
WPTO for Matlab (#61)
hivanov-nrel Jan 10, 2022
02e3440
Addressing issue #65 tidal ebb and flood plots for Matlab (#73)
Alex-McVey Feb 18, 2022
219879e
Addressing issue #59 magnitude and phase function for Matlab (#76)
Alex-McVey Feb 18, 2022
39f11dc
Revert "Addressing issue #65 tidal ebb and flood plots for Matlab (#7…
rpauly18 Feb 25, 2022
4b75a55
Revert "Revert "Addressing issue #65 tidal ebb and flood plots for Ma…
rpauly18 Feb 25, 2022
cec3557
General updates (#71)
rpauly18 Feb 25, 2022
db5a60b
Wave updates (#70)
rpauly18 Mar 21, 2022
1856b59
CDIP Data IO and Graphics (v2) [develop] (#83)
Matthew-Boyd Mar 31, 2022
9318f4f
updating package
rpauly18 Mar 31, 2022
63cb281
resolve conflicts
rpauly18 Mar 31, 2022
d723b3a
fixing error
rpauly18 Mar 31, 2022
2e91690
fixing errors take 2
rpauly18 Mar 31, 2022
228b583
Add MHKit-Python test conditional on test failure
H0R5E Apr 29, 2022
ac394e0
Merge branch 'master' into develop
Matthew-Boyd May 23, 2022
4114469
include tests for R2020b
hivanov-nrel May 23, 2022
7463c04
add workflow dispatch for testing
hivanov-nrel May 23, 2022
a8593e4
fix typo
hivanov-nrel May 23, 2022
704ca54
workflow_dispatch
hivanov-nrel May 23, 2022
8a905e2
add push?
hivanov-nrel May 23, 2022
386ac97
update variable name
hivanov-nrel May 23, 2022
722f42e
update on latest input
hivanov-nrel May 23, 2022
8c28dcd
switch to ubuntu
hivanov-nrel May 23, 2022
5d4cb8d
finalize workflow
hivanov-nrel May 24, 2022
eca9e63
Merge pull request #97 from hivanov-nrel/matlab_releases
Matthew-Boyd Jun 2, 2022
6be98b5
WDRT functionality: MLER (#96)
hivanov-nrel Nov 17, 2022
d29d5e3
Dolfyn Functionality: IO and rotations (#79)
Alex-McVey Jan 24, 2023
17157c7
read NetCDF file (#104)
kchong75 Jun 27, 2023
7895020
typo fix in examples (#103)
kchong75 Jun 27, 2023
077f525
Update power quality flicker assessment (#105)
kchong75 Jul 26, 2023
31d9a34
D3D: Add example data files
simmsa Feb 2, 2024
b32b55e
D3D: Add first section of delft3d examples
simmsa Feb 2, 2024
18d4982
D3D: Add netcdf file reader
simmsa Mar 4, 2024
bc7f760
Tests: Add D3D netCDF read test
simmsa Mar 5, 2024
9b61568
Py: Add utility to open netcdf files as python objects
simmsa Mar 5, 2024
29d5331
Test: delft_3d_get_keys
simmsa Mar 5, 2024
fada3f3
D3D: Add delft_3d_get_keys
simmsa Mar 5, 2024
74540a1
D3D: Fix open_netcdf python import
simmsa Mar 5, 2024
ad3d1ef
Test: delft_3d_get_all_time
simmsa Mar 5, 2024
9af2a13
D3D: Add get_all_time
simmsa Mar 5, 2024
3048faf
Py: Add type guard for netCDF4 object
simmsa Mar 5, 2024
f2182fb
Test: delft_3d_convert_time
simmsa Mar 5, 2024
af93e14
D3D: Add delft_3d_convert_time
simmsa Mar 5, 2024
274ff89
Tests: delft_3d_convert_time explicitly define expected values
simmsa Mar 6, 2024
c8b9ab4
Tests: add delft_3d_get_all_data_points test
simmsa Mar 6, 2024
9eda865
D3D: Add delft_3d_get_all_data_points function
simmsa Mar 6, 2024
2ae3b00
Utils: Add convert_numeric_dataframe_to_struct function
simmsa Mar 6, 2024
6b2d9d8
Fix: Python to MATLAB string array conversion
simmsa Mar 6, 2024
0f53ec9
Test: delft_3d_create_points
simmsa Mar 6, 2024
05fc1bb
D3D: Add delft_3d_create_points function
simmsa Mar 6, 2024
4bd7bdd
Test: delft_3d_interpolate_to_centerline
simmsa Mar 6, 2024
58b258b
D3D: Add delft_3d_interpolate_to_centerline function
simmsa Mar 6, 2024
1481657
Continuing Fix: Python to MATLAB string array conversion
simmsa Mar 6, 2024
42919d9
Fix: Remove comment
simmsa Mar 6, 2024
2d949ae
Test: delft_3d_get_layer_data
simmsa Mar 6, 2024
7bde3e2
D3D: Add delft_3d_get_layer_data function
simmsa Mar 6, 2024
1b392ba
Test: delft_3d_calculate_turbulent_intensity
simmsa Mar 6, 2024
8926536
D3D: Add delft_3d_calculate_turbulent_intensity function
simmsa Mar 6, 2024
2d196f4
Test: delft_3d_calculate_variable_interpolation
simmsa Mar 6, 2024
883b116
D3D: add delft_3d_calculate_variable_interpolation function
simmsa Mar 6, 2024
13dcca8
Test: delft_3d_calculate_unorm
simmsa Mar 6, 2024
935d441
D3D: Add delft_3d_calculate_unorm function
simmsa Mar 6, 2024
a8f9401
Fix: Correctly type input string guards
simmsa Mar 6, 2024
0c4961a
D3D: Add latest version of live script
simmsa Mar 6, 2024
b98fd66
Viz: Add viridis colormap
simmsa Mar 6, 2024
329d655
Fix: characters to strings
simmsa Mar 6, 2024
e389284
Test: convert_numeric_dataframe_to_struct
simmsa Mar 7, 2024
c65049d
Test: delft_3d_cleanup_turbulent_kinetic_energy
simmsa Mar 20, 2024
2207c74
Py: Add function to cleanup tubulent kinetic energy array
simmsa Mar 20, 2024
d316c44
D3D: Add cleanup_turbulent_kinetic_energy function
simmsa Mar 20, 2024
fa3eca0
Tests: Fix type coercion of Window input
simmsa Mar 20, 2024
115b3c0
D3D: Finish example notebook
simmsa Mar 20, 2024
50f70ce
Actions: Update commands that use nodejs 16
simmsa Mar 20, 2024
ea00ea2
Code Coverage: Update report
simmsa Mar 20, 2024
4a0a0c2
Test: delft_3d_index_to_seconds
simmsa Mar 21, 2024
f2e611f
D3D: Add delft_3d_index_to_seconds function
simmsa Mar 21, 2024
ff7e307
Test: delft_3d_seconds_to_index
simmsa Mar 21, 2024
59b4d9c
D3D: Add delft_3d_seconds_to_index function
simmsa Mar 21, 2024
a08315f
D3D: Update notebook to use seconds conversion functions
simmsa Mar 21, 2024
c08826a
D3D: Fix grammar and spelling in notebook
simmsa Mar 22, 2024
1920b19
Utils: Add convert_numeric_struct_to_dataframe function
simmsa Apr 15, 2024
85563fa
Test: convert_numeric_struct_to_dataframe
simmsa Apr 15, 2024
7abf30c
Actions: Add more MATLAB versions on unix
simmsa Apr 15, 2024
70afc31
Actions: Enable all MATLAB versions on Windows
simmsa Apr 16, 2024
a097337
Actions: Disable and document failing Unix unit tests
simmsa Apr 16, 2024
a9a3629
Actions: Attempt to add miniconda to windows $PATH
simmsa Apr 16, 2024
219ddf6
Actions: Properly handle strings with windows directory paths
simmsa Apr 16, 2024
487656d
Actions: Skip tree command on windows
simmsa Apr 16, 2024
7f8e853
Actions: Try powershell command for adding to path
simmsa Apr 16, 2024
0e1eb75
Actions: Try another method for adding to path on windows
simmsa Apr 16, 2024
ceb4917
Actions: Test simpler python installation
simmsa Apr 16, 2024
e44510c
Actions: Don't print out mhkit version on windows
simmsa Apr 16, 2024
28dc311
Actions: Don't install MHKiT-Python from source
simmsa Apr 16, 2024
3786211
Actions: Add more python checks
simmsa Apr 16, 2024
66682d1
Actions: Add Python executable directory to MATLAB path via setenv
simmsa Apr 16, 2024
88913ed
Actions: Test h5py install on windows
simmsa Apr 16, 2024
72ea7f7
Actions: Test h5py installed by anaconda
simmsa Apr 16, 2024
58a9e07
Actions: Use bash to set path on windows
simmsa Apr 17, 2024
32e2ef1
Actions: Use more common bash shell for windows path add
simmsa Apr 17, 2024
3c6685f
Test: Add simple python print test
simmsa Apr 17, 2024
afe1d58
Actions: Print MATLAB path on Windows
simmsa Apr 17, 2024
28f0b11
Actions: Terminate anaconda path with `;` on windows
simmsa Apr 17, 2024
5a04f08
Actions: Set pyenv after setting path on Windows
simmsa Apr 17, 2024
03b6d07
Actions: Check MATLAB python system path
simmsa Apr 17, 2024
77d50f2
Actions: Let MATLAB manage Python setup on Windows
simmsa Apr 18, 2024
4e5de35
Actions: Update python action version, print pyenv in MATLAB
simmsa Apr 18, 2024
124aeda
Actions: Try installing a newer version of NREL-rex on Windows
simmsa Apr 18, 2024
2c2ef96
Actions: Revisit OutOfProcess python on Windows
simmsa Apr 19, 2024
953913f
Actions: Use lowercase for conda env name on Windows
simmsa Apr 19, 2024
f5ce84f
Actions: Add newlines to run.m commands on Windows
simmsa Apr 19, 2024
654e784
Actions: Run Windows cache population Python in MATLAB OutOfProcess
simmsa Apr 19, 2024
6df6f42
Actions: Fix newline error on Windows
simmsa Apr 19, 2024
5f8129f
Actions: Only install hdf5 with anaconda on Windows
simmsa Apr 19, 2024
a9a6dd7
Actions: Cleanup unused commands on Windows
simmsa Apr 19, 2024
2db69c8
Actions: Install libnetcdf with anaconda on Windows
simmsa Apr 19, 2024
6f8f569
Actions: install netcdf4 with anaconda on Windows
simmsa Apr 19, 2024
9ee246c
Actions: Only install `netcdf4` through Anaconda
simmsa Apr 22, 2024
53179a1
Actions: Use Windows action to inform Unix action config
simmsa Apr 22, 2024
555e06d
Actions: use same conda environment name across platforms
simmsa Apr 22, 2024
645ecc6
Actions: Add python 3.12 on Unix
simmsa Apr 22, 2024
3f1c4dc
Actions: Ensure shell is correct on unix conda install command
simmsa Apr 22, 2024
21996b1
Actions: Standardize conda install of netcdf4 and hdf5
simmsa Apr 22, 2024
01b6b57
Actions: Python 3.12 is currently not supported by MATLAB
simmsa Apr 22, 2024
3ce06ef
Docs: include MATLAB 2024a in MATLAB/Python Compatibility matrix
simmsa Apr 22, 2024
a538b48
Docs: Add Python 3.12 to the MATLAB/Python Compatibility matrix
simmsa Apr 22, 2024
c244ef1
Docs: Update Linux test matrix
simmsa Apr 22, 2024
2c32cfe
Docs: Update Windows test matrix
simmsa Apr 22, 2024
ab0a8c7
Docs: Update MacOS test matrix
simmsa Apr 22, 2024
fac412c
Actions: Update excluded failing tests on Unix
simmsa Apr 22, 2024
799b8ab
Actions: Cleanup unused code sections
simmsa Apr 22, 2024
a900c06
D3D: Internally convert point struct arguments to dataframes
simmsa Apr 26, 2024
13eccca
D3D: Remove df fieldname from result structs
simmsa Apr 26, 2024
a6892d8
D3D: Update to reflect removal of df in structs
simmsa Apr 26, 2024
977cd01
Actions: Explicitly set miniconda-version to latest
simmsa Apr 26, 2024
1c022e3
Actions: MacOS - Use brew to install hdf5 and netcdf
simmsa Apr 26, 2024
c06075d
Actions: Use MHKiT-Python conda libraries on unix
simmsa Apr 29, 2024
c3c52fe
Actions: Don't use brew to install netcdf
simmsa Apr 29, 2024
84b9658
Actions: Add netcdf bin path before installing mhkit-python
simmsa Apr 29, 2024
cba4fbc
Actions: Don't use conda on macos
simmsa Apr 29, 2024
1a9457c
Actions: Test cloud install of mhkit on macos
simmsa Apr 29, 2024
e0a0a39
Actions: Upgrade pip on macos
simmsa Apr 29, 2024
332f04e
Actions: Upgrade netcdf pip package on macos
simmsa Apr 29, 2024
d545b33
Actions: Don't try to upgrade pip on macos
simmsa Apr 29, 2024
ae3e97c
Actions: Upgrade netcdf4 pip package
simmsa Apr 29, 2024
758e277
Actions: Don't overwrite run.m
simmsa Apr 29, 2024
eb29ccb
Actions: Don't alter PATH on unix
simmsa Apr 29, 2024
2c79555
Actions: Specify macos version
simmsa Apr 29, 2024
37bae91
Actions: Use macos-13
simmsa Apr 29, 2024
707ed32
Actions: Update commands that use nodejs 16
simmsa Mar 20, 2024
fa041c2
Actions: Add more MATLAB versions on unix
simmsa Apr 15, 2024
0a5969a
Actions: Enable all MATLAB versions on Windows
simmsa Apr 16, 2024
17cbf08
Actions: Disable and document failing Unix unit tests
simmsa Apr 16, 2024
b833744
Actions: Attempt to add miniconda to windows $PATH
simmsa Apr 16, 2024
705ab09
Actions: Test simpler python installation
simmsa Apr 16, 2024
4729d38
Actions: Add Python executable directory to MATLAB path via setenv
simmsa Apr 16, 2024
e2b4f89
Actions: Test h5py installed by anaconda
simmsa Apr 16, 2024
f9f72f5
Actions: Set pyenv after setting path on Windows
simmsa Apr 17, 2024
acddf19
Actions: Check MATLAB python system path
simmsa Apr 17, 2024
c904680
Actions: Let MATLAB manage Python setup on Windows
simmsa Apr 18, 2024
121dd92
Actions: Update python action version, print pyenv in MATLAB
simmsa Apr 18, 2024
318f6f1
Actions: Revisit OutOfProcess python on Windows
simmsa Apr 19, 2024
6061f25
Actions: Use lowercase for conda env name on Windows
simmsa Apr 19, 2024
406b3c0
Actions: Run Windows cache population Python in MATLAB OutOfProcess
simmsa Apr 19, 2024
c0bc291
Actions: Only install hdf5 with anaconda on Windows
simmsa Apr 19, 2024
66f6b53
Actions: Cleanup unused commands on Windows
simmsa Apr 19, 2024
3a47a7f
Actions: Install libnetcdf with anaconda on Windows
simmsa Apr 19, 2024
d9dfe8a
Actions: install netcdf4 with anaconda on Windows
simmsa Apr 19, 2024
e1598e3
Actions: Only install `netcdf4` through Anaconda
simmsa Apr 22, 2024
576b69c
Actions: Use Windows action to inform Unix action config
simmsa Apr 22, 2024
a8c7d32
Actions: use same conda environment name across platforms
simmsa Apr 22, 2024
7b1c572
Actions: Add python 3.12 on Unix
simmsa Apr 22, 2024
88206c9
Actions: Standardize conda install of netcdf4 and hdf5
simmsa Apr 22, 2024
0900429
Actions: Cleanup unused code sections
simmsa Apr 22, 2024
15635ef
Actions: Explicitly set miniconda-version to latest
simmsa Apr 26, 2024
bd7cf0d
Actions: MacOS - Use brew to install hdf5 and netcdf
simmsa Apr 26, 2024
16e8162
Actions: Add netcdf bin path before installing mhkit-python
simmsa Apr 29, 2024
e0ba10a
Fix: Properly convert doubles with multiple values into numpy arrays
simmsa May 13, 2024
3436281
Actions: Test simpler python installation
simmsa Apr 16, 2024
42fbbab
Actions: Test h5py installed by anaconda
simmsa Apr 16, 2024
d345ab5
Actions: Check MATLAB python system path
simmsa Apr 17, 2024
a7fb551
Actions: Let MATLAB manage Python setup on Windows
simmsa Apr 18, 2024
1a2af3b
Actions: Update python action version, print pyenv in MATLAB
simmsa Apr 18, 2024
cc6019f
Actions: Revisit OutOfProcess python on Windows
simmsa Apr 19, 2024
9d70276
Actions: Use lowercase for conda env name on Windows
simmsa Apr 19, 2024
dc11d64
Actions: Cleanup unused commands on Windows
simmsa Apr 19, 2024
cf37e0b
Actions: Update commands that use nodejs 16
simmsa Mar 20, 2024
27b05b8
Actions: Enable all MATLAB versions on Windows
simmsa Apr 16, 2024
692c203
Actions: Test simpler python installation
simmsa Apr 16, 2024
a5f15a1
Actions: Test h5py installed by anaconda
simmsa Apr 16, 2024
b73be74
Actions: Let MATLAB manage Python setup on Windows
simmsa Apr 18, 2024
9fda856
Actions: Use lowercase for conda env name on Windows
simmsa Apr 19, 2024
8187cef
Actions: Use Windows action to inform Unix action config
simmsa Apr 22, 2024
400052f
Actions: use same conda environment name across platforms
simmsa Apr 22, 2024
9cc6975
Actions: Cleanup unused code sections
simmsa Apr 22, 2024
645d0fd
Actions: Add netcdf bin path before installing mhkit-python
simmsa Apr 29, 2024
d76f712
Actions: Force usage of latest versions
simmsa May 13, 2024
1973bd7
Actions: Use latest version of windows unit tests
simmsa May 13, 2024
56dd091
Test: Check for warning on incorrect D3D netcdf conversion
simmsa May 29, 2024
8ff57a3
D3D: Improve warning when user converts netCDF data incorrectly
simmsa May 29, 2024
142dc82
Merge: Master -> develop
simmsa Jun 26, 2024
f958d55
Test: Gamma parameter of jonswap_spectrum
simmsa Jul 1, 2024
52f0839
Fix: properly map Hs arg to Python jonswap_spectrum function
simmsa Jul 1, 2024
905e215
initial push on ste
Apr 30, 2024
05dea3d
wdrt parity
hivanov-nrel Jun 12, 2024
533cb96
updates from review
hivanov-nrel Jul 1, 2024
f49fbf0
updated notebooks
hivanov-nrel Jul 1, 2024
259b9c5
Merge branch 'dev' into delft-3d-io
simmsa Jul 1, 2024
be5f50b
Actions: Simplify `on` to just pushes
simmsa Jul 1, 2024
a0d07da
Merge branch 'origin-develop-unaltered' into delft-3d-io
simmsa Jul 3, 2024
f68fcd2
Actions: pull_request to `on` Action
simmsa Jul 3, 2024
eacf916
Merge pull request #124 from simmsa/delft-3d-io
simmsa Jul 3, 2024
e9cb034
Tests: Remove combined unit tests
simmsa Jul 3, 2024
3e2a944
Fix: Resolve committed merge conflicts
simmsa Jul 3, 2024
a51ab5c
Actions: Pin numpy version on conda install
simmsa Jul 3, 2024
4c0f968
Actions: Pin scipy version on conda install
simmsa Jul 3, 2024
f962753
Actions: Pin scipy version with pip
simmsa Jul 3, 2024
6316bb4
Actions: Temporarily disable hindcast tests
simmsa Jul 3, 2024
20073f3
Actions: Confirm scipy uninstall
simmsa Jul 3, 2024
7affff0
Actions: Use older pinned numpy version
simmsa Jul 3, 2024
cdac403
Python: Sync mhkit_python_utils version with setup.py
simmsa Jul 3, 2024
c6db258
Actions: Use numpy version compatible with Python 3.8
simmsa Jul 3, 2024
cfb4928
Actions: Reduce scipy pinned version number to 1.11.4
simmsa Jul 3, 2024
b01d9a6
Actions: Defer scipy installation to pip
simmsa Jul 3, 2024
f10720d
Actions: Decrease pinned scipy version
simmsa Jul 3, 2024
345ef8b
Clean: Remove unused matlab toolbox creation files
simmsa Jul 3, 2024
b9eabb5
v0.5.0 Release: Add binary and project files
simmsa Jul 3, 2024
90b1462
Docs: Add changelog.md
simmsa Jul 3, 2024
bec4393
Actions: Verify failing tests on macOS
simmsa Jul 3, 2024
9051573
Clean: Remove unnecessary .gitattributes config
simmsa Jul 3, 2024
25fa191
Clean: Remove unnecessary egg files
simmsa Jul 3, 2024
cdda295
Ignore: Move project specific items first
simmsa Jul 8, 2024
d2ab7e2
Ignore: Remove original ignores
simmsa Jul 8, 2024
1c23988
Ignore: Add standard MATLAB ignores
simmsa Jul 8, 2024
84f7313
Ignore: Python defaults
simmsa Jul 8, 2024
74052a2
Ignore: MacOS Defaults
simmsa Jul 8, 2024
750a4a4
Docs: Update test matricies for MacOS
simmsa Jul 8, 2024
899da29
Docs: Fix formatting of code sections
simmsa Jul 8, 2024
ac5be59
Actions: Detail exclusion of windows cache population job
simmsa Jul 8, 2024
270868f
Docs: Remove MacOS failing test details
simmsa Jul 8, 2024
7ff8586
Tests: Reenable Hindcast tests
simmsa Jul 8, 2024
84aec54
Fix: Update toolbox binary with proper paths
simmsa Jul 9, 2024
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
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

60 changes: 40 additions & 20 deletions .github/workflows/unix_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: MHKiT-MATLAB Unix Unit Tests

on:
push:
branches: [master, develop, ebbflood]
branches: [ master, develop ]
pull_request:
branches: [master, develop, ebbflood]
branches: [ master, develop ]

jobs:
cache_population:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4
conda install numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4
# conda install netcdf4 hdf5
# export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config

Expand Down Expand Up @@ -67,6 +67,19 @@ jobs:
conda activate mhkit_conda_env
pip install -e .

- name: Pin scipy version
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
pip uninstall -y scipy
pip install scipy==1.10.1

- name: List installed pip modules
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
pip freeze

# Create the cache and add a dummy file
# The dummy file ensures that the artifact download
- name: Setup mhkit_webread_cache
Expand Down Expand Up @@ -163,24 +176,24 @@ jobs:
- matlab-version: R2020b
python-version: 3.9
# Specific versions of tests that fail consistently. Most likely due to the GitHub actions environment
- matlab-version: R2024a # Python netcdf4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123413351
python-version: 3.11
os: macos-13
# - matlab-version: R2024a # Python netcdf4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123413351
# python-version: 3.11
# os: macos-13
# - matlab-version: R2024a # Working!
# python-version: "3.10"
# os: macos-13
- matlab-version: R2024a # Java Segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411604
python-version: 3.9
os: macos-13
- matlab-version: R2023b # Python netcd4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412889
python-version: 3.11
os: macos-13
- matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412352
python-version: "3.10"
os: macos-13
- matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411335
python-version: 3.9
os: macos-13
# - matlab-version: R2024a # Java Segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411604
# python-version: 3.9
# os: macos-13
# - matlab-version: R2023b # Python netcd4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412889
# python-version: 3.11
# os: macos-13
# - matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412352
# python-version: "3.10"
# os: macos-13
# - matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411335
# python-version: 3.9
# os: macos-13

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -211,14 +224,14 @@ jobs:
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4
conda install numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4
# conda install netcdf4 hdf5
# export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config

# - name: Setup Python ${{ matrix.python-version }}
# shell: bash -l {0}
# run: |
# conda create --name mhkit_conda_env python=${{ matrix.python-version }} numpy cython pip pytest hdf5 libnetcdf cftime netcdf4 --strict-channel-priority
# conda create --name mhkit_conda_env python=${{ matrix.python-version }} numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4 --strict-channel-priority
# conda activate mhkit_conda_env
# export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
# pip install -e . --no-deps --force-reinstall
Expand Down Expand Up @@ -292,6 +305,13 @@ jobs:
conda activate mhkit_conda_env
pip install -e .

- name: Pin scipy version
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
pip uninstall -y scipy
pip install scipy==1.10.1

- name: List installed pip modules
shell: bash -l {0}
run: |
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/windows_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: MHKiT-MATLAB Windows Unit Tests

on:
push:
branches: [master, develop, ebbflood]
branches: [ master, develop ]
pull_request:
branches: [master, develop, ebbflood]
branches: [ master, develop ]

jobs:
cache_population:
Expand Down Expand Up @@ -33,8 +33,7 @@ jobs:
- name: "Conda install netcdf4, hdf5"
run: |
conda activate mhkit_conda_env
conda install netcdf4 hdf5

conda install numpy==1.24.4 netcdf4 hdf5
- name: Check out MHKiT-MATLAB
uses: actions/checkout@v4

Expand All @@ -61,6 +60,13 @@ jobs:
conda activate mhkit_conda_env
pip install -e .

- name: Pin scipy version
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
pip uninstall -y scipy
pip install scipy==1.10.1

# Create the cache and add a dummy file
# The dummy file ensures that the artifact download
- name: Setup mhkit_webread_cache
Expand All @@ -69,7 +75,6 @@ jobs:
mkdir mhkit_webread_cache
touch mhkit_webread_cache/test.txt
echo "Hello World" > mhkit_webread_cache/test.txt

- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
Expand All @@ -80,12 +85,10 @@ jobs:
shell: pwsh
run: >
"pyenv(Version='{0}', ExecutionMode='OutOfProcess')" -f (python -c "import sys; print(sys.executable)") | Out-File -FilePath run.m

- name: Check Python System Path
shell: bash -l {0}
run: |
echo "py.sys.path" >> run.m

- name: Add MATLAB test commands
shell: bash
run: echo "version,
Expand Down Expand Up @@ -126,6 +129,7 @@ jobs:
matlab-version: [R2021b, R2022a, R2022b, R2023a, R2023b, R2024a]
mhkit-python-version: ["0.7.0"]
exclude:
# Cache population job
- matlab-version: R2022a
python-version: 3.9
- matlab-version: R2023b
Expand Down Expand Up @@ -176,20 +180,17 @@ jobs:
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
conda install netcdf4 hdf5

conda install numpy==1.24.4 netcdf4 hdf5
- name: Output python executable
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
python -c "import sys; print(sys.executable)"

- name: Print Python Version
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
python --version

- name: Check out MHKiT-MATLAB
uses: actions/checkout@v4

Expand All @@ -210,31 +211,34 @@ jobs:
run: |
conda activate mhkit_conda_env
pip install mhkit==$MHKIT_PYTHON_VERSION

- name: pip install mhkit-python-utils module from source
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
pip3 install -e .

- name: Pin scipy version
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
pip uninstall -y scipy
pip install scipy==1.10.1

- name: List installed pip modules
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
pip3 freeze

- name: Print MHKiT-Python Version
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
python -c "import mhkit; print(mhkit.__version__)"

- name: Verify MHKiT-Python Operation
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
python -c "import mhkit; [ED, AP] = mhkit.river.performance.circular(30); print(ED); print(AP);"

- name: Download mhkit_webread_cache artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -255,19 +259,16 @@ jobs:
run: |
conda activate mhkit_conda_env
printf "getenv('path')\nsetenv('path', ['%s;', getenv('path')])\ngetenv('path')\n" $(python -c "import sys; import os; print(os.path.dirname(sys.executable))") >> run.m

# OutOfProcess works reliably on linux, macos, and windows
- name: Configure MATLAB pyenv Version and ExecutionMode
shell: bash -l {0}
run: |
conda activate mhkit_conda_env
printf "pyenv(Version='%s', ExecutionMode='OutOfProcess')\n" $(python -c "import sys; print(sys.executable)") >> run.m

- name: Check Python System Path
shell: bash -l {0}
run: |
echo "py.sys.path" >> run.m

- name: Add MATLAB test commands
shell: bash
run: echo "version,
Expand Down
108 changes: 73 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,78 @@
*.xlsm
*.xlsx
*.pyc
test.egg-info/*
*.exe
*.spec
**/build
**./dist/
**/cache/
**/static/
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
*.log
*.sql
*.sqlite
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*~
*.json
*egg-info
*build
.gitignore

# MHKiT-MATLAB Specific Files
# Test results
mhkit/tests/test_results/*

# MHKiT-MATLAB Specific Files
# Hindcast data cache
mhkit_webread_cache

# MATLAB

# Windows default autosave extension
*.asv

# OSX / *nix default autosave extension
*.m~

# Compiled MEX binaries (all platforms)
*.mex*

# Packaged app and toolbox files
*.mlappinstall
# *.mltbx

# Generated helpsearch folders
helpsearch*/

# Simulink code generation folders
slprj/
sccprj/

# Matlab code generation folders
codegen/

# Simulink autosave extension
*.autosave

# Simulink cache files
*.slxc

# Octave session info
octave-workspace

# Python

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
eggs/
.eggs/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg

# MacOS

# General
.DS_Store
.AppleDouble
.LSOverride

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
Loading
Loading