Index: suite_leahi/shared/scripts/configuration/application_init.py =================================================================== diff -u -r23037797e0ceee499a15eabb33154da323d904f6 -rb4970b1cde5fc382f3dac0c8ab250a260f1e11da --- suite_leahi/shared/scripts/configuration/application_init.py (.../application_init.py) (revision 23037797e0ceee499a15eabb33154da323d904f6) +++ suite_leahi/shared/scripts/configuration/application_init.py (.../application_init.py) (revision b4970b1cde5fc382f3dac0c8ab250a260f1e11da) @@ -194,9 +194,8 @@ """ Resets a specific setting in System.conf to its default value from System.dflt. """ - base_path = Path.home() / "Public/luis/config/configurations/Settings/" - source_file = base_path / "System.dflt" - target_file = base_path / "System.conf" + source_file = Path.home() / config.CONFIGURATIONS_PATH / "Settings/System.dflt" + target_file = Path.home() / config.CONFIGURATIONS_PATH / "Settings/System.conf" new_value = None search_pattern = f"{setting_key} =" @@ -235,7 +234,7 @@ Reads the configuration file and extracts key-value pairs from the specified section. """ - location = '/home/denali/Public/luis/config/configurations/Instructions/Instructions.conf' + location = Path.home() / config.CONFIGURATIONS_PATH / "Instructions/Instructions.conf" result = {} # Check if file exists to prevent FileNotFoundError @@ -284,8 +283,7 @@ Returns: The Title value if found, otherwise None. """ - location = '/home/denali/Public/luis/config/configurations/Instructions/Instructions.conf' - + location = Path.home() / config.CONFIGURATIONS_PATH / "Instructions/Instructions.conf" # Check if file exists before opening if not os.path.exists(location): return None Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -r23037797e0ceee499a15eabb33154da323d904f6 -rb4970b1cde5fc382f3dac0c8ab250a260f1e11da --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 23037797e0ceee499a15eabb33154da323d904f6) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision b4970b1cde5fc382f3dac0c8ab250a260f1e11da) @@ -97,6 +97,7 @@ AUTO_EJECT = 'Auto Eject' # Settings Service +CONFIGURATIONS_PATH = "Public/luis/config/configurations/" DEFAULT_SERVICE_PASSWORD_RAW = "Atal.Matal.22leh" # TODO need to update if we ever change the default NEW_PASSWORD_RAW = "Test4.Ksah.sk43sa" MANUFACTURING_SCREEN_TITLE_TEXT = "Manufacturing Setup" Index: suite_leahi/tst_blood_set_auto/test.py =================================================================== diff -u -r6420a11be98972a3323823d330c40b8c8b9fca3d -rb4970b1cde5fc382f3dac0c8ab250a260f1e11da --- suite_leahi/tst_blood_set_auto/test.py (.../test.py) (revision 6420a11be98972a3323823d330c40b8c8b9fca3d) +++ suite_leahi/tst_blood_set_auto/test.py (.../test.py) (revision b4970b1cde5fc382f3dac0c8ab250a260f1e11da) @@ -23,6 +23,7 @@ from leahi_dialin.protocols import CAN from leahi_dialin.utils import conversions from configuration.getrejectiontext import ScopedRejectionRepository +from pathlib import Path td_simulator = TD_Messaging() @@ -68,7 +69,7 @@ channel_id, message_id, handle_blood_set_auto_eject_request ) - conf_path = "/home/denali/Public/luis/config/configurations/Alarms/Rejections.conf" + conf_path = Path.home() / config.CONFIGURATIONS_PATH / "Alarms/Rejections.conf" repo = ScopedRejectionRepository(path=conf_path) test.startSection("Blood Set Auto Load and Eject")