Skip to content

Commit e780f1c

Browse files
authored
Merge pull request #138 from simmsa/prep-v0.5-release
v0.5.0
2 parents f7fda1a + 84aec54 commit e780f1c

File tree

270 files changed

+234975
-837
lines changed

Some content is hidden

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

270 files changed

+234975
-837
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/unix_unit_tests.yml

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: MHKiT-MATLAB Unix Unit Tests
22

33
on:
44
push:
5-
branches: [master, develop, ebbflood]
5+
branches: [ master, develop ]
66
pull_request:
7-
branches: [master, develop, ebbflood]
7+
branches: [ master, develop ]
88

99
jobs:
1010
cache_population:
@@ -35,7 +35,7 @@ jobs:
3535
shell: bash -l {0}
3636
run: |
3737
conda activate mhkit_conda_env
38-
conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4
38+
conda install numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4
3939
# conda install netcdf4 hdf5
4040
# export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
4141
@@ -67,6 +67,19 @@ jobs:
6767
conda activate mhkit_conda_env
6868
pip install -e .
6969
70+
- name: Pin scipy version
71+
shell: bash -l {0}
72+
run: |
73+
conda activate mhkit_conda_env
74+
pip uninstall -y scipy
75+
pip install scipy==1.10.1
76+
77+
- name: List installed pip modules
78+
shell: bash -l {0}
79+
run: |
80+
conda activate mhkit_conda_env
81+
pip freeze
82+
7083
# Create the cache and add a dummy file
7184
# The dummy file ensures that the artifact download
7285
- name: Setup mhkit_webread_cache
@@ -163,24 +176,24 @@ jobs:
163176
- matlab-version: R2020b
164177
python-version: 3.9
165178
# Specific versions of tests that fail consistently. Most likely due to the GitHub actions environment
166-
- matlab-version: R2024a # Python netcdf4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123413351
167-
python-version: 3.11
168-
os: macos-13
179+
# - matlab-version: R2024a # Python netcdf4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123413351
180+
# python-version: 3.11
181+
# os: macos-13
169182
# - matlab-version: R2024a # Working!
170183
# python-version: "3.10"
171184
# os: macos-13
172-
- matlab-version: R2024a # Java Segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411604
173-
python-version: 3.9
174-
os: macos-13
175-
- matlab-version: R2023b # Python netcd4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412889
176-
python-version: 3.11
177-
os: macos-13
178-
- matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412352
179-
python-version: "3.10"
180-
os: macos-13
181-
- matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411335
182-
python-version: 3.9
183-
os: macos-13
185+
# - matlab-version: R2024a # Java Segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411604
186+
# python-version: 3.9
187+
# os: macos-13
188+
# - matlab-version: R2023b # Python netcd4 pip build error: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412889
189+
# python-version: 3.11
190+
# os: macos-13
191+
# - matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123412352
192+
# python-version: "3.10"
193+
# os: macos-13
194+
# - matlab-version: R2023b # Java segfault on Python initialization: https://github.com/MHKiT-Software/MHKiT-MATLAB/actions/runs/8789749433/job/24123411335
195+
# python-version: 3.9
196+
# os: macos-13
184197

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

@@ -211,14 +224,14 @@ jobs:
211224
shell: bash -l {0}
212225
run: |
213226
conda activate mhkit_conda_env
214-
conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4
227+
conda install numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4
215228
# conda install netcdf4 hdf5
216229
# export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
217230
218231
# - name: Setup Python ${{ matrix.python-version }}
219232
# shell: bash -l {0}
220233
# run: |
221-
# conda create --name mhkit_conda_env python=${{ matrix.python-version }} numpy cython pip pytest hdf5 libnetcdf cftime netcdf4 --strict-channel-priority
234+
# conda create --name mhkit_conda_env python=${{ matrix.python-version }} numpy==1.24.4 cython pip pytest hdf5 libnetcdf cftime netcdf4 --strict-channel-priority
222235
# conda activate mhkit_conda_env
223236
# export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
224237
# pip install -e . --no-deps --force-reinstall
@@ -292,6 +305,13 @@ jobs:
292305
conda activate mhkit_conda_env
293306
pip install -e .
294307
308+
- name: Pin scipy version
309+
shell: bash -l {0}
310+
run: |
311+
conda activate mhkit_conda_env
312+
pip uninstall -y scipy
313+
pip install scipy==1.10.1
314+
295315
- name: List installed pip modules
296316
shell: bash -l {0}
297317
run: |

.github/workflows/windows_unit_tests.yml

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

33
on:
44
push:
5-
branches: [master, develop, ebbflood]
5+
branches: [ master, develop ]
66
pull_request:
7-
branches: [master, develop, ebbflood]
7+
branches: [ master, develop ]
88

99
jobs:
1010
cache_population:
@@ -33,8 +33,7 @@ jobs:
3333
- name: "Conda install netcdf4, hdf5"
3434
run: |
3535
conda activate mhkit_conda_env
36-
conda install netcdf4 hdf5
37-
36+
conda install numpy==1.24.4 netcdf4 hdf5
3837
- name: Check out MHKiT-MATLAB
3938
uses: actions/checkout@v4
4039

@@ -61,6 +60,13 @@ jobs:
6160
conda activate mhkit_conda_env
6261
pip install -e .
6362
63+
- name: Pin scipy version
64+
shell: bash -l {0}
65+
run: |
66+
conda activate mhkit_conda_env
67+
pip uninstall -y scipy
68+
pip install scipy==1.10.1
69+
6470
# Create the cache and add a dummy file
6571
# The dummy file ensures that the artifact download
6672
- name: Setup mhkit_webread_cache
@@ -69,7 +75,6 @@ jobs:
6975
mkdir mhkit_webread_cache
7076
touch mhkit_webread_cache/test.txt
7177
echo "Hello World" > mhkit_webread_cache/test.txt
72-
7378
- name: Set up MATLAB
7479
uses: matlab-actions/setup-matlab@v2
7580
with:
@@ -80,12 +85,10 @@ jobs:
8085
shell: pwsh
8186
run: >
8287
"pyenv(Version='{0}', ExecutionMode='OutOfProcess')" -f (python -c "import sys; print(sys.executable)") | Out-File -FilePath run.m
83-
8488
- name: Check Python System Path
8589
shell: bash -l {0}
8690
run: |
8791
echo "py.sys.path" >> run.m
88-
8992
- name: Add MATLAB test commands
9093
shell: bash
9194
run: echo "version,
@@ -126,6 +129,7 @@ jobs:
126129
matlab-version: [R2021b, R2022a, R2022b, R2023a, R2023b, R2024a]
127130
mhkit-python-version: ["0.7.0"]
128131
exclude:
132+
# Cache population job
129133
- matlab-version: R2022a
130134
python-version: 3.9
131135
- matlab-version: R2023b
@@ -176,20 +180,17 @@ jobs:
176180
shell: bash -l {0}
177181
run: |
178182
conda activate mhkit_conda_env
179-
conda install netcdf4 hdf5
180-
183+
conda install numpy==1.24.4 netcdf4 hdf5
181184
- name: Output python executable
182185
shell: bash -l {0}
183186
run: |
184187
conda activate mhkit_conda_env
185188
python -c "import sys; print(sys.executable)"
186-
187189
- name: Print Python Version
188190
shell: bash -l {0}
189191
run: |
190192
conda activate mhkit_conda_env
191193
python --version
192-
193194
- name: Check out MHKiT-MATLAB
194195
uses: actions/checkout@v4
195196

@@ -210,31 +211,34 @@ jobs:
210211
run: |
211212
conda activate mhkit_conda_env
212213
pip install mhkit==$MHKIT_PYTHON_VERSION
213-
214214
- name: pip install mhkit-python-utils module from source
215215
shell: bash -l {0}
216216
run: |
217217
conda activate mhkit_conda_env
218218
pip3 install -e .
219219
220+
- name: Pin scipy version
221+
shell: bash -l {0}
222+
run: |
223+
conda activate mhkit_conda_env
224+
pip uninstall -y scipy
225+
pip install scipy==1.10.1
226+
220227
- name: List installed pip modules
221228
shell: bash -l {0}
222229
run: |
223230
conda activate mhkit_conda_env
224231
pip3 freeze
225-
226232
- name: Print MHKiT-Python Version
227233
shell: bash -l {0}
228234
run: |
229235
conda activate mhkit_conda_env
230236
python -c "import mhkit; print(mhkit.__version__)"
231-
232237
- name: Verify MHKiT-Python Operation
233238
shell: bash -l {0}
234239
run: |
235240
conda activate mhkit_conda_env
236241
python -c "import mhkit; [ED, AP] = mhkit.river.performance.circular(30); print(ED); print(AP);"
237-
238242
- name: Download mhkit_webread_cache artifact
239243
uses: actions/download-artifact@v4
240244
with:
@@ -255,19 +259,16 @@ jobs:
255259
run: |
256260
conda activate mhkit_conda_env
257261
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
258-
259262
# OutOfProcess works reliably on linux, macos, and windows
260263
- name: Configure MATLAB pyenv Version and ExecutionMode
261264
shell: bash -l {0}
262265
run: |
263266
conda activate mhkit_conda_env
264267
printf "pyenv(Version='%s', ExecutionMode='OutOfProcess')\n" $(python -c "import sys; print(sys.executable)") >> run.m
265-
266268
- name: Check Python System Path
267269
shell: bash -l {0}
268270
run: |
269271
echo "py.sys.path" >> run.m
270-
271272
- name: Add MATLAB test commands
272273
shell: bash
273274
run: echo "version,

.gitignore

Lines changed: 73 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,78 @@
1-
*.xlsm
2-
*.xlsx
3-
*.pyc
4-
test.egg-info/*
5-
*.exe
6-
*.spec
7-
**/build
8-
**./dist/
9-
**/cache/
10-
**/static/
11-
.DS_Store
12-
.DS_Store?
13-
._*
14-
.Spotlight-V100
15-
.Trashes
16-
ehthumbs.db
17-
Thumbs.db
18-
*.log
19-
*.sql
20-
*.sqlite
21-
*.7z
22-
*.dmg
23-
*.gz
24-
*.iso
25-
*.jar
26-
*.rar
27-
*.tar
28-
*.zip
29-
*~
30-
*.json
31-
*egg-info
32-
*build
33-
.gitignore
34-
1+
# MHKiT-MATLAB Specific Files
352
# Test results
363
mhkit/tests/test_results/*
374

38-
# MHKiT-MATLAB Specific Files
395
# Hindcast data cache
406
mhkit_webread_cache
7+
8+
# MATLAB
9+
10+
# Windows default autosave extension
11+
*.asv
12+
13+
# OSX / *nix default autosave extension
14+
*.m~
15+
16+
# Compiled MEX binaries (all platforms)
17+
*.mex*
18+
19+
# Packaged app and toolbox files
20+
*.mlappinstall
21+
# *.mltbx
22+
23+
# Generated helpsearch folders
24+
helpsearch*/
25+
26+
# Simulink code generation folders
27+
slprj/
28+
sccprj/
29+
30+
# Matlab code generation folders
31+
codegen/
32+
33+
# Simulink autosave extension
34+
*.autosave
35+
36+
# Simulink cache files
37+
*.slxc
38+
39+
# Octave session info
40+
octave-workspace
41+
42+
# Python
43+
44+
# Byte-compiled / optimized / DLL files
45+
__pycache__/
46+
*.py[cod]
47+
*$py.class
48+
49+
# C extensions
50+
*.so
51+
52+
# Distribution / packaging
53+
.Python
54+
eggs/
55+
.eggs/
56+
sdist/
57+
var/
58+
wheels/
59+
share/python-wheels/
60+
*.egg-info/
61+
.installed.cfg
62+
*.egg
63+
64+
# MacOS
65+
66+
# General
67+
.DS_Store
68+
.AppleDouble
69+
.LSOverride
70+
71+
# Files that might appear in the root of a volume
72+
.DocumentRevisions-V100
73+
.fseventsd
74+
.Spotlight-V100
75+
.TemporaryItems
76+
.Trashes
77+
.VolumeIcon.icns
78+
.com.apple.timemachine.donotpresent

0 commit comments

Comments
 (0)