Skip to content
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

IEC TS 62600 updates #382

Merged
merged 8 commits into from
Mar 31, 2025
Merged

IEC TS 62600 updates #382

merged 8 commits into from
Mar 31, 2025

Conversation

akeeste
Copy link
Contributor

@akeeste akeeste commented Feb 17, 2025

Resolves #381

TODO:

  • 62600-100 Ed. 2 en 2024 (WEC Power Performance)
  • "capture length" to "capture width"
    • changed across all MHKiT including: textual references in doc strings and notebooks, function names, variable names (L --> CW, LM --> CWM)
    • Created function aliases for capture_length and capture_length_matrix that point to capture_width and capture_width_matrix respectively.
    • Optional: could add deprecation warnings to the function aliases
  • 62600-101 Ed. 2 en 2024 (Wave resource)
  • Generally, "IEC/TS" is updated to "IEC TS"
    • Looking at IEC references again, this seems to be somewhat inconsistent. In the standard itself they always use "IEC TS X-Y" but the formatting probably isn't that important. I'm inclined to leave my update instead of reverting it
  • Update standard deviation degree of freedom
  • Confirm that we define bins edges/centers in the same was as the 62600 for e.g. power matrices
    • Bins are not specifically defined in IEC TS 62600, so there's no way to confirm we use them the same. Though I think our representation is fairly standard (bin name = bin center, bin edges are halfway between centers, etc). I also added warnings on height/period bin sizing which is called out, so we are adhering as closely as possible.

@akeeste akeeste linked an issue Feb 20, 2025 that may be closed by this pull request
@akeeste akeeste marked this pull request as ready for review March 4, 2025 15:40
Copy link
Contributor

@ssolson ssolson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akeeste thanks for updating the functions to match the latest TS.

The changes are consistently applied and the only question I had was around if in the future we would want to deprecate capture length. You captured this option in your PR summary. Interested in capturing your thoughts here before merging this PR.

@akeeste
Copy link
Contributor Author

akeeste commented Mar 19, 2025

@ssolson I'm on the fence. It's not a lot of effort to maintain these two so I'm in no rush to deprecate them, but I know this stuff adds up over time. Perhaps we should add a FutureWarning now to encourage users to move to the new function over time

@ssolson
Copy link
Contributor

ssolson commented Mar 19, 2025

I think we should aim to support only the terminology defined in the standard.

I agree that we should add a future deprecation warning.

@akeeste
Copy link
Contributor Author

akeeste commented Mar 19, 2025

Sounds good. I'll add two FutureWarnings quick

@akeeste
Copy link
Contributor Author

akeeste commented Mar 19, 2025

@ssolson is there a reason we ignore all FutureWarnings in mhkit/__init__.py?

@akeeste
Copy link
Contributor Author

akeeste commented Mar 19, 2025

@ssolson I added FutureWarnings. Per https://docs.python.org/3/library/warnings.html, this seems like the most accurate category to use. However we ignore all of these warning types in mhkit/init.py which prevents users from seeing it

@ssolson
Copy link
Contributor

ssolson commented Mar 31, 2025

@akeeste apologies I missed the notification on this and I should have checked in sooner.

I believe ignoring the future warning was added to address mhkit dependencies warnings which could not be updated at one time (e.g. the update needed to remove the future warning was not available). Seeing the warning added confusion to the user's mhkit environment setup we did not want them to worry about.

Now that the future warning exists in this module I suggest we merge this PR and in a separate issue/ PR we handle cleaning up this logic to address only specific future warnings that we specifically want to ignore (replacing the blunt ignore all logic currently implemented).

@akeeste
Copy link
Contributor Author

akeeste commented Mar 31, 2025

@ssolson that sounds good. This is ready to merge from my end. The FutureWarnings currently added will work once we address ignoring them over all

@ssolson ssolson merged commit 81c60e3 into MHKiT-Software:develop Mar 31, 2025
43 checks passed
@akeeste akeeste deleted the iec_updates branch April 1, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updates to IEC marine energy standards
2 participants