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

utils: add get_number_of_author_matches helper #12

Merged

Conversation

chris-asl
Copy link
Contributor

@chris-asl chris-asl commented Oct 10, 2017

  • Adds a helper util method for getting the number of author matches
    given two hep-schema compliant author JSON object lists.

Signed-off-by: Chris Aslanoglou [email protected]


The build is going to fail for now. An update of inspire-json-merger is expected, to fix a unicode related issue.

@ammirate ammirate self-requested a review October 10, 2017 16:29
@ammirate ammirate requested a review from jacquerie October 10, 2017 16:29
@ammirate
Copy link
Contributor

looks good to me for the requirements we got 👍

@jacquerie
Copy link
Contributor

https://travis-ci.org/inspirehep/inspire-matcher/jobs/286113042#L725 is the canonical Unicode error: now you should know how to fix that : )

Copy link
Contributor

@ammirate ammirate left a comment

Choose a reason for hiding this comment

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

Ready to be merged!

@chris-asl chris-asl force-pushed the add-util-get-number-of-author-matches branch from a13315a to 0df5e09 Compare October 12, 2017 13:15
@jacquerie jacquerie force-pushed the add-util-get-number-of-author-matches branch from 0df5e09 to 07b0037 Compare October 27, 2017 20:39
Adds a helper method for getting the number of author matches
between two schema-compliant author lists.

Sem-Ver: adds new feature
Signed-off-by: Chris Aslanoglou <[email protected]>
@jacquerie jacquerie force-pushed the add-util-get-number-of-author-matches branch from 07b0037 to 038efaa Compare October 27, 2017 20:45
from inspire_matcher.utils import get_number_of_author_matches


def test_get_number_of_author_matches():
Copy link
Contributor

Choose a reason for hiding this comment

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

I simplified these tests as we are not really interested in testing here all the features that the AuthorComparator offers; these should be tested inside of inspire-json-merger (as you did in inspirehep/inspire-json-merger#27).

Bonus points if you get the inside joke : )

@jacquerie jacquerie merged commit fc57a89 into inspirehep:master Oct 27, 2017
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.

3 participants