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

Have a single compute function register multiple variables #1171

Open
2 tasks done
unalmis opened this issue Aug 9, 2024 · 1 comment · Fixed by #1166
Open
2 tasks done

Have a single compute function register multiple variables #1171

unalmis opened this issue Aug 9, 2024 · 1 comment · Fixed by #1166
Assignees
Labels
good first issue Good for newcomers P1 Lowest Priority, will get to eventually

Comments

@unalmis
Copy link
Collaborator

unalmis commented Aug 9, 2024

Requested by @ddudt

Could be nice to generalize the register_compute_fun decorator for multiple names and multiple descriptions for compute functions that compute multiple stuff. My suggestion would be to check if name and description is a list and then loop through to register them in compute.utils/data_index.py.

Note that this would be a cosmetic change to remove duplicate code. We already ensure computation is not performed when something is already computed.

  • curvature1, curvature2
  • theta_B, zeta_B
@unalmis unalmis added good first issue Good for newcomers low priority Nice to have, but not needed right away labels Aug 9, 2024
@unalmis unalmis linked a pull request Aug 9, 2024 that will close this issue
3 tasks
@ddudt ddudt reopened this Aug 10, 2024
@ddudt
Copy link
Collaborator

ddudt commented Aug 10, 2024

This was not really resolved by #1166. We came up with a hack for the two cases that exist in the current code. Is that solution our plan going forward for all similar instances? Or do we still want to add special logic to handle this?

@dpanici dpanici added P1 Lowest Priority, will get to eventually and removed low priority Nice to have, but not needed right away labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers P1 Lowest Priority, will get to eventually
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants