Commit e529078f authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update deploy.py to add protection, add more harverster defintion.

parent a5829fba
......@@ -31,6 +31,7 @@
"fazia","articles","inspirehep.net","find cn fazia and tc p and not tc c",
"fcc","articles","inspirehep.net","find fcc and tc p and not tc c",
"fermi-lat","articles","inspirehep.net","find cn fermi-lat and tc p and not tc c",
"fopi","articles","inspirehep.net","find cn fopi and tc p and not tc c",
"gaspard","articles","inspirehep.net","find cn gaspard and tc p and not tc c",
"graal","articles","inspirehep.net","find cn graal and tc p and not tc c",
"hades","articles","inspirehep.net","find cn hades and tc p and not tc c",
......@@ -93,6 +94,7 @@
"fazia","proceedings","inspirehep.net","find cn fazia and tc c",
"fcc","proceedings","inspirehep.net","find fcc and tc c",
"fermi-lat","proceedings","inspirehep.net","find cn fermi-lat and tc c",
"fopi","proceedings","inspirehep.net","find cn fopi and tc c",
"gaspard","proceedings","inspirehep.net","find cn gaspard and tc c",
"graal","proceedings","inspirehep.net","find cn graal and tc c",
"hades","proceedings","inspirehep.net","find cn hades and tc c",
......
......@@ -146,6 +146,26 @@ def create_harvesters(opt, dfi, dfh):
if rep != "y":
return
# ........................................................................
#
# check that all collaborations are defined
#
missings = []
for elt in dfi.collaboration:
if len(elt) == 0:
continue
if dfh[dfh.collaboration == elt].empty:
missings.append(elt)
if len(missings) > 0:
print "\n\tPlease define the collaborations in data/harvesters.csv:"
for elt in missings:
print "\t\t", elt
print
sys.exit(1)
# ........................................................................
#
# destroy existing harvester
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment