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

No unit for global_expressions set, even if schema requires #662

Open
1 of 3 tasks
jnnr opened this issue Aug 15, 2024 · 2 comments
Open
1 of 3 tasks

No unit for global_expressions set, even if schema requires #662

jnnr opened this issue Aug 15, 2024 · 2 comments

Comments

@jnnr
Copy link
Contributor

jnnr commented Aug 15, 2024

What happened?

Just as variables do, global_expressions should state their unit. Among others, this makes life easier when post-processing results.

It seems like unit is required for both variables and global_expressions (https://github.com/calliope-project/calliope/blob/main/src/calliope/config/math_schema.yaml), but in base math, only the units of variables are specified.

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

Version

v0.7.0

Relevant log output

No response

@jnnr jnnr added the bug label Aug 15, 2024
@brynpickering
Copy link
Member

The schema doesn't require it, just provides the rules it must follow if it is defined. It's the same with "title" and "description". It's probably good practice for us to have them defined for all of our pre-defined math components, but I wouldn't require it for user-defined components since it's just metadata (the user can decide if they care to have it).

@jnnr
Copy link
Contributor Author

jnnr commented Aug 19, 2024

Thanks for clarifying! I agree, it is good practice. I can open a PR adding that metadata to our base math.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants