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

DM-27941 Update import system #165

Merged
merged 1 commit into from Dec 17, 2020
Merged

DM-27941 Update import system #165

merged 1 commit into from Dec 17, 2020

Conversation

natelust
Copy link
Contributor

Change the name of the directive to import. Instruments are now
imported, and only one instrument may be defined among the
importing Pipeline, and all the imports.

Copy link
Contributor

@czwa czwa left a comment

Choose a reason for hiding this comment

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

Fine other than the missing newline and the request for one more unit test.
More documentation on pipeline yaml syntax would be helpful, even if just a louder note that each section corresponds to a pipelineIR.py "sectionIR" which describes the allowable keys.

""")
pipeline = PipelineIR.from_string(pipeline_str)
self.assertEqual(pipeline.instrument, "new.instrument")

Copy link
Contributor

Choose a reason for hiding this comment

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

See comment above.

if self.instrument is None:
self.instrument = tmp_IR.instrument
elif self.instrument != tmp_IR.instrument and tmp_IR.instrument is not None:
raise ValueError("Only one instrument can be declared in a pipeline or it's imports")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can a unit test be added that exercises this "only one instrument" case?

Change the name of the directive to import. Instruments are now
imported, and only one instrument may be defined among the
importing Pipeline, and all the imports.
@natelust natelust merged commit 647f735 into master Dec 17, 2020
@timj timj deleted the tickets/DM-27941 branch April 13, 2022 22:20
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.

None yet

2 participants