MHKiT-Python provides the marine renewable energy (MRE) community tools for data processing, visualization, quality control, resource assessment, and device performance.
This Pull Request introduces a mechanism to selectively trigger the execution of expensive hindcast tests based on the context of the changes made. Specifically, the hindcast tests will only run under two scenarios:
If there are changes made to the modules within the mhkit/wave/io/hindcast directory.
If the merge request is targeted at the master branch.
To achieve this, a new job named check-changes has been added to the workflow, which precedes the prepare-cache job.
Here's how the check-changes job operates:
Detecting Module Changes:
Check if any files within the mhkit/wave/io/hindcast directory have been altered.
If yes, set wave_io_hindcast_changed to true.
If no, set wave_io_hindcast_changed to false.
Determining Hindcast Test Execution:
Check if the PR is against the master branch or if wave_io_hindcast_changed is true.
If either condition is met, set should-run-hindcast to true.
Otherwise, set should-run-hindcast to false.
Some additional minor modifications have been made to ensure the seamless integration of Coveralls reporting, regardless of whether the hindcast tests are executed or skipped.
This Pull Request introduces a mechanism to selectively trigger the execution of expensive hindcast tests based on the context of the changes made. Specifically, the hindcast tests will only run under two scenarios:
mhkit/wave/io/hindcast
directory.master
branch.To achieve this, a new job named
check-changes
has been added to the workflow, which precedes theprepare-cache
job.Here's how the check-changes job operates:
mhkit/wave/io/hindcast
directory have been altered.wave_io_hindcast_changed
to true.wave_io_hindcast_changed
to false.wave_io_hindcast_changed
is true.should-run-hindcast
to true.should-run-hindcast
to false.Some additional minor modifications have been made to ensure the seamless integration of Coveralls reporting, regardless of whether the hindcast tests are executed or skipped.