Skip to content

Commit

Permalink
Explain things to myself
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Feb 9, 2024
1 parent a4b91a7 commit 8ca23df
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions backend/lib/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,11 +713,18 @@ def create_standalone(self):
@classmethod
def map_item_method_available(cls, dataset):
"""
Checks if map_item method exists and is compatible with dataset. If dataset does not have an extension,
returns False
:param BasicProcessor processor: The BasicProcessor subclass object with which to use map_item
:param DataSet dataset: The DataSet object with which to use map_item
Check if this processor can use map_item
Checks if map_item method exists and is compatible with dataset. If
dataset has a different extension than the default for this processor,
or if the dataset has no extension, this means we cannot be sure the
data is in the right format to be mapped, so `False` is returned in
that case even if a map_item() method is available.
:param BasicProcessor processor: The BasicProcessor subclass object
with which to use map_item
:param DataSet dataset: The DataSet object with which to
use map_item
"""
# only run item mapper if extension of processor == extension of
# data file, for the scenario where a csv file was uploaded and
Expand Down

0 comments on commit 8ca23df

Please sign in to comment.