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

visualising inout dependencies #181

Open
feefladder opened this issue Mar 25, 2021 · 2 comments · May be fixed by #186
Open

visualising inout dependencies #181

feefladder opened this issue Mar 25, 2021 · 2 comments · May be fixed by #186

Comments

@feefladder
Copy link
Contributor

I feel a bit guilty that #164 was initially about visualizing inout variables, but that has not been properly addressed in the following discussion or PRs. Furthermore, the checking algorithm works, but may be a bit aggressive. The user still does not really have a good way to see all relationships, such as seeming cycles as @jvail initially intendet. Therefore, the following proposal for two different options in the visualisation:

  1. the initial proposal by @jvail. Add dotted arrows from the last inout process to all first in processes for all variables. as an option in visualise model.visualize(cycle_arrows=True) e.g.:
in->inout->inout->in
 ^            /
  \- dotted -/
  1. add color enhancement for a single variable. Possibly as an enhancement of show_only_variable or separate model.visualize(show_variable_stages='p_name__var_name')
    green?        red?
 /---------\  /-----------\    red?        green?
in->other->inout->other->inout------>inout------->in
^           \            ^           /
 \    green? \--->in----/ green?    /
  \- - - - - - - - - - - - - - - - / dotted (as in 1.)

This would make it clear for the user if processes are updated or not before they are used.

Both require a similar algorithm to work, but 2 is quite more complex to implement.

feefladder pushed a commit to feefladder/xarray-simlab that referenced this issue Mar 27, 2021
@feefladder feefladder mentioned this issue Mar 27, 2021
3 tasks
@feefladder
Copy link
Contributor Author

#184 will not address 2. I think that it will help users in debugging custom dependencies however, what are your thoughts on that?

@feefladder feefladder linked a pull request Mar 27, 2021 that will close this issue
4 tasks
@feefladder
Copy link
Contributor Author

feefladder commented Mar 28, 2021

added an example notebook for why 2. is useful. For example when a user does not understand the error messages of strict_check, they can still visualize the graph with the different stages of that variable.

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 a pull request may close this issue.

1 participant