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

Xbar-W reader writer options processing re-work #488

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

jeanpaulwatson
Copy link
Collaborator

@jeanpaulwatson jeanpaulwatson commented Feb 7, 2025

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.

Copy link
Collaborator

@bknueven bknueven left a 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):
Copy link
Collaborator

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
Copy link
Collaborator

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 bools (i.e., the flag should be called active).

Not a reason to hold up this PR.

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 this pull request may close these issues.

3 participants