Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
60be8e09
Commit
60be8e09
authored
Jan 12, 2021
by
LE GAC Renaud
Browse files
Update CheckAndFix.temporary_record to inhibit it for inspirehep.net
parent
1ba1fa16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
modules/harvest_tools/checkandfix.py
modules/harvest_tools/checkandfix.py
+7
-4
No files found.
modules/harvest_tools/checkandfix.py
View file @
60be8e09
...
...
@@ -1006,6 +1006,10 @@ class CheckAndFix(object):
def
temporary_record
(
self
,
record
):
"""Some records are marked temporary.
Note:
Always return False for record from inspirehep.net
since this information is not there anymore.
Args:
record (RecordPubli):
record describing a publication.
...
...
@@ -1024,11 +1028,10 @@ class CheckAndFix(object):
# or the corresponding JSON field (old.inspirehep.net)
# http://inspirehep.net/comment="*Temporary record*"
#
# for the new inspirehep API curated is False
# for the new inspirehep API curated is False can be used
# however this is too large compare previous method
#
is_temporary
=
\
(
"comment"
in
record
and
record
[
"comment"
]
==
TMP_REC
)
\
or
(
"curated"
in
record
and
record
[
"curated"
]
is
False
)
is_temporary
=
"comment"
in
record
and
record
[
"comment"
]
==
TMP_REC
if
is_temporary
:
raise
CheckException
(
MSG_TEMPORARY_RECORD
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment