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

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

Rename the class PublicationsTool to Automaton.

parent 7c9997ac
......@@ -6,10 +6,10 @@ import traceback
from gluon import current
from gluon.restricted import RestrictedError
from harvest_tools import (format_author_fr,
family_name_fr,
from harvest_tools import (Automaton,
build_harvester_tool,
PublicationsTool,
format_author_fr,
family_name_fr,
ToolException)
from invenio_tools import (CheckAndFix,
CheckException,
......@@ -124,15 +124,15 @@ def edit_insert():
values = {}
check = CheckAndFix()
# NOTE: the publication tool is only require to extract
# the list of my authors
tool = PublicationsTool(db,
selector.id_teams,
selector.id_projects,
selector.controller,
selector.id_categories,
dry_run=True,
debug=False)
# NOTE
# publication tool is only require to extract the list of my authors
tool = Automaton(db,
selector.id_teams,
selector.id_projects,
selector.controller,
selector.id_categories,
dry_run=True,
debug=False)
# title, preprint, URL, report number
values['PublicationsTitle'] = record.title()
......@@ -387,4 +387,4 @@ def run_all():
return dict(collection_logs=collection_logs,
controller='all harvesters',
logs=logs,
selector=selector)
\ No newline at end of file
selector=selector)
......@@ -8,11 +8,11 @@ from base import (DRY_RUN,
format_author_fr,
ToolException)
from automaton import Automaton
from articles import Articles
from factory import build_harvester_tool, get_harvester_tool
from msg import Msg
from msgcollection import MsgCollection
from publicationstool import PublicationsTool
from articles import Articles
from notes import Notes
from preprints import Preprints
from proceedings import Proceedings
......
......@@ -5,9 +5,9 @@
import traceback
from automaton import Automaton
from base import family_name_fr, MSG_CRASH, MSG_FIX_ORIGIN, MSG_IN_DB, MSG_LOAD
from invenio_tools import CheckException
from publicationstool import PublicationsTool
from plugin_dbui import get_id, UNDEF_ID
......@@ -15,13 +15,13 @@ MSG_NO_EDITOR = "Reject article is not published"
MSG_TRANSFORM_PREPRINT = "Transform the preprint into an article"
class Articles(PublicationsTool):
class Articles(Automaton):
"""Publications tool for articles.
"""
def __init__(self, *args, **kwargs):
PublicationsTool.__init__(self, *args, **kwargs)
Automaton.__init__(self, *args, **kwargs)
# the preprint categories
self.id_preprint = get_id(self.db.categories, code="PRE")
......@@ -272,7 +272,7 @@ class Articles(PublicationsTool):
@rtype: bool
"""
if not PublicationsTool.select_record(self, record):
if not Automaton.select_record(self, record):
return False
if self.dbg:
......
# -*- coding: utf-8 -*-
""" harvest_tools.publicationstool
""" harvest_tools.automaton
"""
import re
......@@ -27,7 +27,7 @@ MSG_NO_OAI = "Reject no OAI identifier"
MSG_WELL_FORM_OAI = "Reject OAI is not well formed"
class PublicationsTool(object):
class Automaton(object):
"""Base class to search and process publications.
- Decode the parameter of a selector defining user criteria.
- Search for publications in the store, according to
......
......@@ -5,13 +5,13 @@
import traceback
from automaton import Automaton
from base import family_name_fr, MSG_CRASH, MSG_LOAD
from invenio_tools import CheckException
from publicationstool import PublicationsTool
from plugin_dbui import get_id, UNDEF_ID
class Notes(PublicationsTool):
class Notes(Automaton):
"""Publications tool for notes.
"""
......@@ -74,7 +74,7 @@ class Notes(PublicationsTool):
@rtype: bool
"""
if not PublicationsTool.select_record(self, record):
if not Automaton.select_record(self, record):
return False
if self.dbg:
......
......@@ -5,9 +5,9 @@
import traceback
from automaton import Automaton
from base import family_name_fr, MSG_CRASH, MSG_LOAD
from invenio_tools import CheckException, RecordConf, RecordThesis
from publicationstool import PublicationsTool
from plugin_dbui import UNDEF_ID
......@@ -17,7 +17,7 @@ MSG_PREPRINT_IS_THESIS = "Reject preprint is a thesis"
MSG_PREPRINT_NO_NUMBER = "Reject no preprint number"
class Preprints(PublicationsTool):
class Preprints(Automaton):
"""Publications tool for preprints.
"""
......@@ -86,7 +86,7 @@ class Preprints(PublicationsTool):
@param record:
"""
if not PublicationsTool.select_record(self, record):
if not Automaton.select_record(self, record):
return False
if self.dbg:
......
......@@ -5,13 +5,13 @@
import traceback
from automaton import Automaton
from base import family_name_fr, MSG_CRASH, MSG_LOAD
from invenio_tools import CheckException
from publicationstool import PublicationsTool
from plugin_dbui import get_id, UNDEF_ID
class Proceedings(PublicationsTool):
class Proceedings(Automaton):
"""Publications tool for conference proceedings.
"""
......@@ -118,7 +118,7 @@ class Proceedings(PublicationsTool):
@rtype: bool
"""
if not PublicationsTool.select_record(self, record):
if not Automaton.select_record(self, record):
return False
if self.dbg:
......
......@@ -5,16 +5,16 @@
import traceback
from automaton import Automaton
from base import family_name_fr, MSG_CRASH, MSG_LOAD
from invenio_tools import CheckException
from publicationstool import PublicationsTool
from plugin_dbui import get_id, UNDEF_ID, UNKNOWN
MSG_REPORT_NO_NUMBER = "Reject no report number"
class Reports(PublicationsTool):
class Reports(Automaton):
"""Publications tool for reports to committee.
"""
......@@ -93,7 +93,7 @@ class Reports(PublicationsTool):
@param record:
"""
if not PublicationsTool.select_record(self, record):
if not Automaton.select_record(self, record):
return False
if self.dbg:
......
......@@ -5,13 +5,13 @@
import traceback
from automaton import Automaton
from base import family_name_fr, MSG_CRASH, MSG_LOAD
from invenio_tools import CheckException
from publicationstool import PublicationsTool
from plugin_dbui import get_id, UNDEF_ID
class Talks(PublicationsTool):
class Talks(Automaton):
"""Publications tool for conference talks.
"""
......@@ -86,7 +86,7 @@ class Talks(PublicationsTool):
@rtype: bool
"""
if not PublicationsTool.select_record(self, record):
if not Automaton.select_record(self, record):
return False
if self.dbg:
......
......@@ -6,16 +6,16 @@ import re
import traceback
from automaton import Automaton
from base import family_name_fr, MSG_CRASH, MSG_LOAD
from invenio_tools import CheckException, RecordThesis
from publicationstool import PublicationsTool
from plugin_dbui import get_id, UNDEF_ID
MSG_NO_THESIS = "Reject not a thesis record"
class Thesis(PublicationsTool):
class Thesis(Automaton):
"""Publications tool for thesis.
"""
......@@ -84,7 +84,7 @@ class Thesis(PublicationsTool):
@param record:
"""
if not PublicationsTool.select_record(self, record):
if not Automaton.select_record(self, record):
return False
try:
......
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