Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2ccc286
Merge pull request #267 from MHKiT-Software/develop
ssolson Aug 31, 2023
ae6b715
assert to exception
ssolson Nov 21, 2023
7614867
Revert "Ensure interpolation values are within range when sampling co…
ssolson Nov 21, 2023
d09e606
Merge branch 'master' of https://github.com/MHKiT-Software/MHKiT-Pyth…
ssolson Nov 29, 2023
35a917c
Merge branch 'develop' of https://github.com/ssolson/MHKiT-Python int…
ssolson Nov 29, 2023
afd3171
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
ssolson Dec 6, 2023
667a416
Merge branch 'develop' of https://github.com/ssolson/MHKiT-Python int…
ssolson Dec 6, 2023
76cf500
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
ssolson Feb 5, 2024
e267aa0
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
ssolson Mar 12, 2024
05916f5
Merge branch 'develop' of https://github.com/ssolson/MHKiT-Python int…
ssolson Mar 12, 2024
d906411
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
ssolson Mar 19, 2024
915d99d
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
ssolson Apr 23, 2024
ecbc2fc
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
ssolson Apr 25, 2024
a3ed6e2
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
ssolson Apr 29, 2024
a32b08a
Merge branch 'develop' of https://github.com/MHKiT-Software/MHKiT-Pyt…
ssolson Apr 30, 2024
5f06cdb
correct py version
ssolson Apr 30, 2024
7214eca
temp add windows and mac to check if passing.
ssolson May 1, 2024
4552d47
install dependencies
ssolson May 1, 2024
da11a97
install as 1 step
ssolson May 1, 2024
0a8157c
remove pip whell upgrade from pip build
ssolson May 1, 2024
da175d9
add pip wheel back
ssolson May 1, 2024
27ac72b
macos-13
ssolson May 1, 2024
48350a3
use coveralls action
ssolson May 1, 2024
3220283
generate lcov
ssolson May 2, 2024
db3c285
generate lcov
ssolson May 2, 2024
9d84cdd
check coverage version
ssolson May 2, 2024
ba97b46
update coverage package
ssolson May 2, 2024
0d6e69e
conda forge
ssolson May 2, 2024
591b0c3
add coverage path
ssolson May 2, 2024
1bbd572
should not upload coverage file
ssolson May 2, 2024
3235126
use env file
ssolson May 2, 2024
cae6ab9
macos-latest
ssolson May 2, 2024
d7cbac6
move coverage genertation back to pytest step
ssolson May 2, 2024
6b13de7
brew install hdf5 on mac and py 3.8
ssolson May 3, 2024
1a18538
install netcdf with homebrew
ssolson May 3, 2024
92b5bdc
use coverage action everywhere
ssolson May 3, 2024
a8938bf
push to develop tests all OS
ssolson May 3, 2024
6d46a1f
fix `develop` reference in `set-os`
ssolson May 3, 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
84 changes: 48 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
steps:
- id: set-matrix
run: |
if [[ "${{ github.base_ref }}" == "develop" ]]; then
echo "matrix_os=[\"ubuntu-latest\"]" >> $GITHUB_OUTPUT
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "develop" ]]; then
echo "matrix_os=[\"ubuntu-latest\"]" >> $GITHUB_OUTPUT
else
echo "matrix_os=[\"windows-latest\", \"ubuntu-latest\", \"macos-latest\"]" >> $GITHUB_OUTPUT
fi
Expand Down Expand Up @@ -107,14 +107,14 @@ jobs:
miniconda-version: 'latest'
auto-update-conda: true
activate-environment: TEST
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PYTHON_VER }}
use-only-tar-bz2: true

- name: Setup Conda environment
shell: bash -l {0}
run: |
conda install numpy cython pip pytest hdf5 libnetcdf cftime netcdf4 coverage --strict-channel-priority
pip install -e . --no-deps --force-reinstall
pip install -e . --force-reinstall

- name: Install dependencies
shell: bash -l {0}
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
miniconda-version: 'latest'
auto-update-conda: true
activate-environment: TEST
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PYTHON_VER }}
use-only-tar-bz2: true

- name: Setup Conda environment
Expand Down Expand Up @@ -195,41 +195,36 @@ jobs:
with:
miniconda-version: 'latest'
auto-update-conda: true
environment-file: environment.yml
activate-environment: TEST
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true
use-only-tar-bz2: false

- name: Create and setup Conda environment
shell: bash -l {0}
run: |
conda install numpy cython pip hdf5 libnetcdf cftime netcdf4 --strict-channel-priority
pip install -e . --no-deps --force-reinstall

- name: Install dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip wheel
pip install coverage pytest coveralls .
conda install -c conda-forge pytest coverage=7.5.0 coveralls --strict-channel-priority
pip install -e . --force-reinstall

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

- name: Run pytest
- name: Run pytest & generate coverage report
shell: bash -l {0}
run: |
coverage run --rcfile=.github/workflows/.coveragerc --source=./mhkit/ -m pytest -c .github/workflows/pytest.ini
coverage lcov

- name: Upload coverage data to coveralls.io
shell: bash -l {0}
run: |
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.python-version }}
parallel: true
path-to-lcov: ./coverage.lcov

pip-build:
name: pip-${{ matrix.os }}/${{ matrix.python-version }}
Expand All @@ -249,6 +244,21 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install HDF5 (macOS with Python 3.8)
if: startsWith(runner.os, 'macOS') && matrix.python-version == '3.8'
run: brew install hdf5

- name: Install NetCDF (macOS with Python 3.8)
if: startsWith(runner.os, 'macOS') && matrix.python-version == '3.8'
run: brew install netcdf

- name: Set environment variables (macOS with Python 3.8)
if: startsWith(runner.os, 'macOS') && matrix.python-version == '3.8'
run: |
echo "HDF5_DIR=$(brew --prefix hdf5)" >> $GITHUB_ENV
echo "NETCDF4_DIR=$(brew --prefix netcdf)" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$(brew --prefix hdf5)/lib/pkgconfig:$(brew --prefix netcdf)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV

- name: Set up Git repository
uses: actions/checkout@v4

Expand All @@ -264,17 +274,19 @@ jobs:
python -m pip install --upgrade pip wheel
pip install coverage pytest coveralls .

- name: Run pytest
- name: Run pytest & generate coverage report
shell: bash -l {0}
run: |
coverage run --rcfile=.github/workflows/.coveragerc --source=./mhkit/ -m pytest -c .github/workflows/pytest.ini
coverage run --rcfile=.github/workflows/.coveragerc --source=./mhkit/ -m pytest -c .github/workflows/pytest.ini
coverage lcov

- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.python-version }}
parallel: true
path-to-lcov: ./coverage.lcov

hindcast-calls:
name: hindcast-${{ matrix.os }}/${{ matrix.python-version }}
Expand Down Expand Up @@ -338,15 +350,15 @@ jobs:
python -m pip install --upgrade pip wheel
pip install coveralls .
coverage run --rcfile=.github/workflows/.coveragehindcastrc -m pytest -c .github/workflows/pytest-hindcast.ini
coverage lcov

- name: Upload coverage data to coveralls.io
shell: bash -l {0}
run: |
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.python-version }}
parallel: true
path-to-lcov: ./coverage.lcov

coveralls:
name: Indicate completion to coveralls.io
Expand Down
25 changes: 25 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: myenv
channels:
- conda-forge
- defaults
dependencies:
- python>=3.8
- pandas>=1.0.0
- numpy>=1.21.0
- scipy
- matplotlib
- requests
- lxml
- scikit-learn
- statsmodels
- bottleneck
- beautifulsoup4
- xarray
- h5py>=3.6.0
- netcdf4>=1.5.8
- pip:
- pecos>=0.3.0
- fatpack
- NREL-rex>=0.2.63
- h5pyd>=0.7.0
- six>=1.13.0