Skip to content
Snippets Groups Projects
Commit 8d930813 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: doc and naming

parent 2fc104cc
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,16 @@ class SuppressKnown(logging.Filter):
return sha256((txt+str(identifier)).encode("utf-8")).hexdigest()
def filter(self, record):
"""
Return whether the record shall be logged.
If either identifier of category is missing 1 is returned (logging
enabled). If the record has both attributes, it is checked whether the
combination was shown before (was_tagged). If so 0 is returned.
Otherwise the combination is saved and 1 is returned
"""
if not hasattr(record, "identifier"):
return 1
......
......@@ -26,7 +26,10 @@ from caosadvancedtools.suppressKnown import SuppressKnown
logger = logging.getLogger(__name__)
def name_converter(name):
def assure_name_format(name):
"""
checks whether a string can be interpreted as 'LastName, FirstName'
"""
name = str(name)
if len(name.split(",")) != 2:
......@@ -60,6 +63,9 @@ class XLS_Importer(object):
necessary.
obligatory_columns: list of column names, optional
each listed column must not have missing values
unique_columns : list of column names that in
combination must be unique; i.e. each row has a
unique combination of values in those columns.
"""
self.sup = SuppressKnown()
self.required_columns = list(converters.keys())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment