Skip to content

Updated to allow config and app (and eventually the ros version) - #107

Open
schmerl wants to merge 1 commit into
masterfrom
issue104
Open

Updated to allow config and app (and eventually the ros version)#107
schmerl wants to merge 1 commit into
masterfrom
issue104

Conversation

@schmerl

@schmerl schmerl commented Sep 18, 2020

Copy link
Copy Markdown
Collaborator

Fix for #104

Comment thread src/rosdiscover/cli.py
@@ -26,7 +26,7 @@ def _launch(config: Config) -> SystemSummary:
) as interpreter:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could improve this by replacing Interpreter.for_image with Interpreter.for_config. (Alternatively, we could be more OO-friendly by adding an interpreter() method to Config, that produces an interpreter for a given configuration.)

Comment thread src/rosdiscover/cli.py
for fn_launch in config.launches:
logger.info(f"simulating launch [{fn_launch}]")
interpreter.launch(fn_launch)
interpreter.launch(fn_launch, config)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we make the changes above, we wouldn't need to pass config here.

remappings=remappings,
args=args)
args=args,
config=configuration)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could drop the config parameter if configuration becomes a property of Interpreter.

namespace: str,
launch_filename: str,
remappings: Dict[str, str],
config: Config,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

remappings=remappings,
args='')
args='',
config=config)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

remappings: Dict[str, str],
args: str
args: str,
config: Config

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

launch_filename=launch_filename,
remappings=remappings)
remappings=remappings,
config=config)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

remappings=remappings,
manager=mgr)
manager=mgr,
config=config)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

@ChrisTimperley ChrisTimperley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but there's a couple of places where we can clean up pre-existing design limitations to improve quality generally.

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.

2 participants