-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add attribution info to metadata, if available #2
Add attribution info to metadata, if available #2
Conversation
I needed this for my use case. Take or leave it :) |
2599c9c
to
8b106c5
Compare
Example:
|
"files": files} | ||
|
||
if attribution != None: | ||
ret["attribution"] = attribution | ||
|
||
return ret |
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.
I have a slight preference for the parser including every field, even if it's None
. It's a signal that the parser looked but didn't find it, whereas a new field would be omitted entirely by an older parser.
"files": files} | |
if attribution != None: | |
ret["attribution"] = attribution | |
return ret | |
"files": files, | |
"attribution": attribution} | |
return ret |
if self.attribution != None: | ||
ret["attribution"] = self.attribution |
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.
same comment as above, I'd prefer "attribution"
be included even when None
. stripping empty values at the CLI could be an option but the model shouldn't omit them.
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.
I don't mind either way is fine by me.
Looks great, thanks for the pull request! I'm happy to add this functionality. If you'd prefer I can merge this as-is and make those changes, just let me know. |
Just merge and make the edits you want to :) |
Thanks again for the contribution! |
No description provided.