Skip to content

Commit

Permalink
Ignore '.DS_Store' in experiments folder and ignore typo
Browse files Browse the repository at this point in the history
  • Loading branch information
GJFR committed Dec 6, 2024
1 parent d43d4a7 commit 00b9a9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bci/database/mongo/revision_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 7 additions & 1 deletion bci/evaluations/custom/custom_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 00b9a9f

Please sign in to comment.