-
Notifications
You must be signed in to change notification settings - Fork 41
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
Xbar-W reader writer options processing re-work #488
base: main
Are you sure you want to change the base?
Conversation
…wxbar_config_rework
…rior to wheel spinning
…xhat-w reader/writer.
…wxbar_config_rework
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 good. I have a question and a nit, but I'm okay to merge it now.
@@ -958,32 +958,12 @@ def tracking_args(self): | |||
domain=int, | |||
default=0) | |||
|
|||
|
|||
def wxbar_read_write_args(self): |
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.
Is this idea that this method would eventually go away so that generic_cylinders
or any other clients directly call the add_options_to_config
on the module?
assert 'cfg' in ph.options | ||
self.cfg = ph.options['cfg'] | ||
if self.cfg.get("W_and_xbar_reader") is None or not self.cfg.W_and_xbar_reader: | ||
self.not_active = True |
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.
Since this is new code, I'll just say I don't like negative bool
s (i.e., the flag should be called active
).
Not a reason to hold up this PR.
Intended as an exemplar for improving options processing and reading in mpisppy.
Objective is to move options definition and processing into "leaf" classes, to improve encapsulation.
This PR only does this for XBar-W reader/writer extensions, as a concise place to start.
Also actually makes use of these extensions in generic_cylinders.py - previously the options were specified, but never used.