diff --git a/bci/database/mongo/revision_cache.py b/bci/database/mongo/revision_cache.py index 6a06efd..4270b5a 100644 --- a/bci/database/mongo/revision_cache.py +++ b/bci/database/mongo/revision_cache.py @@ -20,7 +20,7 @@ def store_firefox_binary_availability(data: dict) -> None: collection.delete_many({}) collection.insert_many(values) - logger.info(f'Revision Cache was updates ({len(values)} documents).') + logger.info(f'Revision Cache was updated ({len(values)} documents).') @staticmethod def firefox_get_revision_number(revision_id: str) -> int: diff --git a/bci/evaluations/custom/custom_evaluation.py b/bci/evaluations/custom/custom_evaluation.py index defe421..76da69f 100644 --- a/bci/evaluations/custom/custom_evaluation.py +++ b/bci/evaluations/custom/custom_evaluation.py @@ -14,6 +14,8 @@ class CustomEvaluationFramework(EvaluationFramework): + __files_and_folders_to_ignore = ['.DS_Store'] + def __init__(self): super().__init__() self.dir_tree = self.initialize_dir_tree() @@ -37,7 +39,10 @@ def set_nested_value(d: dict, keys: list[str], value: dict): # Remove base path from root root = root[len(path):] keys = root.split('/')[1:] - subdir_tree = {dir: {} for dir in dirs} | {file: None for file in files} + subdir_tree = ( + {dir: {} for dir in dirs if dir not in CustomEvaluationFramework.__files_and_folders_to_ignore} | + {file: None for file in files if file not in CustomEvaluationFramework.__files_and_folders_to_ignore} + ) if root: set_nested_value(dir_tree, keys, subdir_tree) else: @@ -85,6 +90,7 @@ def __get_url_queue(project: str, project_path: str, experiment: str) -> Optiona else: # Otherwise, a default URL queue is used, based on the domain that hosts the main page experiment_path = os.path.join(project_path, experiment) + assert os.path.isdir(experiment_path) for domain in os.listdir(experiment_path): main_folder_path = os.path.join(experiment_path, domain, 'main') if os.path.exists(main_folder_path):