From a57780829fb9029d84b3fb8ca278a1568f64d928 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 26 Dec 2024 12:27:15 -0500 Subject: [PATCH 1/3] Fix error message for incorrect platform used --- fre/make/create_compile_script.py | 2 +- fre/make/create_docker_script.py | 3 +-- fre/make/create_makefile_script.py | 2 +- fre/make/run_fremake_script.py | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fre/make/create_compile_script.py b/fre/make/create_compile_script.py index 6b1bd94a..2e858a5e 100644 --- a/fre/make/create_compile_script.py +++ b/fre/make/create_compile_script.py @@ -56,7 +56,7 @@ def compile_create(yamlfile,platform,target,jobs,parallel,execute,verbose): if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError (platformName + " does not exist in " + modelYaml.combined.get("compile").get("platformYaml")) + raise ValueError (platformName + " does not exist in platforms.yaml") platform=modelYaml.platforms.getPlatformFromName(platformName) ## Make the bldDir based on the modelRoot, the platform, and the target diff --git a/fre/make/create_docker_script.py b/fre/make/create_docker_script.py index e785dc82..54fa6686 100644 --- a/fre/make/create_docker_script.py +++ b/fre/make/create_docker_script.py @@ -42,8 +42,7 @@ def dockerfile_create(yamlfile,platform,target,execute): if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError (platformName + " does not exist in " + \ - modelYaml.combined.get("compile").get("platformYaml")) + raise ValueError (platform_name + " does not exist in platforms.yaml") platform = modelYaml.platforms.getPlatformFromName(platformName) diff --git a/fre/make/create_makefile_script.py b/fre/make/create_makefile_script.py index fe12e62d..215883e7 100644 --- a/fre/make/create_makefile_script.py +++ b/fre/make/create_makefile_script.py @@ -39,7 +39,7 @@ def makefile_create(yamlfile,platform,target): if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError (platformName + " does not exist in " + modelYaml.combined.get("compile").get("platformYaml")) + raise ValueError (platformName + " does not exist in platforms.yaml") platform=modelYaml.platforms.getPlatformFromName(platformName) ## Make the bldDir based on the modelRoot, the platform, and the target diff --git a/fre/make/run_fremake_script.py b/fre/make/run_fremake_script.py index 0d0ea534..548cd7f8 100644 --- a/fre/make/run_fremake_script.py +++ b/fre/make/run_fremake_script.py @@ -69,8 +69,7 @@ def fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,exec if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError(f'{platformName} does not exist in ' - f'{modelYaml.combined.get("compile").get("platformYaml")}') + raise ValueError (platformName + " does not exist in platforms.yaml") platform = modelYaml.platforms.getPlatformFromName(platformName) From e699d0807946931e6b5dd213293d4f49d28e2bb2 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 26 Dec 2024 12:49:31 -0500 Subject: [PATCH 2/3] Change `platform_name` to `platformName` --- fre/make/create_docker_script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fre/make/create_docker_script.py b/fre/make/create_docker_script.py index 54fa6686..2e9eb558 100644 --- a/fre/make/create_docker_script.py +++ b/fre/make/create_docker_script.py @@ -42,7 +42,7 @@ def dockerfile_create(yamlfile,platform,target,execute): if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError (platform_name + " does not exist in platforms.yaml") + raise ValueError (platformName + " does not exist in platforms.yaml") platform = modelYaml.platforms.getPlatformFromName(platformName) From d01377085091486339b136b2a320714256dbbb8a Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 2 Jan 2025 09:30:08 -0500 Subject: [PATCH 3/3] Make print statement f-strings --- fre/make/create_compile_script.py | 2 +- fre/make/create_docker_script.py | 2 +- fre/make/create_makefile_script.py | 5 ++++- fre/make/run_fremake_script.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fre/make/create_compile_script.py b/fre/make/create_compile_script.py index 2e858a5e..ed131bcc 100644 --- a/fre/make/create_compile_script.py +++ b/fre/make/create_compile_script.py @@ -56,7 +56,7 @@ def compile_create(yamlfile,platform,target,jobs,parallel,execute,verbose): if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError (platformName + " does not exist in platforms.yaml") + raise ValueError (f"{platformName} does not exist in platforms.yaml") platform=modelYaml.platforms.getPlatformFromName(platformName) ## Make the bldDir based on the modelRoot, the platform, and the target diff --git a/fre/make/create_docker_script.py b/fre/make/create_docker_script.py index 2e9eb558..cde401c2 100644 --- a/fre/make/create_docker_script.py +++ b/fre/make/create_docker_script.py @@ -42,7 +42,7 @@ def dockerfile_create(yamlfile,platform,target,execute): if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError (platformName + " does not exist in platforms.yaml") + raise ValueError (f"{platformName} does not exist in platforms.yaml") platform = modelYaml.platforms.getPlatformFromName(platformName) diff --git a/fre/make/create_makefile_script.py b/fre/make/create_makefile_script.py index 215883e7..3a3ccaec 100644 --- a/fre/make/create_makefile_script.py +++ b/fre/make/create_makefile_script.py @@ -9,6 +9,9 @@ import fre.yamltools.combine_yamls as cy def makefile_create(yamlfile,platform,target): + """ + Create the makefile + """ srcDir="src" checkoutScriptName = "checkout.sh" baremetalRun = False # This is needed if there are no bare metal runs @@ -39,7 +42,7 @@ def makefile_create(yamlfile,platform,target): if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError (platformName + " does not exist in platforms.yaml") + raise ValueError (f"{platformName} does not exist in platforms.yaml") platform=modelYaml.platforms.getPlatformFromName(platformName) ## Make the bldDir based on the modelRoot, the platform, and the target diff --git a/fre/make/run_fremake_script.py b/fre/make/run_fremake_script.py index 548cd7f8..f1e44970 100644 --- a/fre/make/run_fremake_script.py +++ b/fre/make/run_fremake_script.py @@ -69,7 +69,7 @@ def fremake_run(yamlfile,platform,target,parallel,jobs,no_parallel_checkout,exec if modelYaml.platforms.hasPlatform(platformName): pass else: - raise ValueError (platformName + " does not exist in platforms.yaml") + raise ValueError (f"{platformName} does not exist in platforms.yaml") platform = modelYaml.platforms.getPlatformFromName(platformName)