-
Notifications
You must be signed in to change notification settings - Fork 41
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
Group index step validators #1143
Comments
lucas-flexcompute
added a commit
that referenced
this issue
Sep 11, 2023
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
lucas-flexcompute
added a commit
that referenced
this issue
Sep 11, 2023
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
lucas-flexcompute
added a commit
that referenced
this issue
Sep 11, 2023
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
lucas-flexcompute
added a commit
that referenced
this issue
Sep 11, 2023
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
momchil-flex
pushed a commit
that referenced
this issue
Sep 11, 2023
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
Fixed in #1152 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current group index validator doesn't error on
ModeSpec(group_index_step=1)
https://github.com/flexcompute/tidy3d/blob/develop/tidy3d/components/mode.py#L133-L140. From what I understand, this happens because1
is automatically converted intoTrue
given the field definitiongroup_index_step: Union[bool, pd.PositiveFloat]
. I tried changing it togroup_index_step: Union[pd.PositiveFloat, bool]
but in this caseTrue
gets converted into1
. Not sure what would be the best way to resolve this issue. I guess one option is to just split this field into two :group_index_step: pd.PositiveFloat = pd.Field(GROUP_INDEX_STEP, ...)
compute_group_index: bool = pd.Field(False, ...)
What do you think, @lucas-flexcompute?
Also, root validator https://github.com/flexcompute/tidy3d/blob/develop/tidy3d/components/mode.py#L142 probably needs
skip_on_failure=True
. Otherwise, even if previous validators fail, it still gets executed and fails itself when trying to getvalues["group_index_step"]
. So, instead of desiredwhat gets displayed is:
The text was updated successfully, but these errors were encountered: