-
Notifications
You must be signed in to change notification settings - Fork 69
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
hal: use inspire-utils to parse names #2992
hal: use inspire-utils to parse names #2992
Conversation
The record that doesn't pass validation in https://travis-ci.org/inspirehep/inspire-next/jobs/307298427 is because of inspirehep/inspire-schemas#280. |
And all the failing tests in https://travis-ci.org/inspirehep/inspire-next/jobs/307298424 might be because of the same reason, as |
@@ -72,7 +75,8 @@ def test_set_schema_builds_a_full_url_for_the_schema(): | |||
|
|||
data = {'$schema': 'hep.json'} | |||
extra_data = {} | |||
assert validate(data['$schema'], subschema) is None | |||
with pytest.raises(ValidationError): | |||
validate(data['$schema'], subschema) is None |
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 notable: inspire-dojson
puts something invalid there, and set_schema
makes it valid. This is the only exception to the usual task invariant (valid in, valid out).
As currently the Authors schema can't correctly express a Twitter profile link we remove this field so that it won't cause a validation error during migration of the demo records. This commit should be reverted when inspirehep/inspire-schemas#182 is merged. Signed-off-by: Jacopo Notarstefano <[email protected]>
Signed-off-by: Jacopo Notarstefano <[email protected]>
Signed-off-by: Jacopo Notarstefano <[email protected]>
Related issues:
Addresses #2273, supersedes #2990.
Checklist:
RFC
and look for it).