From 28898490d21282c3029dba9627b684d931da4bac Mon Sep 17 00:00:00 2001 From: Damian Birchler Date: Thu, 6 Mar 2025 11:03:02 +0100 Subject: [PATCH] Find the results dir based on the example script file location. --- examples/ready_to_run/processing_example.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/ready_to_run/processing_example.py b/examples/ready_to_run/processing_example.py index b5c1202..dcc2b39 100644 --- a/examples/ready_to_run/processing_example.py +++ b/examples/ready_to_run/processing_example.py @@ -157,8 +157,10 @@ def main(): ] # run the scenarios on a whole result using multiple processes + results_dir = _pl.Path(__file__).parent / "data" / "results" + simulations_data = api.process_whole_result_set_parallel( - _pl.Path(api.REPO_ROOT / "examples/ready_to_run/data/results"), + results_dir, processing_scenarios, ) @@ -168,10 +170,7 @@ def main(): # run the single scenario on a single simulation ( api.process_single_simulation( - _pl.Path( - api.REPO_ROOT - / "examples/ready_to_run/data/results/complete-0-SnkScale0.8000-StoreScale10" - ), + results_dir / "complete-0-SnkScale0.8000-StoreScale10", # =============================================================== processing_for_histogram, # do not add round brackets when linking your processing step