From 23019b26de543ab80000ec0749d4507258c4aaf3 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Fri, 20 Dec 2024 12:46:34 +0100 Subject: [PATCH 1/2] fix: documentation generation for windows --- doc/analysis/generaterobotdata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index ff408f61..c3f31323 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -502,8 +502,8 @@ class GenerateRobotData: return aux def generate_name(self): - base_dir = dirname(dirname(dirname(__file__))) - tp_id = str(self.suite.source.parent).replace(f'{base_dir}/', "") + base_dir = dirname(dirname(dirname(__file__))).replace('\\', "/") + tp_id = str(self.suite.source.parent).replace('\\', "/").replace(f'{base_dir}/', "") for key, value in self.identifier.items(): tp_id = tp_id.replace(key, value) -- GitLab From 48507a7c581adc32511c65309998f4160c4229b7 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Fri, 20 Dec 2024 15:39:42 +0100 Subject: [PATCH 2/2] fix: robotpath --- doc/analysis/generaterobotdata.py | 2 +- doc/generateDocumentationData.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index c3f31323..511a9ff8 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -9,7 +9,7 @@ from re import match, findall, finditer, sub, MULTILINE class GenerateRobotData: def __init__(self, robot_file: str, execdir: str): - self.robot_file = robot_file + self.robot_file = robot_file.replace('\\', "/") self.execdir = execdir self.suite = TestSuiteBuilder().build(robot_file) diff --git a/doc/generateDocumentationData.py b/doc/generateDocumentationData.py index c3a3d66e..b4451d38 100644 --- a/doc/generateDocumentationData.py +++ b/doc/generateDocumentationData.py @@ -7,8 +7,7 @@ from os import makedirs, walk def create_json_of_robotfile(robot_file_to_be_processed: str, computestatistics: bool=False): # TODO: ApiUtils.resource -> 'Delete Context Source Registration Subscription' added 'url=' as parameter - folder_test_suites = dirname(dirname(__file__)) - + folder_test_suites = dirname(dirname(__file__)).replace('\\', "/") folder_result_path = f'{folder_test_suites}/doc/results' result_file = f'{folder_result_path}/{robot_file_to_be_processed}.json' robot_path_to_be_processed, robot_file = find_robot_file(basedir=folder_test_suites, -- GitLab