Skip to content

Conversation

@schmerl
Copy link
Collaborator

@schmerl schmerl commented Sep 18, 2020

Fix for #104

with Interpreter.for_image(config.image,
config.sources,
environment=config.environment
) as interpreter:
Copy link
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.)

for fn_launch in config.launches:
logger.info(f"simulating launch [{fn_launch}]")
interpreter.launch(fn_launch)
interpreter.launch(fn_launch, config)
Copy link
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
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
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
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
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
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
Member

Choose a reason for hiding this comment

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

See above

Copy link
Member

@ChrisTimperley ChrisTimperley left a comment

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.

3 participants