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-13600: Add YAML formatter #16

Merged
merged 3 commits into from Feb 21, 2018
Merged

DM-13600: Add YAML formatter #16

merged 3 commits into from Feb 21, 2018

Conversation

timj
Copy link
Member

@timj timj commented Feb 20, 2018

Add a basic YAML formatter and update test config and tests to ensure that YAML, JSON and Pickle are tested.

Object to coerce to expected type.
storageClass : `StorageClass`
StorageClass associated with `inMemoryDataset`.
pytype : `class`, optional
Copy link
Member

Choose a reason for hiding this comment

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

class -> type?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok. I'm a bit unclear as to what we really want there so I'll switch it.

-------
data : `object`
Either data as Python object read from YAML file, or None
if the file could not be opened.
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit surprised that we don't raise an exception when we can't find the file. Is this the pattern for all formatters?

Copy link
Member Author

Choose a reason for hiding this comment

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

It made FileFormatter.read() a little less convoluted and finding the file was the only thing that mattered. I think this code will have to be rejiggered when we start using templates for file names so I'll have another look at that time. @pschella didn't like including the component name in the filename (I think he preferred it to be under the control of the template) so this will change.

@timj timj merged commit d32b45a into master Feb 21, 2018
@ktlim ktlim deleted the tickets/DM-13600 branch August 25, 2018 06:49
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