Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 3fe0d5c1 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Remove the debug argument for Automaton and CheckAndFix.

parent 4aac44ff
......@@ -65,8 +65,7 @@ def free_run():
selector.id_categories,
year_start=selector.year_start,
year_end=selector.year_end,
dry_run=(selector.mode == MODE_DRY_RUN),
debug=False)
dry_run=(selector.mode == MODE_DRY_RUN))
if not tool:
return inline_alert(T("Error"), T("Select an harvester."))
......@@ -310,8 +309,7 @@ def insert_recjson():
selector.id_categories,
year_start=selector.year_start,
year_end=selector.year_end,
dry_run=(selector.mode == MODE_DRY_RUN),
debug=False)
dry_run=(selector.mode == MODE_DRY_RUN))
if not tool:
return inline_alert(T("Error"), T("Select an harvester."))
......@@ -381,8 +379,7 @@ def run():
row.harvesters.id_categories,
year_start=selector.year_start,
year_end=selector.year_end,
dry_run=(selector.mode == MODE_DRY_RUN),
debug=False)
dry_run=(selector.mode == MODE_DRY_RUN))
if not tool:
return inline_alert(T("Error"), T("Select an harvester."))
......@@ -447,8 +444,7 @@ def run_all():
harvester.id_categories,
year_start=selector.year_start,
year_end=selector.year_end,
dry_run=(selector.mode == MODE_DRY_RUN),
debug=False)
dry_run=(selector.mode == MODE_DRY_RUN))
if not tool:
return inline_alert(T("Error"), T("Select an harvester."))
......
......@@ -104,9 +104,6 @@ class Automaton(object):
dry_run (bool):
new records are not inserted in the database when ``True``.
debug (bool):
activate the verbose mode when ``True``.
Raises:
ToolException:
* team or project or the publication category not defined
......@@ -120,8 +117,7 @@ class Automaton(object):
id_category,
year_start=None,
year_end=None,
dry_run=True,
debug=False):
dry_run=True):
# protection team, project and/or category have to be defined
if not id_team:
......@@ -133,11 +129,10 @@ class Automaton(object):
if not id_category:
raise ToolException(MSG_NO_CAT)
self.check = CheckAndFix(debug)
self.check = CheckAndFix()
self.collection_logs = []
self.controller = automaton
self.db = db
self.dbg = debug
self.dry_run = dry_run
self.id_category = id_category
self.id_team = id_team
......
......@@ -78,15 +78,10 @@ UNIVERSITY = "University"
class CheckAndFix(object):
"""A collection of tools to check and repair the content of record.
Args:
debug (bool):
activate the debug mode.
"""
def __init__(self, debug=False):
def __init__(self):
self.db = current.db
self.dbg = debug
self.logger = logging.getLogger("web2py.app.limbra")
self.reg_institute = self._get_reg_institute()
......
......@@ -17,8 +17,7 @@ def build_harvester_tool(db,
id_category,
year_start=None,
year_end=None,
dry_run=True,
debug=False):
dry_run=True):
"""
Harvest tool factory function.
......@@ -49,9 +48,6 @@ def build_harvester_tool(db,
dry_run (bool):
new records are not inserted in the database when ``True``.
debug (bool):
activate the verbose mode.
Returns:
Automaton:
* the appropriate harvester automaton.
......@@ -69,8 +65,7 @@ def build_harvester_tool(db,
id_category,
year_start,
year_end,
dry_run,
debug)
dry_run)
def get_harvester_tool(automaton):
......
......@@ -22,8 +22,7 @@ def svc():
"article",
get_id(db.categories, code="ACL"),
year_start=current.request.now.year,
dry_run=True,
debug=True)
dry_run=True)
def test__is_record_in_db_09001(svc):
......@@ -85,7 +84,6 @@ def test_process_recid_09002(svc):
assert len(recids) > 0
# try with the oldest one
svc.dbg = True
recid = recids[-1]
assert svc.process_recid(recid) is None
......@@ -111,7 +109,6 @@ def test_process_collection_09003(svc):
svc.store = InvenioStore()
# do it
svc.dbg = True
assert svc.process_collection("LHCb Papers") is None
# reset
......@@ -123,11 +120,9 @@ def test_process_collection_09003(svc):
def test_process_url_cds_09004(svc):
svc.dbg = True
assert svc.process_url("cds.cern.ch", "LHCb Papers") is None
def test_process_url_ins_09005(svc):
svc.dbg = True
assert svc.process_url(
"inspirehep.net", "find cn lhcb and tc p and not tc c") is None
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