MHKiT-Software / MHKiT-MATLAB

MHKiT-MATLAB provides the marine renewable energy (MRE) community tools for data processing, visualization, quality control, resource assessment, and device performance.
https://mhkit-software.github.io/MHKiT/
BSD 3-Clause "New" or "Revised" License
15 stars 23 forks source link

Refactor or deprecate `Wave_TestResourceMetrics` tests that call `environmental_contour` #109

Open simmsa opened 6 months ago

simmsa commented 6 months ago

Description

test_environmental_contour, test_plot_environmental, and test_plot_environmental_contour_multiyear tests are failing. This issue initiates discussions on whether to refactor or deprecate these tests.

Context

    'MATLAB:Python:PyException'
    --------------
    Error Details:
    --------------
    Error using Wave_TestResourceMetrics/test_plot_environmental_contour
    Python Error: TypeError: environmental_contours() missing 1 required positional argument: 'method'

Options:

Additional Information

The specified tests call wave/resource/environmental_contour. The current version MHKiT-Python tests environmental contours here. In MHKIT-Python v0.6.0 this test was split from test_resource_metrics.py. To keep parity with MKHIT-Python, it may make sense to split these tests into a new file called Wave_TestContours and utilize a similar testing methodology as MHKiT-Python.

The root of this issue looks to be a the addition of the method argument to the environmental_contours function in MHKiT-Python, and changes to the structure of the returned dictionary.

The fix will require adding a new argument to environmental_contour and updating the code that converts the output of this function into a type that is useable in MATLAB.