Skip to content

Commit

Permalink
Merge pull request #138 from simmsa/prep-v0.5-release
Browse files Browse the repository at this point in the history
v0.5.0
  • Loading branch information
simmsa authored Jul 9, 2024
2 parents f7fda1a + 84aec54 commit e780f1c
Show file tree
Hide file tree
Showing 270 changed files with 234,975 additions and 837 deletions.
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

0 comments on commit e780f1c

Please sign in to comment.