From d8658e9b8bdb8f233d8b16e66b86aa5687750244 Mon Sep 17 00:00:00 2001 From: "Bobby (aider)" Date: Thu, 13 Feb 2025 21:50:04 -0800 Subject: [PATCH] feat: Add non-CANSLIM report filtering option to load_scanner_reports() --- src/utils/report_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/report_utils.py b/src/utils/report_utils.py index 60cfc9e..e2e0b47 100644 --- a/src/utils/report_utils.py +++ b/src/utils/report_utils.py @@ -30,7 +30,7 @@ def load_scanner_reports(scanner_type: str = None): # Get file creation time created = datetime.fromtimestamp(file.stat().st_ctime) - # If scanner_type is specified, filter based on actual naming patterns + # If scanner_type is specified, apply appropriate filtering if scanner_type == "technical": if not (file.name.startswith(("atr_ema_", "sunny_"))): print(f"Skipping {file.name} - not a technical report") # Debug print @@ -39,6 +39,10 @@ def load_scanner_reports(scanner_type: str = None): if not file.name.startswith("canslim_"): print(f"Skipping {file.name} - not a CANSLIM report") # Debug print continue + elif scanner_type == "non_canslim": # New option for non-CANSLIM reports + if file.name.startswith("canslim_"): + print(f"Skipping {file.name} - is a CANSLIM report") # Debug print + continue reports.append({ 'name': file.name,