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

references: first commits #1330

Merged
merged 3 commits into from
Jul 15, 2016
Merged

Conversation

mihaibivol
Copy link
Contributor

  • Adds inspirehep.references module
  • Moves some references utils here
  • Moves utils from dojson to inspirehep.utils
    • So we can have 'dojson imports modules which import inspirehep utils' and not the other way around since we're going to use this module both in workflows and dojson.
  • Adds a non-pythonic non-dict-inheriting non-regex-rule-implementing class that builds jsons by calling methods.
    • Did this so we can transform anything into this json with simple calls rather than fancy transformers

@mihaibivol
Copy link
Contributor Author

We'll use this in #1279 instead of the hardcoded dojson thing and also for moving holdingpen records into hep records without breaking the whole holdingpen :)

@eamonnmag
Copy link
Contributor

I love this :)

@mihaibivol
Copy link
Contributor Author

@jacquerie @kaplun



def _is_arxiv(obj):
arxiv_test = obj.split()
Copy link
Contributor

Choose a reason for hiding this comment

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

What is obj in this context? What does this line do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add a comment. idutils does not parse arXiv:2905.0001 [hep-th] but only the first part. At least in references we have lots of strings including the category ([hep-th]) so I am stripping that out so I can move forward with #1279

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most likely I still have some errors / corner cases in this logic that I will find when indexing a production dump.

# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

"""Helpers for handling pubnote parsing."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the 'basic' questions, but what is a pubnote?

Copy link
Contributor

Choose a reason for hiding this comment

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

A pubnote is the ,-concatenation of: short journal title, volume, page(s).

Copy link
Contributor

Choose a reason for hiding this comment

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

@mihaibivol mihaibivol force-pushed the refs-module branch 2 times, most recently from 942f1cf to 8875a8b Compare July 15, 2016 09:13
Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
* Moves references view logic into own module

Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
* Adds class for building references given simple fields and
  correctly clean unique identifers for references

Note:
  This is not used yet since the PR would be too big

Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
@jacquerie jacquerie changed the title References module global: references module Jul 15, 2016
@jacquerie jacquerie changed the title global: references module references: first commit Jul 15, 2016
@jacquerie jacquerie changed the title references: first commit references: first commits Jul 15, 2016
@jacquerie jacquerie merged commit 64b5804 into inspirehep:master Jul 15, 2016
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.

None yet

5 participants