File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 11from importlib import resources
2+ from json import load as json_load
3+ from os .path import exists
24
35from ..workarena import data_files
46from ..workarena .tasks import utils
2527REPORT_RETRIEVAL_VALUE_CONFIG_PATH = str (
2628 resources .files (data_files ).joinpath ("task_configs/report_retrieval_value_task.json" )
2729)
30+ # ... data filter for report tasks
31+ REPORT_FILTER_CONFIG_PATH = str (
32+ resources .files (data_files ).joinpath ("task_configs/report_data_filter_config.json" )
33+ )
2834
2935# Path to knowledge base task configurations
3036KB_CONFIG_PATH = str (
224230
225231# Report date filter patch flag
226232REPORT_PATCH_FLAG = "WORKARENA_DATE_FILTER_PATCH"
227- REPORT_DATE_FILTER = "2025-07-15"
233+ if exists (REPORT_FILTER_CONFIG_PATH ):
234+ with open (REPORT_FILTER_CONFIG_PATH , "r" ) as file :
235+ report_filter_config = json_load (file )
236+ REPORT_DATE_FILTER = report_filter_config .get ("report_date_filter" , None )
237+ REPORT_TIME_FILTER = report_filter_config .get ("report_time_filter" , None )
238+ else :
239+ REPORT_DATE_FILTER = None
240+ REPORT_TIME_FILTER = None
You can’t perform that action at this time.
0 commit comments