Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8c54773
Use `main` as Primary Branch (#367)
ssolson Dec 9, 2024
b4016b9
Avoid failing to scan very large files (#371)
jmcvey3 Jan 9, 2025
048afe7
Fix for corrupted Nortek files (#372)
jmcvey3 Jan 14, 2025
c0f22b9
Fix Jupyter Notebook tests running Python 3.13 (#380)
ssolson Feb 14, 2025
409822d
Fix ever-changing RDI RiverPro depth bin ranges (#378)
jmcvey3 Feb 17, 2025
7c45c96
Update integral length scale function (#376)
jmcvey3 Feb 17, 2025
638876d
Acoustics SPL bugfix (#379)
jmcvey3 Feb 18, 2025
7e91cea
Allow clean functions to handle _avg variables (#377)
jmcvey3 Feb 25, 2025
81c60e3
IEC TS 62600 updates (#382)
akeeste Mar 31, 2025
f6f7301
Lint Tidal (#386)
ssolson Apr 8, 2025
2420620
Lint river module (#389)
ssolson Apr 21, 2025
c44e75d
MLER explanation updates/corrections (#393)
rgcoe Apr 29, 2025
f361390
Add discharge function to MHKiT (#385)
jmcvey3 May 5, 2025
5f78110
Sound Exposure Level (#388)
jmcvey3 May 6, 2025
eb77887
Improve Nortek2 index file creator functions (#397)
jmcvey3 May 12, 2025
cde337f
Read Sentinel V specific data packets (#396)
jmcvey3 May 16, 2025
e20a06f
Lint hindcast (#398)
ssolson May 19, 2025
6139f34
Add WEC-Sim power performance example (#395)
akeeste May 27, 2025
650dc95
CI Test Clean Up: Mock USGS, Acoustic Tolerances (#404)
ssolson Jul 1, 2025
68fe393
Modernize Package Configuration (#400)
ssolson Jul 15, 2025
6a474e9
Short list of VMDAS updates (#405)
jmcvey3 Jul 21, 2025
8ea3a4f
Allow user to specify universal Kolmogorov constant for TKE dissipati…
jmcvey3 Aug 15, 2025
c0bd56e
DOLfYN/RDI: Set `fs` to NaN when typical calculation methods yield e…
simmsa Aug 18, 2025
fb005ce
Configure specific warnings (#401)
ssolson Aug 19, 2025
aefc1d6
Update dolfyn function docstrings and associated notebooks (#412)
jmcvey3 Sep 9, 2025
efcdffe
Nortek Dual Profile Dataset Rotation (#414)
jmcvey3 Sep 9, 2025
4931d4d
Update examples (#417)
akeeste Sep 30, 2025
56e86e8
Update installation instructions in README.md
akeeste Sep 30, 2025
2529070
Merge branch 'main' into develop
akeeste Sep 30, 2025
2afcd58
Adjust acoustics test tolerances (#420)
akeeste Sep 30, 2025
947c460
prevent workflow running twice on PRs from develop into main
akeeste Sep 30, 2025
2cd048c
add clarifying comment to workflow concurrency
akeeste Sep 30, 2025
e47a245
define mplbackend in tests to prevent tcl or tk errors with matplotlib
akeeste Sep 30, 2025
fe6cd10
__init__ version 1.0.0
akeeste Sep 30, 2025
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
58 changes: 49 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Py 3.10, 3.11, 3.12 | Windows Mac Linux

on:
push:
pull_request:
branches:
- main
- develop
pull_request:
push:
branches:
- main
- develop

concurrency:
group: ${{ github.event.pull_request.number }} # Use the pull request number as the concurrency group
cancel-in-progress: true # Cancel any in-progress jobs for the same group. Prevents duplicate workflows on PRs from develop into main or from main into develop.

jobs:
set-os:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -83,7 +87,7 @@ jobs:
shell: bash -l {0}
run: |
conda activate mhkit-env
pip install -e . --no-deps
pip install -e ".[all,dev]" --no-deps

- name: Prepare non-hindcast API data
shell: bash -l {0}
Expand Down Expand Up @@ -134,7 +138,7 @@ jobs:
shell: bash -l {0}
run: |
conda activate mhkit-env
pip install -e . --no-deps
pip install -e ".[all,dev]" --no-deps

- name: Prepare Wave Hindcast data
shell: bash -l {0}
Expand Down Expand Up @@ -183,7 +187,7 @@ jobs:
shell: bash -l {0}
run: |
conda activate mhkit-env
pip install -e . --no-deps
pip install -e ".[all,dev]" --no-deps

- name: Prepare Wind Hindcast data
shell: bash -l {0}
Expand Down Expand Up @@ -286,7 +290,7 @@ jobs:
shell: bash -l {0}
run: |
python -m pip install --upgrade pip wheel
pip install coverage pytest coveralls .
pip install -e ".[all,dev]"

- name: Install setuptools for Python 3.12
if: matrix.python-version == '3.12'
Expand Down Expand Up @@ -354,7 +358,7 @@ jobs:
shell: bash -l {0}
run: |
conda activate mhkit-env
pip install -e . --no-deps
pip install -e ".[all,dev]" --no-deps

- name: Download Wave Hindcast data from artifact
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -390,6 +394,41 @@ jobs:
parallel: true
path-to-lcov: ./coverage.lcov

test-optional-pip-dependencies:
needs: [set-os, prepare-nonhindcast-cache]
runs-on: ubuntu-latest
strategy:
matrix:
module:
[wave, tidal, river, dolfyn, power, loads, mooring, acoustics, utils]
python-version: ['3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Download non-hindcast data
uses: actions/download-artifact@v4
with:
name: data
path: ~/.cache/mhkit

- name: Install MHKiT with optional dependency
run: |
python -m pip install --upgrade pip
pip install "mhkit[${{ matrix.module }}]"
pip install pytest

- name: Run tests for ${{ matrix.module }}
env:
MPLBACKEND: Agg
run: |
python -m pytest -c .github/workflows/pytest.ini mhkit/tests/${{ matrix.module }}/

notebook-matrix:
runs-on: ubuntu-latest
needs:
Expand Down Expand Up @@ -455,7 +494,8 @@ jobs:
with:
miniconda-version: 'latest'
auto-update-conda: true
python-version: '3.11'
python-version: '3.12'
channels: conda-forge
activate-environment: TESTconda
use-only-tar-bz2: false

Expand All @@ -475,7 +515,7 @@ jobs:
shell: bash -l {0}
run: |
conda activate mhkit-env
pip install -e . --no-deps
pip install -e ".[all,dev]" --no-deps

- name: Download non-hindcast data
uses: actions/download-artifact@v4
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install pylint
pip install .
pip install ".[all,dev]"

- name: Run Pylint on mhkit/loads/
run: |
Expand All @@ -36,3 +35,15 @@ jobs:
- name: Run Pylint on mhkit/acoustics/
run: |
pylint mhkit/acoustics/

- name: Run Pylint on mhkit/tidal/
run: |
pylint mhkit/tidal/

- name: Run Pylint on mhkit/river/
run: |
pylint --extension-pkg-allow-list=netCDF4 mhkit/river/

- name: Run Pylint on mhkit/wave/io/hindcast/
run: |
pylint mhkit/wave/io/hindcast/
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,54 @@ See the [MHKiT documentation](https://mhkit-software.github.io/MHKiT) for more i

## Installation

MHKiT-Python requires Python (3.10, 3.11, 3.12) along with several Python
package dependencies. MHKiT-Python can be installed using the Conda package manager:
[MHKiT-Python](https://github.com/MHKiT-Software/MHKiT-Python) requires [Python (3.10-3.12)](https://www.python.org/).
It is recommended to use the [Anaconda Python Distribution](https://www.anaconda.com/distribution/) (a fully featured Python installer with a GUI)
or [Miniconda](https://docs.anaconda.com/miniconda/#quick-command-line-install) (a lightweight installer with the ``conda`` command line utility).
Both will include most of MHKiT-Python's package dependencies.
MHKiT can be installed several ways:

### Option 1: Install from Python

This option is recommended as a fast installation for MHKiT-Python users.
To install MHKiT-Python using ``conda``, in an Anaconda Prompt:

```bash
conda install -c conda-forge mhkit
```

### Option 2: Clone Repository from GitHub

This option is recommended for MHKiT-Python users who want access to example notebooks and developers.
Download and install your preferred version of [git](https://git-scm.com/).
To clone MHKiT-Python:

```bash
conda install -c conda-forge mhkit
git clone https://github.com/MHKiT-Software/MHKiT-Python
cd MHKiT-Python
```

MHKiT can alternatively be installed from PyPi using pip:
To install a local, editable version of MHKiT-Python using [pip](https://pip.pypa.io/en/stable/):

```bash
pip install mhkit
pip install -e .["all"]
```

An [environment YAML file](https://github.com/MHKiT-Software/MHKiT-Python/blob/main/environment.yml) is also provided that can create the base environment required by MHKiT.
MHKiT can then be installed into that environment using any of the provided methods.

### Option 3: Module-specific Install from Python

A slim version of MHKiT-Python can be installed to reduce the number of dependencies and potential conflicts with other software.
This installation utilizes pip's optional dependencies installation.
To install a single MHKiT module, e.g. the wave module, and its dependencies, use:

pip install mhkit["wave"]

Note that ``pip install mhkit`` only installs the base MHKiT dependencies and not the entire software.
To install all MHKiT dependencies use:

pip install mhkit["all"]

See [installation instructions](https://mhkit-software.github.io/MHKiT/installation.html) for more information.

## Copyright and license
Expand Down
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python>=3.10
- python>=3.10,<3.13
- pip
- numpy>=2.0.0
- pandas>=2.2.2
Expand All @@ -25,3 +25,4 @@ dependencies:
- matplotlib>=3.9.1
- fatpack
- nrel-rex
- cartopy
Loading
Loading