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
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
limbra
limbra
Commits
1d5db947
Commit
1d5db947
authored
Apr 27, 2016
by
LE GAC Renaud
Browse files
Update the logic to check conference_dates.
parent
adb42593
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
+17
-6
controllers/harvest.py
controllers/harvest.py
+1
-1
modules/harvest_tools/checkandfix.py
modules/harvest_tools/checkandfix.py
+14
-3
modules/harvest_tools/proceedings.py
modules/harvest_tools/proceedings.py
+1
-1
modules/harvest_tools/talks.py
modules/harvest_tools/talks.py
+1
-1
No files found.
controllers/harvest.py
View file @
1d5db947
...
...
@@ -216,7 +216,7 @@ def edit_insert():
try
:
check
.
country
(
record
)
check
.
conference_date
(
record
)
check
.
conference_date
(
record
,
selector
.
host
)
except
CheckException
:
pass
...
...
modules/harvest_tools/checkandfix.py
View file @
1d5db947
...
...
@@ -395,11 +395,13 @@ class CheckAndFix(object):
except
ToolException
as
e
:
raise
CheckException
(
*
e
.
args
)
def
conference_date
(
self
,
record
):
def
conference_date
(
self
,
record
,
host
):
"""Check conference date.
Args:
record (RecordConf): record describing a talk or a proceeding.
host (str): possible values ares ``cds.cern.ch``
or ``inspirehep.net``
Raises:
CheckException: when dates are not found or not well formed.
...
...
@@ -409,11 +411,20 @@ class CheckAndFix(object):
if
not
isinstance
(
record
,
RecordConf
):
return
# check and fix conference date
# inspirehep.net
if
host
==
"inspirehep.net"
:
value
=
record
.
conference_dates
()
if
len
(
value
)
==
0
:
raise
CheckException
(
MSG_NO_CONF_DATE
)
return
# cds.cern.ch
if
not
(
u
"111"
in
record
and
"d"
in
record
[
u
"111"
]):
raise
CheckException
(
MSG_NO_CONF_DATE
)
raise
CheckException
(
MSG_NO_CONF_DATE
)
value
=
record
[
u
"111"
][
"d"
]
m
=
REG_CONF_DATES
.
match
(
value
)
if
not
m
:
...
...
modules/harvest_tools/proceedings.py
View file @
1d5db947
...
...
@@ -35,7 +35,7 @@ class Proceedings(Automaton):
try
:
self
.
check
.
is_conference
(
record
)
self
.
check
.
country
(
record
)
self
.
check
.
conference_date
(
record
)
self
.
check
.
conference_date
(
record
,
self
.
harvester
.
host
)
self
.
check
.
clean_erratum
(
record
)
self
.
check
.
submitted
(
record
)
...
...
modules/harvest_tools/talks.py
View file @
1d5db947
...
...
@@ -35,7 +35,7 @@ class Talks(Automaton):
try
:
self
.
check
.
is_conference
(
record
)
self
.
check
.
country
(
record
)
self
.
check
.
conference_date
(
record
)
self
.
check
.
conference_date
(
record
,
self
.
harvester
.
host
)
self
.
check
.
submitted
(
record
)
self
.
check
.
year
(
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