-
Notifications
You must be signed in to change notification settings - Fork 556
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 support for 'language' field in scraped recipes #144
Conversation
Ideas:
|
Regarding multi-valued languages:
It seems to make sense to only retrieve a single result; we can handle this by comma-splitting the meta tag's value. There are a few Python-based libraries for BCP 47 and/or country code validation. I'm still weighing up whether it makes sense to use one of those, since it would add another dependency. Reliable-quality data is generally good. |
marrow/bcp47#1 provides an excellent list of Python libraries available for BCP47 validation. Based on that list,
Edit: link fixup |
return decorated(self, *args, **kwargs) | ||
|
||
try: | ||
value = function(*args, **kwargs) |
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.
nice!
Very nice PR! Absolutely no comments codewise. I invited you to be a collaborator on the repository and you are most welcomed to merge it on your own 😉 Thank you for the detailed information gathered! As a side:
However, these days I'm not using my package actively and I trust your judgement on the upper two points more! |
Thank you @hhursev, that's very kind, and I've accepted the invitation. I'll consider the meta and BCP-47 questions for a little longer before making decisions on them, and will merge the pull request once those are resolved. |
This is a good concern, and I've decided to make this disabled-by-default (so that my use case is handled, but considering it a rare one).
I'm planning to keep this for now; from experience, although data cleanup is always required, it can be really pleasant to know that a library is already enforcing a schema for the data it produces. I'm going to spend a little more time considering the |
In the end it seemed safest to leave the existing |
Resolves #143