add omas_environment import to support additional functionality#61
Open
jguterl wants to merge 2 commits into
Open
add omas_environment import to support additional functionality#61jguterl wants to merge 2 commits into
jguterl wants to merge 2 commits into
Conversation
dgarnier
requested changes
May 12, 2026
|
|
||
|
|
||
| def fill_ds(m: Machine, eq: DS, wall: DS, time_index: int | None, time: float) -> None: | ||
| def fill_ds(m: Machine, eq: DS, wall: DS, time_index: int | None, time: float,enforce_boundary_import=True) -> None: |
Owner
There was a problem hiding this comment.
needs space.. ruff --fix will do it.
| os.environ["HOME"] = str(Path("~").expanduser()) # os.path.expanduser("~") | ||
|
|
||
| from omas import ODS # type: ignore[import-untyped] | ||
| from omas import ODS, omas_environment # type: ignore[import-untyped] |
Owner
There was a problem hiding this comment.
you are importing this, but there is no place where its used. I think this needs to be used a context for doing ods operations somewhere... maybe you wanted to specify the cocos with this line?
|
|
||
| def to_omas( | ||
| m: Machine, ods: ODS | None = None, time_index: int | None = None, time: float = 0.0 | ||
| m: Machine, ods: ODS | None = None, time_index: int | None = None, time: float = 0.0, **kwargs |
Owner
There was a problem hiding this comment.
I prefer you not to use unarmed keywords. No way of getting the documentation or typing correct. Please just propagate upward the keyword and documenting.
| ods, eq, wall = prepare_omas_ds(ods) | ||
|
|
||
| fill_ds(m, eq, wall, time_index, time) | ||
| fill_ds(m, eq, wall, time_index, time, **kwargs) |
| add_boundary(m, eqt) | ||
| add_boundary_separatrix(m, eqt) | ||
| add_inner_boundary_separatrix(m, eqt) | ||
| if enforce_boundary_import: |
Owner
There was a problem hiding this comment.
I wonder if we even care if it fails. Can we just never inforce but print a warning?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.