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

Sort the responses and parameter views #233

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

frode-aarstad
Copy link
Contributor

Issue
Resolves #231

@frode-aarstad frode-aarstad force-pushed the sort-parmas branch 4 times, most recently from 9316d4a to cc26dc2 Compare March 10, 2022 13:14
DanSava
DanSava previously approved these changes Mar 14, 2022
@@ -127,7 +127,8 @@ def update_graph(

def _generate_plot(ensemble_id: str, color: str) -> ResponsePlotModel:
ensemble = load_ensemble(parent, ensemble_id)
plot = _create_misfits_plot(ensemble.responses[response], [], color)
resp = ensemble.responses[str(response)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this refactoring really needed? Also, why is the string conversion required ? str(response)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I did not explicitly cast to string the type-check would complain about the Optional[str] type

Copy link
Collaborator

Choose a reason for hiding this comment

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

Still, something is fishy here that you had to explicitly cast to string... Any way this function is a bit messy I think it should be refactored in the future such that it does not take response from the outer scope but it should expect a response name as part of the function arguments.

@DanSava DanSava dismissed their stale review March 14, 2022 09:34

Ups did not want to approve just wanted to finish the review

@frode-aarstad frode-aarstad force-pushed the sort-parmas branch 8 times, most recently from 1a356a1 to eca2ef3 Compare March 15, 2022 12:46
Copy link
Collaborator

@DanSava DanSava left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@frode-aarstad frode-aarstad merged commit 80e7a58 into equinor:main Mar 15, 2022
@frode-aarstad frode-aarstad deleted the sort-parmas branch March 15, 2022 13:29
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.

Sort selection lists
2 participants