-
Notifications
You must be signed in to change notification settings - Fork 18
Arbitrary block variable #61
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
Conversation
nakul680
commented
Jul 16, 2025
- Allows user to add an arbitrary block variable , which will be printed in block along with available variables.
- Arbitrary variables are stored in a dict which users can add to or remove from or even clear completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition, please adjust the docstrings and check the autoapi!
Also please make sure that you are consistent with the other input methods in the input class: https://github.com/faccts/opi/blob/main/src/opi/input/core.py
So please use always the plural version and add the has and get methods
Here, I am also dismissing my review because I will be on vacation. Otherwise I can review once I am back
|
@nakul680 please also update the number of the example and 'update branch' before the next review |
haneug
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks already nice I have some small comments
src/opi/input/blocks/util.py
Outdated
| Raises | ||
| ------- | ||
| AttributeError | ||
| If normalization is not possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this exception can be raised by this method?
|
@nakul680 |
|
I added a test for the new example and restored the deleted files in example045 since these are required for this special example! |