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

feat: add pipeline Yaml marshaller #6137

Merged
merged 3 commits into from
Oct 23, 2023
Merged

feat: add pipeline Yaml marshaller #6137

merged 3 commits into from
Oct 23, 2023

Conversation

masci
Copy link
Contributor

@masci masci commented Oct 20, 2023

Related Issues

Proposed Changes:

We add the following methods to the Pipeline class:

  • dumps to return its string representation
  • dump to write its string representation to a file-like object passed to the method
  • loads to return a Pipeline instance from its string representation
  • load to return a Pipeline instance reading its string representation from a file-like object

All the methods can be invoked passing a Marshaller object that will determine what's the string representation format, defaulting to Yaml (the only format available at the moment).

How did you test it?

Unit tests covering the default marshaller.

Notes for the reviewer

Checklist

@masci masci requested a review from a team as a code owner October 20, 2023 13:00
@masci masci requested review from silvanocerza and removed request for a team October 20, 2023 13:00
@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Oct 20, 2023
@masci masci requested a review from a team as a code owner October 20, 2023 13:07
@masci masci requested review from dfokina and removed request for a team October 20, 2023 13:07
@vblagoje
Copy link
Member

@masci I also liked this approach. I can't think of a better fit for use of Protocol(s) than (un)marshalling.

@masci masci merged commit dd24210 into main Oct 23, 2023
@masci masci deleted the massi/yaml branch October 23, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load/Dump pipelines in Yaml format
3 participants