-
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
jsonschema: pumped up references #1279
Conversation
"type": "array", | ||
"title": "Document type" | ||
}, | ||
"urls": { |
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.
999C5u
We are missing
We have extra fields with no MARC counterpart: |
We are missing
We added back
We have extra fields with no MARC counterpart: |
cc @annetteholtkamp Also I commented in this issue how the fields are ported from the old data model to the current one. |
|
||
|
||
RE_VALID_PUBNOTE = re.compile(".*,.*,.*(,.*)?") | ||
RE_VALID_PUBNOTE = re.compile(r'.*,.*,.*(,.*)?') | ||
RE_VALID_ARXIV_REP_NO = re.compile(r'(arxiv:)?\d{4}.\d{4,5}|\w+-\w+/\d+|\w+/\d+r') |
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.
Wow I am surprised. Where have you taken these?
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.
They were in the hep
schema. For the report number I just saw that there are a lot of arXiv
prepended report numbers.
16000bb
to
be527f4
Compare
texkey = force_single_element(value.get('1')) | ||
|
||
# Publication info specific. | ||
cnum = force_single_element(value.get('b')) |
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.
CNUM have a regexp to check them C\d\d-\d\d-\d\d(\.\d+)?
(I think)
bbeefa6
to
c2cd40d
Compare
BTW as part of your or branch drop the WIP from my commit :) |
c2cd40d
to
357d191
Compare
Signed-off-by: Mihai Bivol <mm.bivol@gmail.com>
Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
* Adds rules for builidng the new reference schema. Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
35b396a
to
9cccf7f
Compare
9cccf7f
to
d5ee489
Compare
{% endif %} | ||
{% if reference['isbn'] %} | ||
<span class="reference-detail">{{ reference['isbn'] }}</span> | ||
{% if reference['misc'] %} |
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.
Better to use dotted notation consistently?
Just went through it and did not see anything to change at first sight 👍 |
}, | ||
"serialization": { | ||
"type": "string", | ||
"description": "E.g. refextract, text, JATS, Elsevier, BibTeX..." |
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 understand what a serialization is ._.
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.
Maybe we should call it source
as in other parts of the schema?
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.
cc @kaplun
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.
Elsevier references come directly in a json format, while others come in text. I think the examples are not particularly good. We could actually have both source and format (text
, json
, bibtex
, xml
)
Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
* Uses reference macros for Reference datatables. * Fixes small error in `title` field handling for references. * Adds prepend_text optinal param for publication_info macro. Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
* Stands as an example for changing a schema using builders. Signed-off-by: Mihai Bivol <mihai.bivol@cern.ch>
d5ee489
to
4404af9
Compare
'e': [a.get('full_name') for a in value.get('authors', []) | ||
if a.get('role') == 'ed.'], | ||
'h': [a.get('full_name') for a in value.get('authors', []) | ||
if a.get('role') != 'ed.'], |
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'm almost tempted to add a condition
lambda to get_value
: )
LGTM 🚢 |
Provide a
hep
-like reference field insidehep
referencesCloses #430
hep
)dojson
to work with this new schemaAmendMoved to next bullethepcrawl
to work with this new schemaAmend holdingpen to save this new schemaRefs not use in holdingpenCreate follow-up issue for merging good ideas into thehep
schemaFollow-up + extra findings
dois
isbns
fields inhep
schema RFC: isbns and dois in Literature schema #1349