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-25692: Add gen3 formatter for Filter #268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some issues with the type handling in the new code (there's a mix of generic and highly type-specific references to the filter), but nothing that should require re-review.
|
||
Raises | ||
------ | ||
Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be more specific. We shouldn't be encouraging people to catch Exception
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the general sense of any formatter, we have no real idea what exceptions could be raised. It doesn't really matter either because all formatter exceptions are caught by datastore.
|
||
Parameters | ||
---------- | ||
inMemoryDataset : `object` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit contradictory, and I'm not sure what to do about it. On the one hand, formal type safety requires that this be an object of any type. On the other hand, the method body explicitly assumes that inMemoryDataset
is a Filter
, and will raise an AttributeError
(convert to TypeError
?) for any other type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't yet developed a convention for someone configuring their datastore such that the wrong python type turns up in the formatter.
Thanks. Sorry about all the docstring problems. I copied them from YamlFormatter and forgot to update them. |
This allows an Exposure to be disassembled and assembled without relying on adding something to metadata.
This allows an Exposure to be disassembled and assembled without
relying on adding something to metadata.