Skip to content

Commit 3f0336e

Browse files
authored
Merge pull request #184 from MHKiT-Software/develop
v1.0.0 Release
2 parents 55921ca + 144c78b commit 3f0336e

File tree

128 files changed

+26598
-1341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+26598
-1341
lines changed

.github/workflows/code_compatibility_report.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ jobs:
1313

1414
matrix:
1515
# os: [macos-13, ubuntu-latest, windows-latest]
16-
os: [ubuntu-latest]
17-
python-version: [3.8, 3.9, "3.10", 3.11]
18-
matlab-version: [R2021b, R2022a, R2022b, R2023a, R2023b]
16+
os: ["ubuntu-22.04"]
17+
matlab-version: [R2022b, R2023a, R2023b, R2024a, R2024b, R2025a, latest]
1918

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

.github/workflows/unix_unit_tests.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
name: MHKiT-MATLAB Unix Unit Tests
22

3+
# Only run tests when MATLAB files or this workflow file changes
34
on:
45
push:
56
branches: [ master, develop ]
7+
paths:
8+
- 'mhkit/**/*.m'
9+
- 'examples/**/*.m'
10+
- '.github/workflows/unix_unit_tests.yml'
611
pull_request:
712
branches: [ master, develop ]
13+
paths:
14+
- 'mhkit/**/*.m'
15+
- 'examples/**/*.m'
16+
- '.github/workflows/unix_unit_tests.yml'
817

918
jobs:
1019
cache_population:
1120
strategy:
1221
fail-fast: false
1322

1423
matrix:
15-
os: [ubuntu-latest]
16-
python-version: ["3.10"]
17-
matlab-version: [R2022b]
24+
os: ["ubuntu-22.04"]
25+
python-version: ["3.11"]
26+
matlab-version: [R2023b]
1827

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

@@ -37,6 +46,12 @@ jobs:
3746
conda activate mhkit_conda_env
3847
conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4
3948
49+
- name: Fix libstdc++ compatibility
50+
if: matrix.os == 'ubuntu-22.04'
51+
run: |
52+
# Force MATLAB to use system libstdc++
53+
echo "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/lib/x86_64-linux-gnu/libstdc++.so.6" >> "$GITHUB_ENV"
54+
4055
- name: Check out MHKiT-MATLAB
4156
uses: actions/checkout@v4
4257

@@ -122,15 +137,15 @@ jobs:
122137
fail-fast: false
123138

124139
matrix:
125-
os: [macos-13, ubuntu-latest]
140+
os: [macos-13, "ubuntu-22.04"]
126141
python-version: ["3.10", 3.11, 3.12]
127142
# Note: It is preferred to use an actual release name as opposed to 'latest'
128143
matlab-version: [R2022b, R2023a, R2023b, R2024a, R2024b]
129144
mhkit-python-version: ["0.9.0"]
130145
exclude:
131146
- python-version: "3.10" # cache_population job
132147
matlab-version: R2022b
133-
os: ubuntu-latest
148+
os: "ubuntu-22.04"
134149
# Python 3.12 + MATLAB incompatability
135150
- matlab-version: R2024a
136151
python-version: 3.12
@@ -153,6 +168,10 @@ jobs:
153168
- matlab-version: R2024b
154169
python-version: 3.12
155170
os: macos-13
171+
# Unable to resolve the name 'py.mhkit.wave.resource.jonswap_spectrum'
172+
- matlab-version: R2023a
173+
python-version: 3.10
174+
os: "ubuntu-22.04"
156175

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

@@ -179,9 +198,15 @@ jobs:
179198
conda activate mhkit_conda_env
180199
conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4
181200
182-
- name: Setup MATLAB Path on Ubuntu
183-
if: ${{ matrix.os == 'ubuntu-latest' }}
184-
run: echo "LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6" >> "$GITHUB_ENV"
201+
- name: Fix libstdc++ compatibility
202+
if: matrix.os == 'ubuntu-22.04'
203+
run: |
204+
# Force MATLAB to use system libstdc++
205+
echo "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/lib/x86_64-linux-gnu/libstdc++.so.6" >> "$GITHUB_ENV"
206+
207+
# - name: Setup MATLAB Path on Ubuntu
208+
# if: ${{ matrix.os == '"ubuntu-22.04"' }}
209+
# run: echo "LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6" >> "$GITHUB_ENV"
185210

186211
- name: Print Python executable
187212
shell: bash -l {0}

.github/workflows/windows_unit_tests.yml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
name: MHKiT-MATLAB Windows Unit Tests
22

3+
# Only run tests when MATLAB files or this workflow file changes
34
on:
45
push:
56
branches: [ master, develop ]
7+
paths:
8+
- 'mhkit/**/*.m'
9+
- 'examples/**/*.m'
10+
- '.github/workflows/windows_unit_tests.yml'
611
pull_request:
712
branches: [ master, develop ]
13+
paths:
14+
- 'mhkit/**/*.m'
15+
- 'examples/**/*.m'
16+
- '.github/workflows/windows_unit_tests.yml'
817

918
jobs:
1019
cache_population:
1120
strategy:
1221
fail-fast: false
1322
matrix:
1423
os: [windows-latest]
15-
python-version: ["3.10"]
24+
python-version: ["3.11"]
1625
matlab-version: [R2023b]
1726
runs-on: ${{ matrix.os }}
1827

@@ -80,6 +89,14 @@ jobs:
8089
with:
8190
release: ${{ matrix.matlab-version }}
8291

92+
- name: Set PYBIND11 GIL workaround
93+
# if: ${{ matrix.matlab-version == 'R2025a' }}
94+
shell: bash -l {0}
95+
run: |
96+
conda activate mhkit_conda_env
97+
export PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF=1
98+
echo "PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF=1" >> $GITHUB_ENV
99+
83100
- name: Configure MATLAB pyenv Version and ExecutionMode
84101
if: ${{ matrix.os == 'windows-latest' }}
85102
shell: pwsh
@@ -128,7 +145,8 @@ jobs:
128145
matrix:
129146
os: [windows-latest]
130147
python-version: ["3.10", 3.11, 3.12]
131-
matlab-version: [R2022b, R2023a, R2023b, R2024a, R2024b]
148+
# matlab-version: [R2022b, R2023a, R2023b, R2024a, R2024b]
149+
matlab-version: [R2023a, R2023b, R2024a, R2024b]
132150
mhkit-python-version: ["0.9.0"]
133151
exclude:
134152
# Cache population job
@@ -150,6 +168,11 @@ jobs:
150168
python-version: 3.11
151169
- matlab-version: R2022b
152170
python-version: 3.11
171+
# Failing Job
172+
# Python Error: ImportError: DLL load failed while importing pyexpat: The operating system cannot run %1
173+
- matlab-version: R2023a
174+
python-version: "3.10"
175+
153176
runs-on: ${{ matrix.os }}
154177

155178
env:
@@ -197,6 +220,21 @@ jobs:
197220
# pip uninstall -y scipy
198221
# pip install scipy==1.10.1
199222
#
223+
224+
# Some tests fail with:
225+
# Python Error: ImportError: DLL load failed while importing pyexpat: The operating system cannot run %1.
226+
# One potential fix is to install expat and lxml
227+
- name: Install Windows XML dependencies
228+
if: ${{ matrix.os == 'windows-latest' }}
229+
shell: bash -l {0}
230+
run: |
231+
conda activate mhkit_conda_env
232+
# Simple single package install to avoid solver issues
233+
conda install expat -y
234+
# Alternative: use pip for XML parsing
235+
pip install lxml
236+
237+
200238
- name: List installed pip modules
201239
shell: bash -l {0}
202240
run: |
@@ -227,6 +265,14 @@ jobs:
227265
with:
228266
release: ${{ matrix.matlab-version }}
229267

268+
- name: Set PYBIND11 GIL workaround
269+
# if: ${{ matrix.matlab-version == 'R2025a' }}
270+
shell: bash -l {0}
271+
run: |
272+
conda activate mhkit_conda_env
273+
export PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF=1
274+
echo "PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF=1" >> $GITHUB_ENV
275+
230276
- name: Add Python Dir to Path
231277
shell: bash -l {0}
232278
run: |

changelog.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,68 @@
1+
# Version 1.0.0
2+
3+
## Release Highlights
4+
5+
- New acoustics, and mooring modules
6+
- Improvements to Wave, WDRT, and DOLFYN modules
7+
- New examples for acoustics, mooring, and WEC-sim, and improved examples for DOLFYN and wave modules
8+
- Multiple bug fixes and performance improvements
9+
10+
## PR #174 - Acoustics Module
11+
12+
- Authors: @hivanov-nrel, @simmsa
13+
- Addition of acoustics module:
14+
- Reading and standardization of of OceanSonics icListen and OceanInstruments Soundtrap hydrophone files
15+
- Implementation of numerical computation sections IEC 62600-40 "Acoustic characterization of marine energy converters" standard
16+
- Spectrogram data visualizations using `plot_spectrogram`
17+
- Sound exposure level calculations with auditory weighting functions for 5 groups of marine mammals
18+
- Complete example livescript in examples/acoustics_example.mlx
19+
20+
## PR 176 - Wave Module Native MATLAB Implementation
21+
22+
- Authors: @MShabara, @simmsa
23+
- Convert wave module functions to native MATLAB code:
24+
- wave/resource/standardize_wave_spectra_frequency.m:
25+
- wave/resource/frequency_moment.m:
26+
- wave/resource/energy_period.m:
27+
- wave/resource/significant_wave_height.m:
28+
- wave/resource/jonswap_spectrum.m:
29+
- wave/resource/pierson_moskowitz_spectrum.m:
30+
- wave/resource/surface_elevation.m:
31+
32+
## PR 153 - Mooring Module
33+
34+
- Author: @hivanov-nrel
35+
- Addition of the mooring module, which includes
36+
- Read in MoorDyn files into MATLAB
37+
- Function to calculate mooring line lay length
38+
- Functions to visualize mooring line dynamics in 2D or 3D.
39+
- Example LiveScript demonstrating the functionality of the mooring module
40+
41+
## PR #173 - Dolfyn Turbulence Functionality
42+
43+
- Author: @simmsa, @browniea
44+
- Addition of turbulence calculations for acoustic doppler instruments
45+
- Turbulence intensity, noise, and reynolds stress calculations
46+
- Updates to examples/adcp_example.mlx live script
47+
48+
## PR 170 - WDRT leftovers
49+
50+
- Author: @hivanov-nrel
51+
- Expanded WDRT functionality by adding `automatic_hs_threshold` and `return_year_value` functions
52+
53+
## PR 169 - Code Compatibility Improvements
54+
55+
- Author: @simmsa
56+
- Fix code compatibility issues detailed in issues #115, #116, #117, #118, #119, #120, #121, and #122
57+
58+
## Bug Fixes
59+
60+
- Issue #172 - Fix Failing MLER Test - @hivanov-nrel
61+
- Issue #152 - Fix dimensionality differences in environmental_contours_example - @simmsa
62+
- Issue #146, #74 - Finish WDRT Parity - @hivanov-nrel
63+
- Issue #145 - Fix build errors in documentation - @simmsa
64+
- Issue #114, #115, #116, #117, #118, #119, #121, #122 - MATLAB code compatibility issues
65+
166
# MHKiT-MATLAB v0.6.0
267

368
## Release Highlights

0 commit comments

Comments
 (0)