-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MHKiT-Python v0.9.0 Support #149
base: develop
Are you sure you want to change the base?
Add MHKiT-Python v0.9.0 Support #149
Conversation
High level this is a byproduct of MHKiT-Python switching to xarray. I am not exactly sure of the root cause, but the difference is that that the modified MHKiT-Python functions return singular dimension DataFrames that need to be accessed without using `.values`
Updating to newer versions of MATLAB and Python to see if any test results change.
This attempts to fix: ``` /opt/hostedtoolcache/MATLAB/2022.2.999/x64/interprocess/bin/glnxa64/pycli/../../../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/runner/miniconda3/envs/mhkit_conda_env/lib/python3.10/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-310-x86_64-linux-gnu.so) ``` By updating the MATLAB version.
Removed in MHKiT Python v0.8.0 and above
This seems to determine how stable MATLAB is and using an older version is advantageous for compatibility. This increase is specifically for Python 3.12.
One test fails with 1.11.4: macos-13, Python 3.12, MATLAB R2024b ``` ../Users/runner/miniconda3/envs/mhkit_conda_env/lib/python3.12/site-packages/scipy/__init__.py:132: UserWarning: A NumPy version >=1.21.6 and <1.28.0 is required for this version of SciPy (detected version 2.2.2) warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}" ```
Attempt to silence: ``` C:\Users\runneradmin\miniconda3\Lib\site-packages\conda\base\context.py:201: FutureWarning: Adding 'defaults' to channel list implicitly is deprecated and will be removed in 25.3. To remove this warning, please choose a default channel explicitly with conda's regular configuration system, e.g. by adding 'defaults' to the list of channels: conda config --add channels defaults For more information see https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/use-condarc.html deprecated.topic( ```
Initial test failure summary: Failure Summary (Windows cache population job):
|
Fails with this error: ``` Error using _cythonized_array_utils>init scipy.linalg._cythonized_array_utils (line 1) Python Error: ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject ``` Same test works on ubuntu. Likely related to scipy version
Current Windows Population Job Test Summary:
|
@rpauly18, this PR is ready for review. This PR implements Python/Matlab type conversions that will unblock progress on the live scripts documentation (#110). Failed tests for follow-up PR:
Note: This PR touches multiple core modules requiring a merge commit. Recommend merging #151 first to avoid conflicts with the upcrossing module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Please make sure to document the unique install instructions (for Mac etc.) and update documentation accordingly
Support for MHKiT-Python 0.9.0
Major Changes
Version Compatibility Updates
Standardization of Type Conversions
This represents the initial implementation of standardized type conversion handling. Additional type
conversions will be implemented where necessary. Type conversion was heavily utilized in the wave
module to standardize xArray to Pandas output across different return types.
Note: At this time not all functions require changes to MHKiT-Python output type conversion. Only
functions that required standardized type conversion were changed in this PR
Currently implemented conversions:
Test Suite Modernization
Outstanding Test Issues (
assumeFail
)Note: Resolving these test failures is considered outside the scope of this PR as they require deeper investigation into underlying implementation differences between MHKiT-Python versions.
The following tests require further investigation and are currently marked as
assumeFail
:test_surface_elevation_seed
123
, which has been modifiedtest_surface_elevation_phasing
test_mler_coefficients
mler_coefficients
test_bin_statistics