in project/paperbench/paperbench/judge/judge.py [0:0]
def should_include_file(path: Path) -> bool:
if path.suffix not in whitelisted_extensions:
return False
if not path.exists() or path.is_symlink() and not path.resolve().exists():
return False
file_last_modified_time = datetime.fromtimestamp(path.stat().st_mtime, tz=timezone.utc)
if task_category == "Result Analysis":
return (
path.suffix in whitelisted_docs
or file_last_modified_time >= self.reproduction_log_creation_time_utc
)
elif task_category == "Subtree":
return (
path.suffix in whitelisted_docs
or path.suffix in whitelisted_code
or file_last_modified_time >= self.reproduction_log_creation_time_utc
)
else:
return True