From 0797432abf9997994a53562d3e51430767d3ea62 Mon Sep 17 00:00:00 2001 From: Teresia Olsson Date: Thu, 13 Nov 2025 15:30:41 +0100 Subject: [PATCH] Add root path to example. --- .../ESRF_tune_example/esrf_tune_example_no_yaml.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/ESRF_tune_example/esrf_tune_example_no_yaml.py b/examples/ESRF_tune_example/esrf_tune_example_no_yaml.py index bb71a6bc..abbca888 100644 --- a/examples/ESRF_tune_example/esrf_tune_example_no_yaml.py +++ b/examples/ESRF_tune_example/esrf_tune_example_no_yaml.py @@ -7,11 +7,24 @@ from tango.pyaml.controlsystem import TangoControlSystem,ConfigModel as ControlSystemConfig from tango.pyaml.attribute import Attribute,ConfigModel as AttributeConfig from tango.pyaml.attribute_read_only import AttributeReadOnly,ConfigModel as AttributeReadOnlyConfig +from pyaml.configuration import set_root_folder +import os import numpy as np import time +# Get the directory of the current script +script_dir = os.path.dirname(__file__) + +# Go up one level and then into 'data' +relative_path = os.path.join(script_dir, '..', '..', 'tests') + +# Normalize the path (resolves '..') +absolute_path = os.path.abspath(relative_path) + +set_root_folder(absolute_path) + # Configuration tangocs = ControlSystemConfig(name="live",tango_host="ebs-simu-3:10000")