From 2ece01e1d7cbe12589b353996bce3a9f3b9b7052 Mon Sep 17 00:00:00 2001 From: olindgre Date: Tue, 20 Aug 2024 09:17:41 +0200 Subject: [PATCH] Make powertrain-build not overlap with pybuild in site-packages Change-Id: I7b59f3f04f0f787d35db0b9389f295bf1ad24f56 --- MANIFEST.in | 8 +- NOTICE | 6 +- README.md | 20 +-- docs/build_cmd.md | 4 +- docs/powertrain_build.md | 18 +-- docs/powertrain_build_introduction.md | 2 +- docs/signal_interface_tool.md | 4 +- {pybuild => powertrain_build}/__init__.py | 18 +-- {pybuild => powertrain_build}/a2l.py | 4 +- {pybuild => powertrain_build}/a2l_merge.py | 6 +- .../a2l_templates.py | 0 {pybuild => powertrain_build}/build.py | 90 +++++------ {pybuild => powertrain_build}/build_defs.py | 0 .../build_proj_config.py | 4 +- .../check_interface.py | 12 +- {pybuild => powertrain_build}/config.py | 2 +- {pybuild => powertrain_build}/core.py | 6 +- {pybuild => powertrain_build}/core_dummy.py | 8 +- .../create_conversion_table.py | 0 {pybuild => powertrain_build}/dids.py | 10 +- {pybuild => powertrain_build}/dummy.py | 118 +++++++------- {pybuild => powertrain_build}/dummy_spm.py | 14 +- .../environmentcheck.py | 4 +- {pybuild => powertrain_build}/ext_dbg.py | 8 +- {pybuild => powertrain_build}/ext_var.py | 147 +++++++++--------- .../feature_configs.py | 6 +- .../gen_allsysteminfo.py | 8 +- .../gen_label_split.py | 8 +- .../handcode_replacer.py | 0 {pybuild => powertrain_build}/html_report.py | 0 .../interface/README.md | 0 .../interface}/__init__.py | 2 +- .../interface/application.py | 32 ++-- .../interface/base.py | 2 +- .../interface/csp_api.py | 4 +- .../interface/device_proxy.py | 4 +- .../interface/ems.py | 8 +- .../interface/export_global_vars.py | 10 +- .../interface/generate_adapters.py | 14 +- .../interface/generate_hi_interface.py | 6 +- .../interface/generate_service.py | 6 +- .../interface/generate_wrappers.py | 10 +- .../interface/generation_utils.py | 8 +- .../interface/hal.py | 4 +- .../interface/model_yaml_verification.py | 6 +- .../interface/service.py | 8 +- .../interface/simulink.py | 2 +- .../interface/update_call_sources.py | 0 .../interface/update_model_yaml.py | 6 +- .../interface/zone_controller.py | 4 +- {pybuild => powertrain_build}/lib/__init__.py | 2 +- .../lib/helper_functions.py | 0 {pybuild => powertrain_build}/lib/logger.py | 0 .../CodeGen/BuildAutomationPyBuild.m | 0 .../matlab_scripts/CodeGen/Generate_A2L.m | 0 .../matlab_scripts/CodeGen/generateTLUnit.m | 0 .../CodeGen/getAsilClassification.m | 0 .../CodeGen/modelConfiguredForTL.m | 0 .../matlab_scripts/CodeGen/moveDefOutports.m | 0 .../matlab_scripts/CodeGen/parseCalMeasData.m | 0 .../CodeGen/parseCoreIdentifiers.m | 0 .../matlab_scripts/CodeGen/parseDIDs.m | 0 .../matlab_scripts/CodeGen/parseInPorts.m | 0 .../CodeGen/parseIncludeConfigs.m | 0 .../matlab_scripts/CodeGen/parseModelInfo.m | 0 .../matlab_scripts/CodeGen/parseNVM.m | 0 .../matlab_scripts/CodeGen/parseOutPorts.m | 0 .../matlab_scripts/CodeGen/parsePreProcBlks.m | 0 .../matlab_scripts/CodeGen/struct2JSON.m | 0 .../CodeGen/updateCodeSwConfig.m | 17 +- .../matlab_scripts/Init_PyBuild.m | 2 +- .../matlab_scripts/__init__.py | 0 .../helperFunctions/Get_Full_Name.m | 0 .../helperFunctions/Get_SrcLines.m | 0 .../helperFunctions/Init_Models.m | 0 .../helperFunctions/Init_Projects.m | 0 .../helperFunctions/Read_Units.m | 0 .../helperFunctions/SetProjectTimeSamples.m | 0 .../helperFunctions/Strip_Suffix.m | 0 .../helperFunctions/followLink.m | 0 .../helperFunctions/getCodeSwitches.m | 0 .../helperFunctions/getConsumerBlocks.m | 0 .../helperFunctions/getDefBlock.m | 0 .../helperFunctions/getDefOutport.m | 0 .../helperFunctions/getDstBlocks.m | 0 .../helperFunctions/getDstLines.m | 0 .../helperFunctions/getInterfaceSignals.m | 0 .../matlab_scripts/helperFunctions/getName.m | 0 .../matlab_scripts/helperFunctions/getPath.m | 0 .../helperFunctions/getProperValue.m | 0 .../helperFunctions/getSrcBlocks.m | 0 .../helperFunctions/getSrcLines.m | 0 .../helperFunctions/loadLibraries.m | 0 .../matlab_scripts/helperFunctions/loadjson.m | 0 .../helperFunctions/modifyEnumStructField.m | 0 .../helperFunctions/removeConfigDuplicates.m | 0 .../helperFunctions/sortSystemByClass.m | 0 .../helperFunctions/tl_getfast.m | 0 .../helperFunctions/topLevelSystem.m | 0 .../helperFunctions/updateModels.m | 0 .../memory_section.py | 4 +- {pybuild => powertrain_build}/nvm_def.py | 8 +- .../problem_logger.py | 0 {pybuild => powertrain_build}/pt_matlab.py | 0 {pybuild => powertrain_build}/pt_win32.py | 2 +- .../replace_compu_tab_ref.py | 0 {pybuild => powertrain_build}/sched_funcs.py | 8 +- {pybuild => powertrain_build}/signal.py | 0 .../signal_if_html_rep.py | 2 +- .../signal_if_html_rep_all.py | 2 +- .../signal_incons_html_rep.py | 2 +- .../signal_incons_html_rep_all.py | 2 +- .../signal_incons_html_rep_base.py | 2 +- .../signal_inconsistency_check.py | 16 +- .../signal_interfaces.py | 28 ++-- .../templates/Index_SigCheck_All.html | 0 .../templates/Index_SigIf_All.html | 0 {pybuild => powertrain_build}/types.py | 0 {pybuild => powertrain_build}/unit_configs.py | 6 +- .../user_defined_types.py | 6 +- {pybuild => powertrain_build}/versioncheck.py | 4 +- {pybuild => powertrain_build}/wrapper.py | 32 ++-- {pybuild => powertrain_build}/xlrd_csv.py | 0 .../zone_controller}/__init__.py | 2 +- .../zone_controller/calibration.py | 2 +- .../zone_controller/composition_yaml.py | 10 +- requirements.txt | 3 +- setup.cfg | 8 +- .../test_dids/zc_dids.py | 2 +- .../test_composition_yaml/composition_yaml.py | 2 +- .../composition_yaml_setup.py | 2 +- .../composition_yaml_with_a2l_axis_data.py | 2 +- .../composition_yaml_with_calls_all_fields.py | 2 +- ...tion_yaml_with_calls_no_optional_fields.py | 2 +- .../composition_yaml_with_dids.py | 2 +- .../composition_yaml_with_dtcs.py | 2 +- tests/interface/__init__.py | 2 +- tests/interface/test_export_global_vars.py | 6 +- tests/interface/test_generate_hi_interface.py | 2 +- tests/interface/test_generation_utils.py | 18 +-- tests/interface/test_interface.py | 2 +- tests/interface/test_interface_application.py | 6 +- .../interface/test_interface_device_proxy.py | 4 +- tests/interface/test_interface_hal.py | 4 +- tests/interface/test_interface_service.py | 6 +- .../interface/test_model_yaml_verification.py | 2 +- tests/interface/test_simulink.py | 2 +- tests/interface/test_update_call_sources.py | 2 +- tests/interface/test_update_model_yaml.py | 2 +- tests/lib/__init__.py | 2 +- tests/lib/test_helper_functions.py | 2 +- tests/lib/test_logger.py | 2 +- tests/{pybuild => powertrain_build}/.pylintrc | 0 .../{pybuild => powertrain_build}/__init__.py | 0 .../a2l_merge_data.py | 0 .../cnfg_files/ActiveInterfaces/CAN-Input.csv | 0 .../ActiveInterfaces/CAN-Output.csv | 0 .../cnfg_files/ActiveInterfaces/EMS-Input.csv | 0 .../ActiveInterfaces/EMS-Output.csv | 0 .../cnfg_files/ActiveInterfaces/LIN-Input.csv | 0 .../ActiveInterfaces/LIN-Output.csv | 0 .../cnfg_files/ActiveInterfaces/Legend.csv | 0 .../ActiveInterfaces/Private CAN-Input.csv | 0 .../ActiveInterfaces/Private CAN-Output.csv | 0 .../cnfg_files/BaseConfig.json | 0 .../CoreIdNameDefinition_EventIDs.csv | 0 .../CoreIdNameDefinition_FunctionIDs.csv | 0 .../cnfg_files/CoreIdNameDefinition_IUMPR.csv | 0 .../CoreIdNameDefinition_Mode$06.csv | 0 .../CoreIdNameDefinition_Ranking.csv | 0 .../cnfg_files/DIDIds_FullRange_Float32.csv | 0 .../cnfg_files/DIDIds_FullRange_UInt32.csv | 0 .../cnfg_files/LabelsplitCfg.json | 0 .../Mock-gen_allsysteminfo-_get_core_ids.json | 0 .../Mock-gen_allsysteminfo-_get_dids.json | 0 .../Mock-unit_configs-get_per_unit_cfg.json | 0 .../cnfg_files/ProjectCfg.json | 0 ...MSInterfaceRequirements_ExportedToCSV.xlsm | Bin .../cnfg_files/SPM_Codeswitch_Setup.csv | 0 .../cnfg_files/SPM_Codeswitch_Setup_PVC.csv | 0 .../cnfg_files/VcAesSupM.a2l | 0 .../cnfg_files/VcVmcPmm.c | 0 .../cnfg_files/VcVmcPmm.e | 0 .../VcVmcPmm__HEP7_OPortMvd_LocalDefs.h | 0 .../conf.local/interface_data_types.yml | 0 .../cnfg_files/config_VcVmcPmm__HEP7.json | 0 .../expected_signals_in_nvm_structs.json | 0 .../config_ invalid name.json | 0 .../config_InvalidConfig.json | 0 .../config_InvalidJsonData.json | 0 .../cnfg_files/label_split_cfg.json | 0 .../cnfg_files/nvm_structs_ref_critical.json | 0 .../nvm_structs_ref_critical_duplicate.json | 0 .../cnfg_files/nvm_structs_ref_dcl.json | 0 .../cnfg_files/nvm_structs_ref_empty.json | 0 .../nvm_structs_ref_empty_small.json | 0 .../nvm_structs_ref_single_signal.json | 0 .../cnfg_files/nvm_structs_ref_small.json | 0 .../nvm_structs_ref_used_positions.json | 0 .../nvm_structs_ref_wrong_type.json | 0 .../cnfg_files/rasters.json | 0 .../cnfg_files/signalinterface.yaml | 0 .../test-repo/ConfigDocuments/BaseConfig.json | 0 .../IF/VcTestRx/pybuild_cfg/VcTestRx.yaml | 0 .../VcTestRx/pybuild_cfg/config_VcTestRx.json | 0 .../IF/VcTestTx/pybuild_cfg/VcTestTx.yaml | 0 .../VcTestTx/pybuild_cfg/config_VcTestTx.json | 0 .../ConfigDocuments/CSP_Codeswitch_Setup.csv | 0 .../CSP_Codeswitch_Setup_Thermal.csv | 0 .../CoreIdNameDefinition_EventIDs.csv | 0 .../CoreIdNameDefinition_FunctionIDs.csv | 0 .../CoreIdNameDefinition_IUMPR.csv | 0 .../CoreIdNameDefinition_IUMPRDen.csv | 0 .../CoreIdNameDefinition_Mode$06.csv | 0 .../CoreIdNameDefinition_Ranking.csv | 0 .../CATC/ConfigDocuments/DIDIds_Float32.csv | 0 .../DIDIds_FullRange_Float32.csv | 0 .../DIDIds_FullRange_UInt32.csv | 0 .../CATC/ConfigDocuments/DIDIds_UInt32.csv | 0 .../Projects/CSP/CATC/ProjectCfg.json | 0 .../CSP/CATC/conf.local/DeviceDomains.json | 0 .../CATC/conf.local/ServiceInterfaces.json | 0 .../CSP/CATC/conf.local/cs-module.yml | 0 .../CSP/CATC/conf.local/nvm_structs.json | 0 .../CSP/CATC/conf.local/project_defaults.txt | 0 .../Projects/CSP/CATC/conf.local/rasters.json | 0 .../test-repo/Projects/CSP/hal_list.yaml | 0 .../cnfg_files/test.a2l | 0 .../cnfg_files/test_consumer.a2l | 0 .../cnfg_files/test_mrg__kalle.a2l | 0 .../cnfg_files/test_producer.a2l | 0 .../cnfg_files/tl_aux_defines_VmcPmm__HE.h | 0 .../unit_cfgs/Invalid_If_LocalDefs.h | 0 .../unit_cfgs/Invalid_Include_LocalDefs.h | 0 .../Valid_Local_Reference_LocalDefs.h | 0 .../unit_cfgs/Valid_Reference_LocalDefs.h | 0 .../VcAesSupM__gen3_OPortMvd_LocalDefs.h | 0 .../unit_cfgs/VcDeDa_OPortMvd_LocalDefs.h | 0 .../unit_cfgs/config_VcAesSupM__gen3.json | 0 .../VcAesSupM__gen3_OPortMvd_LocalDefs.h | 0 .../unit_cfgs_ec/config_VcAesSupM__gen3.json | 0 .../common_src_files/Tab1DIntpI1T0.c | 0 .../core_cnfg.py | 0 .../core_dummy_cnfg.py | 0 .../{pybuild => powertrain_build}/io_cnfg.py | 0 .../reference_files/EmptySigCheck.html | 0 .../reference_files/EnumTest.m | 0 .../reference_files/OPort_defs.json | 0 .../SS1/test_model/VcTestModel.h | 0 .../SS1/test_model/VcTestModel_par.m | 0 .../SS1/test_model/VcTestModel_sgp.xml | 0 .../SS1/test_model/udt_VcTestModel.h | 0 .../SS1/test_model1/VcTestModel1.h | 0 .../SS1/test_model1/VcTestModel1_par.m | 0 .../SS1/test_model1/udt_VcTestModel1.h | 0 .../SS1/test_model2/VcTestModel2.h | 0 .../SS1/test_model2/udt_VcTestModel2.h | 0 .../SS1/test_model3/VcTestModel3.h | 0 .../SS1/test_model3/udt_VcTestModel3.h | 0 .../reference_files/SigIf.html | 0 .../reference_files/SigIfAll.html | 0 .../reference_files/SimulinkEnum.m | 0 .../reference_files/VEA_VED4_SPA.a2l | 0 .../reference_files/VcDummy_spm.c | 0 .../reference_files/VcDummy_spm.h | 0 .../reference_files/VcDummy_spm_with_enum.h | 0 .../reference_files/VcExtINI.c | 0 .../reference_files/WrongFileNameEnum.m | 0 .../reference_files/config_OPort_defs.json | 0 .../config_VcVmcPmm_OPort.json | 0 .../config_VcVmcPmm__HEP7.json | 0 .../reference_files/config_aux_defs.json | 0 .../reference_files/config_combined.json | 0 .../config_combined_header.json | 0 .../reference_files/config_local_defs.json | 0 .../reference_files/nvm_structs_ref_dcl.json | 0 .../reference_files/ts_test.h | 0 .../reference_files/vcc_nvm_struct_ref.a2l | 0 .../reference_files/vcc_nvm_struct_ref.c | 0 .../reference_files/vcc_nvm_struct_ref.h | 0 .../vcc_nvm_struct_ref_critical_duplicate.a2l | 0 .../vcc_nvm_struct_ref_critical_duplicate.h | 0 .../vcc_nvm_struct_ref_critical_remove.a2l | 0 .../vcc_nvm_struct_ref_critical_remove.h | 0 .../vcc_nvm_structs_critical.c | 0 .../vcc_nvm_structs_critical.h | 0 .../vcc_nvm_structs_critical_bosch.a2l | 0 .../vcc_nvm_structs_critical_denso.a2l | 0 .../vcc_nvm_structs_ref_used_positions.h | 0 .../src_files/mdl/C.mdl | 0 .../src_files/mdl/C_par.m | 0 .../src_files/mdl/SSA/A/A.mdl | 0 .../src_files/mdl/SSA/A/A_par.m | 0 .../src_files/mdl/SSB/B/B.mdl | 0 .../src_files/mdl/SSB/B/B_par.m | 0 .../src_files/mdl/SSB/B/test/BB.mdl | 0 .../src_files/mdl/SSB/B/test/BB_par.m | 0 .../src_files/mdl/SSB/B1/B1.mdl | 0 .../src_files/mdl/SSB/B1/B1_par.m | 0 .../src_files/src_file1.c | 0 .../src_files/src_file1.h | 0 .../{pybuild => powertrain_build}/sw_cnfg.py | 0 .../{pybuild => powertrain_build}/test_a2l.py | 4 +- .../test_a2l_merge.py | 2 +- .../test_a2l_templates.py | 8 +- .../test_build.py | 36 ++--- .../test_build_proj_configs.py | 2 +- .../test_check_interface.py | 8 +- .../test_config.py | 8 +- .../test_core.py | 6 +- .../test_core_dummy.py | 4 +- .../test_create_conversion_table.py | 2 +- .../test_dids.py | 6 +- .../test_dummy_spm.py | 10 +- .../test_environmentcheck.py | 4 +- .../test_ext_dbg.py | 6 +- .../test_ext_var.py | 8 +- .../test_feature_configs.py | 6 +- .../test_gen_allsysteminfo.py | 6 +- .../test_gen_label_split.py | 14 +- .../test_handcode_replacer.py | 6 +- .../test_memory_section.py | 6 +- .../test_nvm_def.py | 6 +- .../test_pt_matlab.py | 2 +- .../test_pt_win32.py | 2 +- .../test_read_feat_cnfgs.py | 4 +- .../test_read_sig_ifs.py | 8 +- .../test_sched_funcs.py | 6 +- .../test_sig_if_html_rep.py | 8 +- .../test_sig_if_html_rep_all.py | 8 +- .../test_sig_ifs.py | 6 +- .../test_sig_incons_html_rep.py | 2 +- .../test_sig_incons_html_rep_all.py | 2 +- .../test_signal_inconsistency_check.py | 6 +- .../test_signal_interfaces_yaml.py | 2 +- .../test_signals.py | 4 +- .../test_unit_configs.py | 6 +- .../test_user_defined_types.py | 6 +- .../test_versioncheck.py | 8 +- tests/zone_controller/test_calibration.py | 4 +- .../zone_controller/test_composition_yaml.py | 12 +- tox.ini | 2 +- 342 files changed, 587 insertions(+), 590 deletions(-) rename {pybuild => powertrain_build}/__init__.py (57%) rename {pybuild => powertrain_build}/a2l.py (99%) rename {pybuild => powertrain_build}/a2l_merge.py (99%) rename {pybuild => powertrain_build}/a2l_templates.py (100%) rename {pybuild => powertrain_build}/build.py (93%) rename {pybuild => powertrain_build}/build_defs.py (100%) rename {pybuild => powertrain_build}/build_proj_config.py (99%) rename {pybuild => powertrain_build}/check_interface.py (98%) rename {pybuild => powertrain_build}/config.py (99%) rename {pybuild => powertrain_build}/core.py (99%) rename {pybuild => powertrain_build}/core_dummy.py (98%) rename {pybuild => powertrain_build}/create_conversion_table.py (100%) rename {pybuild => powertrain_build}/dids.py (99%) rename {pybuild => powertrain_build}/dummy.py (55%) rename {pybuild => powertrain_build}/dummy_spm.py (96%) rename {pybuild => powertrain_build}/environmentcheck.py (97%) rename {pybuild => powertrain_build}/ext_dbg.py (97%) rename {pybuild => powertrain_build}/ext_var.py (71%) rename {pybuild => powertrain_build}/feature_configs.py (98%) rename {pybuild => powertrain_build}/gen_allsysteminfo.py (97%) rename {pybuild => powertrain_build}/gen_label_split.py (98%) rename {pybuild => powertrain_build}/handcode_replacer.py (100%) rename {pybuild => powertrain_build}/html_report.py (100%) rename {pybuild => powertrain_build}/interface/README.md (100%) rename {pybuild/zone_controller => powertrain_build/interface}/__init__.py (66%) rename {pybuild => powertrain_build}/interface/application.py (94%) rename {pybuild => powertrain_build}/interface/base.py (99%) rename {pybuild => powertrain_build}/interface/csp_api.py (99%) rename {pybuild => powertrain_build}/interface/device_proxy.py (99%) rename {pybuild => powertrain_build}/interface/ems.py (91%) rename {pybuild => powertrain_build}/interface/export_global_vars.py (90%) rename {pybuild => powertrain_build}/interface/generate_adapters.py (89%) rename {pybuild => powertrain_build}/interface/generate_hi_interface.py (91%) rename {pybuild => powertrain_build}/interface/generate_service.py (92%) rename {pybuild => powertrain_build}/interface/generate_wrappers.py (93%) rename {pybuild => powertrain_build}/interface/generation_utils.py (95%) rename {pybuild => powertrain_build}/interface/hal.py (98%) rename {pybuild => powertrain_build}/interface/model_yaml_verification.py (98%) rename {pybuild => powertrain_build}/interface/service.py (97%) rename {pybuild => powertrain_build}/interface/simulink.py (99%) rename {pybuild => powertrain_build}/interface/update_call_sources.py (100%) rename {pybuild => powertrain_build}/interface/update_model_yaml.py (97%) rename {pybuild => powertrain_build}/interface/zone_controller.py (99%) rename {pybuild => powertrain_build}/lib/__init__.py (71%) rename {pybuild => powertrain_build}/lib/helper_functions.py (100%) rename {pybuild => powertrain_build}/lib/logger.py (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/BuildAutomationPyBuild.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/Generate_A2L.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/generateTLUnit.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/getAsilClassification.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/modelConfiguredForTL.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/moveDefOutports.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parseCalMeasData.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parseCoreIdentifiers.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parseDIDs.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parseInPorts.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parseIncludeConfigs.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parseModelInfo.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parseNVM.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parseOutPorts.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/parsePreProcBlks.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/struct2JSON.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/CodeGen/updateCodeSwConfig.m (53%) rename {pybuild => powertrain_build}/matlab_scripts/Init_PyBuild.m (98%) rename {pybuild => powertrain_build}/matlab_scripts/__init__.py (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/Get_Full_Name.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/Get_SrcLines.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/Init_Models.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/Init_Projects.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/Read_Units.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/SetProjectTimeSamples.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/Strip_Suffix.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/followLink.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getCodeSwitches.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getConsumerBlocks.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getDefBlock.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getDefOutport.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getDstBlocks.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getDstLines.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getInterfaceSignals.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getName.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getPath.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getProperValue.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getSrcBlocks.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/getSrcLines.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/loadLibraries.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/loadjson.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/modifyEnumStructField.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/removeConfigDuplicates.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/sortSystemByClass.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/tl_getfast.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/topLevelSystem.m (100%) rename {pybuild => powertrain_build}/matlab_scripts/helperFunctions/updateModels.m (100%) rename {pybuild => powertrain_build}/memory_section.py (99%) rename {pybuild => powertrain_build}/nvm_def.py (99%) rename {pybuild => powertrain_build}/problem_logger.py (100%) rename {pybuild => powertrain_build}/pt_matlab.py (100%) rename {pybuild => powertrain_build}/pt_win32.py (98%) rename {pybuild => powertrain_build}/replace_compu_tab_ref.py (100%) rename {pybuild => powertrain_build}/sched_funcs.py (97%) rename {pybuild => powertrain_build}/signal.py (100%) rename {pybuild => powertrain_build}/signal_if_html_rep.py (99%) rename {pybuild => powertrain_build}/signal_if_html_rep_all.py (99%) rename {pybuild => powertrain_build}/signal_incons_html_rep.py (98%) rename {pybuild => powertrain_build}/signal_incons_html_rep_all.py (99%) rename {pybuild => powertrain_build}/signal_incons_html_rep_base.py (99%) rename {pybuild => powertrain_build}/signal_inconsistency_check.py (97%) rename {pybuild => powertrain_build}/signal_interfaces.py (97%) rename {pybuild => powertrain_build}/templates/Index_SigCheck_All.html (100%) rename {pybuild => powertrain_build}/templates/Index_SigIf_All.html (100%) rename {pybuild => powertrain_build}/types.py (100%) rename {pybuild => powertrain_build}/unit_configs.py (99%) rename {pybuild => powertrain_build}/user_defined_types.py (99%) rename {pybuild => powertrain_build}/versioncheck.py (95%) rename {pybuild => powertrain_build}/wrapper.py (95%) rename {pybuild => powertrain_build}/xlrd_csv.py (100%) rename {pybuild/interface => powertrain_build/zone_controller}/__init__.py (63%) rename {pybuild => powertrain_build}/zone_controller/calibration.py (99%) rename {pybuild => powertrain_build}/zone_controller/composition_yaml.py (98%) rename test_data/{pybuild => powertrain_build}/test_dids/zc_dids.py (99%) rename tests/{pybuild => powertrain_build}/.pylintrc (100%) rename tests/{pybuild => powertrain_build}/__init__.py (100%) rename tests/{pybuild => powertrain_build}/a2l_merge_data.py (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/CAN-Input.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/CAN-Output.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/EMS-Input.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/EMS-Output.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/LIN-Input.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/LIN-Output.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/Legend.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/Private CAN-Input.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ActiveInterfaces/Private CAN-Output.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/BaseConfig.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/CoreIdNameDefinition_EventIDs.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/CoreIdNameDefinition_FunctionIDs.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/CoreIdNameDefinition_IUMPR.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/CoreIdNameDefinition_Mode$06.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/CoreIdNameDefinition_Ranking.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/DIDIds_FullRange_Float32.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/DIDIds_FullRange_UInt32.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/LabelsplitCfg.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/Mock-gen_allsysteminfo-_get_core_ids.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/Mock-gen_allsysteminfo-_get_dids.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/Mock-unit_configs-get_per_unit_cfg.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/ProjectCfg.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/SPMEMSInterfaceRequirements_ExportedToCSV.xlsm (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/SPM_Codeswitch_Setup.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/SPM_Codeswitch_Setup_PVC.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/VcAesSupM.a2l (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/VcVmcPmm.c (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/VcVmcPmm.e (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/VcVmcPmm__HEP7_OPortMvd_LocalDefs.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/conf.local/interface_data_types.yml (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/config_VcVmcPmm__HEP7.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/expected_signals_in_nvm_structs.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/invalid_unit_cfgs/config_ invalid name.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/invalid_unit_cfgs/config_InvalidConfig.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/invalid_unit_cfgs/config_InvalidJsonData.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/label_split_cfg.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_critical.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_critical_duplicate.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_dcl.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_empty.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_empty_small.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_single_signal.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_small.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_used_positions.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/nvm_structs_ref_wrong_type.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/rasters.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/signalinterface.yaml (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/ConfigDocuments/BaseConfig.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/VcTestRx.yaml (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/config_VcTestRx.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/VcTestTx.yaml (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/config_VcTestTx.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup_Thermal.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_EventIDs.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_FunctionIDs.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPR.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPRDen.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Mode$06.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Ranking.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_Float32.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_Float32.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_UInt32.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_UInt32.csv (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/ProjectCfg.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/DeviceDomains.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/ServiceInterfaces.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/cs-module.yml (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/nvm_structs.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/project_defaults.txt (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/rasters.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test-repo/Projects/CSP/hal_list.yaml (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test.a2l (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test_consumer.a2l (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test_mrg__kalle.a2l (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/test_producer.a2l (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/tl_aux_defines_VmcPmm__HE.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs/Invalid_If_LocalDefs.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs/Invalid_Include_LocalDefs.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs/Valid_Local_Reference_LocalDefs.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs/Valid_Reference_LocalDefs.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs/VcAesSupM__gen3_OPortMvd_LocalDefs.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs/VcDeDa_OPortMvd_LocalDefs.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs/config_VcAesSupM__gen3.json (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs_ec/VcAesSupM__gen3_OPortMvd_LocalDefs.h (100%) rename tests/{pybuild => powertrain_build}/cnfg_files/unit_cfgs_ec/config_VcAesSupM__gen3.json (100%) rename tests/{pybuild => powertrain_build}/common_src_files/Tab1DIntpI1T0.c (100%) rename tests/{pybuild => powertrain_build}/core_cnfg.py (100%) rename tests/{pybuild => powertrain_build}/core_dummy_cnfg.py (100%) rename tests/{pybuild => powertrain_build}/io_cnfg.py (100%) rename tests/{pybuild => powertrain_build}/reference_files/EmptySigCheck.html (100%) rename tests/{pybuild => powertrain_build}/reference_files/EnumTest.m (100%) rename tests/{pybuild => powertrain_build}/reference_files/OPort_defs.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model/VcTestModel.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model/VcTestModel_par.m (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model/VcTestModel_sgp.xml (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model/udt_VcTestModel.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model1/VcTestModel1.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model1/VcTestModel1_par.m (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model1/udt_VcTestModel1.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model2/VcTestModel2.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model2/udt_VcTestModel2.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model3/VcTestModel3.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/SS1/test_model3/udt_VcTestModel3.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/SigIf.html (100%) rename tests/{pybuild => powertrain_build}/reference_files/SigIfAll.html (100%) rename tests/{pybuild => powertrain_build}/reference_files/SimulinkEnum.m (100%) rename tests/{pybuild => powertrain_build}/reference_files/VEA_VED4_SPA.a2l (100%) rename tests/{pybuild => powertrain_build}/reference_files/VcDummy_spm.c (100%) rename tests/{pybuild => powertrain_build}/reference_files/VcDummy_spm.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/VcDummy_spm_with_enum.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/VcExtINI.c (100%) rename tests/{pybuild => powertrain_build}/reference_files/WrongFileNameEnum.m (100%) rename tests/{pybuild => powertrain_build}/reference_files/config_OPort_defs.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/config_VcVmcPmm_OPort.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/config_VcVmcPmm__HEP7.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/config_aux_defs.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/config_combined.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/config_combined_header.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/config_local_defs.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/nvm_structs_ref_dcl.json (100%) rename tests/{pybuild => powertrain_build}/reference_files/ts_test.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_struct_ref.a2l (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_struct_ref.c (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_struct_ref.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_struct_ref_critical_duplicate.a2l (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_struct_ref_critical_duplicate.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_struct_ref_critical_remove.a2l (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_struct_ref_critical_remove.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_structs_critical.c (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_structs_critical.h (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_structs_critical_bosch.a2l (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_structs_critical_denso.a2l (100%) rename tests/{pybuild => powertrain_build}/reference_files/vcc_nvm_structs_ref_used_positions.h (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/C.mdl (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/C_par.m (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/SSA/A/A.mdl (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/SSA/A/A_par.m (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/SSB/B/B.mdl (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/SSB/B/B_par.m (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/SSB/B/test/BB.mdl (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/SSB/B/test/BB_par.m (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/SSB/B1/B1.mdl (100%) rename tests/{pybuild => powertrain_build}/src_files/mdl/SSB/B1/B1_par.m (100%) rename tests/{pybuild => powertrain_build}/src_files/src_file1.c (100%) rename tests/{pybuild => powertrain_build}/src_files/src_file1.h (100%) rename tests/{pybuild => powertrain_build}/sw_cnfg.py (100%) rename tests/{pybuild => powertrain_build}/test_a2l.py (99%) rename tests/{pybuild => powertrain_build}/test_a2l_merge.py (99%) rename tests/{pybuild => powertrain_build}/test_a2l_templates.py (99%) rename tests/{pybuild => powertrain_build}/test_build.py (91%) rename tests/{pybuild => powertrain_build}/test_build_proj_configs.py (94%) rename tests/{pybuild => powertrain_build}/test_check_interface.py (93%) rename tests/{pybuild => powertrain_build}/test_config.py (96%) rename tests/{pybuild => powertrain_build}/test_core.py (98%) rename tests/{pybuild => powertrain_build}/test_core_dummy.py (99%) rename tests/{pybuild => powertrain_build}/test_create_conversion_table.py (97%) rename tests/{pybuild => powertrain_build}/test_dids.py (99%) rename tests/{pybuild => powertrain_build}/test_dummy_spm.py (95%) rename tests/{pybuild => powertrain_build}/test_environmentcheck.py (94%) rename tests/{pybuild => powertrain_build}/test_ext_dbg.py (92%) rename tests/{pybuild => powertrain_build}/test_ext_var.py (97%) rename tests/{pybuild => powertrain_build}/test_feature_configs.py (96%) rename tests/{pybuild => powertrain_build}/test_gen_allsysteminfo.py (95%) rename tests/{pybuild => powertrain_build}/test_gen_label_split.py (95%) rename tests/{pybuild => powertrain_build}/test_handcode_replacer.py (94%) rename tests/{pybuild => powertrain_build}/test_memory_section.py (98%) rename tests/{pybuild => powertrain_build}/test_nvm_def.py (99%) rename tests/{pybuild => powertrain_build}/test_pt_matlab.py (99%) rename tests/{pybuild => powertrain_build}/test_pt_win32.py (98%) rename tests/{pybuild => powertrain_build}/test_read_feat_cnfgs.py (97%) rename tests/{pybuild => powertrain_build}/test_read_sig_ifs.py (95%) rename tests/{pybuild => powertrain_build}/test_sched_funcs.py (93%) rename tests/{pybuild => powertrain_build}/test_sig_if_html_rep.py (98%) rename tests/{pybuild => powertrain_build}/test_sig_if_html_rep_all.py (98%) rename tests/{pybuild => powertrain_build}/test_sig_ifs.py (99%) rename tests/{pybuild => powertrain_build}/test_sig_incons_html_rep.py (99%) rename tests/{pybuild => powertrain_build}/test_sig_incons_html_rep_all.py (99%) rename tests/{pybuild => powertrain_build}/test_signal_inconsistency_check.py (99%) rename tests/{pybuild => powertrain_build}/test_signal_interfaces_yaml.py (96%) rename tests/{pybuild => powertrain_build}/test_signals.py (96%) rename tests/{pybuild => powertrain_build}/test_unit_configs.py (99%) rename tests/{pybuild => powertrain_build}/test_user_defined_types.py (99%) rename tests/{pybuild => powertrain_build}/test_versioncheck.py (91%) diff --git a/MANIFEST.in b/MANIFEST.in index 669e86e..ab8bb29 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ -include pybuild/templates/*.html +include powertrain_build/templates/*.html include test-requirements.txt -include pybuild/matlab_scripts/CodeGen/* -include pybuild/matlab_scripts/helperFunctions/* -include pybuild/matlab_scripts/* +include powertrain_build/matlab_scripts/CodeGen/* +include powertrain_build/matlab_scripts/helperFunctions/* +include powertrain_build/matlab_scripts/* include requirements.txt diff --git a/NOTICE b/NOTICE index 8faf661..0abae78 100644 --- a/NOTICE +++ b/NOTICE @@ -11,7 +11,7 @@ exceptiongroup 1.2.2 : MIT License flake8 7.1.1 : MIT License gitdb 4.0.11 : BSD 3-clause "New" or "Revised" License GitPython 3.1.43 : BSD 3-clause "New" or "Revised" License -idna 3.8 : BSD 3-clause "New" or "Revised" License +idna 3.10 : BSD 3-clause "New" or "Revised" License mccabe 0.7.0 : Expat License NumPy 1.24.4 : BSD 3-clause "New" or "Revised" License Packaging 24.1 : (Apache License 2.0 AND BSD 3-clause "New" or "Revised" License) @@ -49,8 +49,6 @@ GitPython 3.1.43 pypi:GitPython/3.1.43 Copyright (C) 2008, 2009 Michael Trier and contributors, 2010-2015 Sebastian Thiel" Copyright (C) 2008, 2009 Michael Trier and contributorsAll rights reserved Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors -idna 3.8 pypi:idna/3.8 - Copyright (c) 2013-2024, Kim Davies and contributors.All rights reserved mccabe 0.7.0 pypi:mccabe/0.7.0 Copyright © 2011-2013 Tarek Ziade Copyright © 2013 Florent Xicluna @@ -5573,7 +5571,7 @@ third-party archives. --- BSD 3-clause "New" or "Revised" License -(gitdb 4.0.11, GitPython 3.1.43, idna 3.8, NumPy 1.24.4, Packaging 24.1, SciPy 1.9.1, smmap 5.0.1, voluptuous 0.15.2) +(gitdb 4.0.11, GitPython 3.1.43, idna 3.10, NumPy 1.24.4, Packaging 24.1, SciPy 1.9.1, smmap 5.0.1, voluptuous 0.15.2) Copyright (c) , All rights reserved. diff --git a/README.md b/README.md index aff632e..2aa7450 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,23 @@ -# PyBuild +# Powertrain-build A Continuous Integration (CI) build system, testing all configurations where a TargetLink model is used. -## General Information about Pybuild +## General Information about powertrain-build -- PyBuild is fast. +- Powertrain-build is fast. - More parallelization of jobs in the CI system makes it faster. - Code generation is moved to the developer's PC. - Code generation is done once for all projects using pre-processor directives. - C code reviews are now possible in Gerrit. -- PyBuild adds signal consistency checks. +- Powertrain-build adds signal consistency checks. - Unit tests of the build system are introduced. - Its quality is assured. -- PyBuild creates new variable classes with unique code decorations. +- Powertrain-build creates new variable classes with unique code decorations. - Post-processing C code is not necessary. - ASIL-classed variables get declared at the source. - Memory can be optimized at compilation through short addressing different variable classes. - The same models can be used in more than two different suppliers, for instance, SPA2's Core System Platform (CSP). - - PyBuild fixes incorrect handling of NVM variables. + - Powertrain-build fixes incorrect handling of NVM variables. ## Project Structure @@ -25,18 +25,20 @@ A Continuous Integration (CI) build system, testing all configurations where a T - `playbooks/`: Directory where we keep Ansible playbooks that are executed in the jobs we use in this project. -- `pybuild/`: Main directory of the project. All the application source code is kept here. It is divided into different Python modules: +- `powertrain_build/`: Main directory of the project. All the application source code is kept here. It is divided into different Python modules: - `interface/` - `lib/` - `zone_controller/` Also, we keep `static_code/` and `templates/` directories with useful `.c`, `.h`, and `.html` files. -- `tests/`: Directory where we keep the unit tests for our application source code. The tests are structured in a similar way to what we have inside the `pybuild/` directory. Tests for the `interface`, `lib`, and `zone_controller` modules are split into `tests/interface/`, `tests/lib/`, and `tests/zone_controller/`, respectively. Other tests are kept inside the `tests/pybuild/` directory. +- `tests/`: Directory where we keep the unit tests for our application source code. The tests are structured in a similar way to what we have inside the `powertrain_build/` directory. Tests for the `interface`, `lib`, and `zone_controller` modules are split into `tests/interface/`, `tests/lib/`, and `tests/zone_controller/`, respectively. Other tests are kept inside the `tests/powertrain_build/` directory. - `zuul.d/`: Directory where we keep our Zuul jobs. -## How to use Pybuild +## How to use powertrain-build + +See [powertrain-build introduction](./docs/powertrain_build_introduction.md) ## Contributing diff --git a/docs/build_cmd.md b/docs/build_cmd.md index 100fc84..7c22a91 100644 --- a/docs/build_cmd.md +++ b/docs/build_cmd.md @@ -1,8 +1,8 @@ # Run the build command -`pybuild/build.py` is the starting point for generating all the files needed for building a complete SW using the supplier make environment. The script takes one positional argument, and that is a [project_config](project_config.md). +`powertrain_build/build.py` is the starting point for generating all the files needed for building a complete SW using the supplier make environment. The script takes one positional argument, and that is a [project_config](project_config.md). -This script acts as a command line wrapper for [build](../../pybuild/build.py). +This script acts as a command line wrapper for [build](../../powertrain_build/build.py). ```none usage: build.py [-h] [-cd] [-d] [-na] [-if] [-V] proj_config diff --git a/docs/powertrain_build.md b/docs/powertrain_build.md index 0cc5e1a..c088ff5 100644 --- a/docs/powertrain_build.md +++ b/docs/powertrain_build.md @@ -31,7 +31,7 @@ actuation-arbitration-manager-simulink-logic/Projects/Init_PyBuild.m In git bash: ```bash -py -3.6 -m pytools.pybuild_wrapper --codegen --models Models/ICEAES/VcAesTx/VcAesTx.mdl +py -3.6 -m powertrain_build.wrapper --codegen --models Models/ICEAES/VcAesTx/VcAesTx.mdl ``` #### Set Matlab 2017 as Environmental Variable @@ -61,15 +61,15 @@ See picture below for details. #### Code generate with Embedded Coder with Matlab2019b ```python -py -3.6 -m pytools.pybuild_wrapper --codegen --matlab-bin "C:\MATLAB_2019_b\bin\matlab.exe" --models Models/STEER/VcSteer/VcSteer.mdl +py -3.6 -m powertrain_build.wrapper --codegen --matlab-bin "C:\MATLAB_2019_b\bin\matlab.exe" --models Models/STEER/VcSteer/VcSteer.mdl ``` -### Update a TargeLink model to pybuild +### Update a TargeLink model to powertrain_build In git bash: ```python -py -3.6 -m pytools.pybuild_wrapper --update --models Models/ICEAES/VcAesTx/VcAesTx.mdl +py -3.6 -m powertrain_build.wrapper --update --models Models/ICEAES/VcAesTx/VcAesTx.mdl ``` ### Update and Code generate a model @@ -77,7 +77,7 @@ py -3.6 -m pytools.pybuild_wrapper --update --models Models/ICEAES/VcAesTx/VcAes In git bash: ```bash -py -3.6 -m pytools.pybuild_wrapper --update --codegen --models Models/ICEAES/VcAesTx/VcAesTx.mdl +py -3.6 -m powertrain_build.wrapper --update --codegen --models Models/ICEAES/VcAesTx/VcAesTx.mdl ``` ### Code generation and build @@ -85,7 +85,7 @@ py -3.6 -m pytools.pybuild_wrapper --update --codegen --models Models/ICEAES/VcA To code generate and build a complete project *ABC_123*: ```bash -py -3.6 -m pytools.pybuild_wrapper --codegen --build ABC_123 +py -3.6 -m powertrain_build.wrapper --codegen --build ABC_123 ``` ### Build a project @@ -93,13 +93,13 @@ py -3.6 -m pytools.pybuild_wrapper --codegen --build ABC_123 You can either use the wrapper: ```bash -py -3.6 -m pytools.pybuild_wrapper --build ABC_123 +py -3.6 -m powertrain_build.wrapper --build ABC_123 ``` ### Detailed build options ```bash -py -3.6 -m pytools.pybuild_wrapper --help +py -3.6 -m powertrain_build.wrapper --help ``` The powertrain_build wrapper has many options, we'll explain them in detail here: @@ -126,7 +126,7 @@ binary to use. Defaults to C:\MATLABR2017b_x64\bin\matlab.exe. If you have Matlab installed in the wrong place you can use: ```bash -py -3.6 -m pytools.pybuild_wrapper --codegen --models Models/ICEAES/VcAesTx/VcAesTx.mdl --matlab-bin="C:\Program Files\MATLAB\R2017b\bin\matlab.exe" +py -3.6 -m powertrain_build.wrapper --codegen --models Models/ICEAES/VcAesTx/VcAesTx.mdl --matlab-bin="C:\Program Files\MATLAB\R2017b\bin\matlab.exe" ``` NOTE: Building a project (--build) does not work if a model requires a diff --git a/docs/powertrain_build_introduction.md b/docs/powertrain_build_introduction.md index e31ccda..036cb25 100644 --- a/docs/powertrain_build_introduction.md +++ b/docs/powertrain_build_introduction.md @@ -28,5 +28,5 @@ source ./powertrain_build_venv/bin/activate Once activated, you can execute it: ```shell -PYTHONPATH=/pt/pytools://pt/pybuild python -m pytools.pybuild_wrapper build-specific --project-config Projects/CSP/PvcDepDemo/ProjectCfg.json --core-dummy +PYTHONPATH=//powertrain-build python -m powertrain_build.wrapper build-specific --project-config Projects/CSP/PvcDepDemo/ProjectCfg.json --core-dummy ``` diff --git a/docs/signal_interface_tool.md b/docs/signal_interface_tool.md index 7a2bdbc..4232b61 100644 --- a/docs/signal_interface_tool.md +++ b/docs/signal_interface_tool.md @@ -10,7 +10,7 @@ Powertrain Build contains scripts for both signal consistency checks and signal If you type the following in git bash: ```bash -py -3.6 -m pytools.pybuild_wrapper --help +py -3.6 -m powertrain_build.wrapper --help ``` ## Signal Interface report @@ -18,7 +18,7 @@ py -3.6 -m pytools.pybuild_wrapper --help The signal Interface tool generates html reports. The following example shows how to generate the report: ```bash -py -3.6 -m pytools.pybuild_wrapper --build ABC_123 --interface +py -3.6 -m powertrain_build.wrapper --build ABC_123 --interface ``` A project specific report will be available here: `Projects\ABC_123\output\Reports\SigIf.html`. diff --git a/pybuild/__init__.py b/powertrain_build/__init__.py similarity index 57% rename from pybuild/__init__.py rename to powertrain_build/__init__.py index 4b13e0c..a6dc897 100644 --- a/pybuild/__init__.py +++ b/powertrain_build/__init__.py @@ -1,15 +1,15 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Main package of the pybuild application.""" +"""Main package of the powertrain-build application.""" from pbr.version import VersionInfo from pathlib import Path -from pybuild.lib import logger, helper_functions -from pybuild.environmentcheck import check_python_string +from powertrain_build.lib import logger, helper_functions +from powertrain_build.environmentcheck import check_python_string LOGGER = logger.create_logger(__file__) -__version__ = VersionInfo('pt-pybuild').release_string() -LOGGER.info('Current pybuild version is %s', __version__) +__version__ = VersionInfo('powertrain-build').release_string() +LOGGER.info('Current powertrain-build version is %s', __version__) __config_version__ = '0.2.1' __required_python_lower__ = '3.6' __required_python_upper__ = '3.10' @@ -21,13 +21,13 @@ requirement_path = Path( ) if requirement_path.exists(): with requirement_path.open("r") as requirement_file: - expected_package = "pt-pybuild==" + __version__ + expected_package = "powertrain-build==" + __version__ for line in requirement_file: if expected_package in line: - LOGGER.info('PyBuild version matched requirements!') + LOGGER.info('Powertrain-build version matched requirements!') break - elif "pt-pybuild==" in line and expected_package not in line: - LOGGER.warning('PyBuild version does not match requirements!') + elif "powertrain-build==" in line and expected_package not in line: + LOGGER.warning('Powertrain-build version does not match requirements!') break else: diff --git a/pybuild/a2l.py b/powertrain_build/a2l.py similarity index 99% rename from pybuild/a2l.py rename to powertrain_build/a2l.py index efac8fc..de5391b 100644 --- a/pybuild/a2l.py +++ b/powertrain_build/a2l.py @@ -9,8 +9,8 @@ import re import logging from string import Template from pprint import pformat -from pybuild.problem_logger import ProblemLogger -from pybuild.types import a2l_type, a2l_range +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.types import a2l_type, a2l_range LOG = logging.getLogger() diff --git a/pybuild/a2l_merge.py b/powertrain_build/a2l_merge.py similarity index 99% rename from pybuild/a2l_merge.py rename to powertrain_build/a2l_merge.py index c7ff65b..ee56942 100644 --- a/pybuild/a2l_merge.py +++ b/powertrain_build/a2l_merge.py @@ -9,9 +9,9 @@ import os import re from string import Template -from pybuild.lib.helper_functions import deep_dict_update -from pybuild.problem_logger import ProblemLogger -from pybuild.a2l_templates import A2lProjectTemplate, A2lSilverTemplate +from powertrain_build.lib.helper_functions import deep_dict_update +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.a2l_templates import A2lProjectTemplate, A2lSilverTemplate class A2lMerge(ProblemLogger): diff --git a/pybuild/a2l_templates.py b/powertrain_build/a2l_templates.py similarity index 100% rename from pybuild/a2l_templates.py rename to powertrain_build/a2l_templates.py diff --git a/pybuild/build.py b/powertrain_build/build.py similarity index 93% rename from pybuild/build.py rename to powertrain_build/build.py index 561fb22..ca7fd8f 100644 --- a/pybuild/build.py +++ b/powertrain_build/build.py @@ -4,7 +4,7 @@ # -*- coding: utf-8 -*- """Python module used for building a Vcc SPM SW release. -This is the entry point to pybuild which includes all other needed modules. +This is the entry point to powertrain-build which includes all other needed modules. Loads configuration files and sequences the code generation steps. """ @@ -17,31 +17,31 @@ import time from os.path import join as pjoin from pathlib import Path -from pybuild import __config_version__, __version__, build_defs -from pybuild.a2l_merge import A2lMerge -from pybuild.build_proj_config import BuildProjConfig -from pybuild.core import Core, HICore, ZCCore -from pybuild.core_dummy import CoreDummy -from pybuild.create_conversion_table import create_conversion_table -from pybuild.dids import DIDs, HIDIDs, ZCDIDs -from pybuild.dummy import DummyVar -from pybuild.dummy_spm import DummySpm -from pybuild.ext_dbg import ExtDbg -from pybuild.ext_var import ExtVarCsv, ExtVarYaml -from pybuild.feature_configs import FeatureConfigs -from pybuild.lib.helper_functions import get_repo_root, merge_dicts -from pybuild.memory_section import MemorySection -from pybuild.nvm_def import NVMDef -from pybuild.problem_logger import ProblemLogger -from pybuild.replace_compu_tab_ref import replace_tab_verb -from pybuild.sched_funcs import SchedFuncs -from pybuild.signal_if_html_rep import SigIfHtmlReport -from pybuild.signal_incons_html_rep import SigConsHtmlReport -from pybuild.signal_interfaces import CsvSignalInterfaces, YamlSignalInterfaces -from pybuild.unit_configs import CodeGenerators, UnitConfigs -from pybuild.user_defined_types import UserDefinedTypes -from pybuild.zone_controller.calibration import ZoneControllerCalibration -from pybuild.zone_controller.composition_yaml import CompositionYaml +from powertrain_build import __config_version__, __version__, build_defs +from powertrain_build.a2l_merge import A2lMerge +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.core import Core, HICore, ZCCore +from powertrain_build.core_dummy import CoreDummy +from powertrain_build.create_conversion_table import create_conversion_table +from powertrain_build.dids import DIDs, HIDIDs, ZCDIDs +from powertrain_build.dummy import DummyVar +from powertrain_build.dummy_spm import DummySpm +from powertrain_build.ext_dbg import ExtDbg +from powertrain_build.ext_var import ExtVarCsv, ExtVarYaml +from powertrain_build.feature_configs import FeatureConfigs +from powertrain_build.lib.helper_functions import get_repo_root, merge_dicts +from powertrain_build.memory_section import MemorySection +from powertrain_build.nvm_def import NVMDef +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.replace_compu_tab_ref import replace_tab_verb +from powertrain_build.sched_funcs import SchedFuncs +from powertrain_build.signal_if_html_rep import SigIfHtmlReport +from powertrain_build.signal_incons_html_rep import SigConsHtmlReport +from powertrain_build.signal_interfaces import CsvSignalInterfaces, YamlSignalInterfaces +from powertrain_build.unit_configs import CodeGenerators, UnitConfigs +from powertrain_build.user_defined_types import UserDefinedTypes +from powertrain_build.zone_controller.calibration import ZoneControllerCalibration +from powertrain_build.zone_controller.composition_yaml import CompositionYaml LOG = logging.getLogger() REPO_ROOT = get_repo_root() @@ -631,7 +631,7 @@ def propagate_tag_name(build_cfg, tag_name, problem_logger): Args: build_cfg (BuildProjConfig): Build project class holding where files should be stored. tag_name (str): git tag name. - problem_logger (object): logger for pybuild. + problem_logger (object): logger for powertrain_build. """ LOG.info("******************************************************") LOG.info("Propagating tag name: %s", tag_name) @@ -657,58 +657,58 @@ def propagate_tag_name(build_cfg, tag_name, problem_logger): def add_args(parser): - """Add command line arguments for pybuild. + """Add command line arguments for powertrain_build. - This is useful when pybuild should be run through a command line wrapper function. + This is useful when powertrain-build should be run through a command line wrapper function. Args: parser (argparse.ArgumentParser): Parser instance to add arguments to. """ - pybuild_parser = parser.add_argument_group("pybuild arguments") - pybuild_parser.add_argument( + powertrain_build_parser = parser.add_argument_group("powertrain-build arguments") + powertrain_build_parser.add_argument( "--project-config", required=True, help="Project root configuration file" ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--generate-system-info", action="store_true", help="Generate AllSystemInfo.mat" ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--generate-custom-conv-tab", default=None, help="Path to conversion table file. Useful for TargetLink enums in A2L file.", ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--core-dummy", action="store_true", help="Generate core dummy code to enable integration with old supplier code", ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--debug", action="store_true", help="Activate the debug log" ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--no-abort", action="store_true", help="Do not abort due to errors" ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--no-nvm-a2l", action="store_true", help="Do not generate a2l file for NVM structs", ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--complete-a2l", action="store_true", help="Generate A2L with project info" ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--silver-a2l", action="store_true", help="Generate A2L file with Silver patching. Complete A2L argument takes precedence.", ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--interface", action="store_true", help="Generate interface report" ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--generate-rte-checkpoint-calls", action="store_true", help="Generate RTE function checkpoint calls", ) - pybuild_parser.add_argument( + powertrain_build_parser.add_argument( "--version", action="version", version=f"%(prog)s {__version__}", @@ -767,7 +767,7 @@ def build( setup_logging(build_cfg.get_log_dst_dir(), problem_logger, debug, quiet) LOG.info("Starting build") - LOG.info("pybuild version is: %s", __version__) + LOG.info("powertrain_build version is: %s", __version__) LOG.info("Project/Model config file version is: %s", __config_version__) LOG.info("Read SPM code switches") start_time = time.time() @@ -891,7 +891,7 @@ def build( # Generate AllSystemInfo.mat for DocGen compatibility if generate_system_info: - from pybuild.gen_allsysteminfo import GenAllSystemInfo + from powertrain_build.gen_allsysteminfo import GenAllSystemInfo gen_all_system_info = GenAllSystemInfo(signal_if, unit_cfg) gen_all_system_info.build() @@ -922,7 +922,7 @@ def build( memory_section.generate_required_header_files() # Propagate tag name for release builds - # TAG_NAME is set in release -> release-compile-denso/release-ecmsildll -> pybuild.build + # TAG_NAME is set in release -> release-compile-denso/release-ecmsildll -> powertrain_build.build tag_name = os.environ.get("TAG_NAME", "") if tag_name and ecu_supplier == "Denso": propagate_tag_name(build_cfg, tag_name, problem_logger) diff --git a/pybuild/build_defs.py b/powertrain_build/build_defs.py similarity index 100% rename from pybuild/build_defs.py rename to powertrain_build/build_defs.py diff --git a/pybuild/build_proj_config.py b/powertrain_build/build_proj_config.py similarity index 99% rename from pybuild/build_proj_config.py rename to powertrain_build/build_proj_config.py index 3b750cd..e2105f2 100644 --- a/pybuild/build_proj_config.py +++ b/powertrain_build/build_proj_config.py @@ -11,8 +11,8 @@ import shutil import pathlib from pprint import pformat -from pybuild.lib.helper_functions import deep_dict_update -from pybuild.versioncheck import Version +from powertrain_build.lib.helper_functions import deep_dict_update +from powertrain_build.versioncheck import Version class BuildProjConfig: diff --git a/pybuild/check_interface.py b/powertrain_build/check_interface.py similarity index 98% rename from pybuild/check_interface.py rename to powertrain_build/check_interface.py index 9a94a19..af5670d 100644 --- a/pybuild/check_interface.py +++ b/powertrain_build/check_interface.py @@ -15,9 +15,9 @@ from pathlib import Path import git -from pybuild.interface.application import Application, Model, get_active_signals -from pybuild.interface.ems import CsvEMS -from pybuild.lib import logger +from powertrain_build.interface.application import Application, Model, get_active_signals +from powertrain_build.interface.ems import CsvEMS +from powertrain_build.lib import logger LOGGER = logger.create_logger("Check interface") @@ -358,14 +358,14 @@ def parse_args(): Mismatches in min, max or unit gives warnings Examples: - py -3.6 -m pybuild.check_interface models_in_projects \ + py -3.6 -m powertrain_build.check_interface models_in_projects \ --projects Checks models in Models/ModelGroup against ProjectOne and ProjectTwo in the folder Projects - py -3.6 -m pybuild.check_interface models --models + py -3.6 -m powertrain_build.check_interface models --models Checks models ModelOne and ModelTwo against all other models in the folder Models - py -3.6 -m pybuild.check_interface projects \ + py -3.6 -m powertrain_build.check_interface projects \ --projects ProjectOne ProjectTwo ProjectThree Checks the interfaces of ProjectOne, ProjectTwo and ProjectThree in the folder Projects """, diff --git a/pybuild/config.py b/powertrain_build/config.py similarity index 99% rename from pybuild/config.py rename to powertrain_build/config.py index ac65238..9ac44cd 100644 --- a/pybuild/config.py +++ b/powertrain_build/config.py @@ -12,7 +12,7 @@ import os import re from pprint import pformat -from pybuild.lib import logger +from powertrain_build.lib import logger LOGGER = logger.create_logger('config') diff --git a/pybuild/core.py b/powertrain_build/core.py similarity index 99% rename from pybuild/core.py rename to powertrain_build/core.py index 58890c1..337d5e3 100644 --- a/pybuild/core.py +++ b/powertrain_build/core.py @@ -12,9 +12,9 @@ import time from collections import defaultdict from pathlib import Path from ruamel.yaml import YAML -from pybuild import build_defs -from pybuild.xlrd_csv import WorkBook -from pybuild.problem_logger import ProblemLogger +from powertrain_build import build_defs +from powertrain_build.xlrd_csv import WorkBook +from powertrain_build.problem_logger import ProblemLogger class Core(ProblemLogger): diff --git a/pybuild/core_dummy.py b/powertrain_build/core_dummy.py similarity index 98% rename from pybuild/core_dummy.py rename to powertrain_build/core_dummy.py index 8c8ba3a..36e16b4 100644 --- a/pybuild/core_dummy.py +++ b/powertrain_build/core_dummy.py @@ -10,10 +10,10 @@ updated the core with all the needed core id definitions. import os -from pybuild import build_defs -from pybuild.problem_logger import ProblemLogger -from pybuild.types import get_ec_type -from pybuild.unit_configs import CodeGenerators +from powertrain_build import build_defs +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.types import get_ec_type +from powertrain_build.unit_configs import CodeGenerators class CoreDummy(ProblemLogger): diff --git a/pybuild/create_conversion_table.py b/powertrain_build/create_conversion_table.py similarity index 100% rename from pybuild/create_conversion_table.py rename to powertrain_build/create_conversion_table.py diff --git a/pybuild/dids.py b/powertrain_build/dids.py similarity index 99% rename from pybuild/dids.py rename to powertrain_build/dids.py index 0c0d966..20ac35d 100644 --- a/pybuild/dids.py +++ b/powertrain_build/dids.py @@ -12,11 +12,11 @@ import csv import os from pathlib import Path from ruamel.yaml import YAML -from pybuild import build_defs -from pybuild.lib.helper_functions import deep_dict_update -from pybuild.problem_logger import ProblemLogger -from pybuild.types import byte_size, get_ec_type, get_float32_types -from pybuild.unit_configs import CodeGenerators +from powertrain_build import build_defs +from powertrain_build.lib.helper_functions import deep_dict_update +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.types import byte_size, get_ec_type, get_float32_types +from powertrain_build.unit_configs import CodeGenerators def get_dids_in_prj(unit_cfgs): diff --git a/pybuild/dummy.py b/powertrain_build/dummy.py similarity index 55% rename from pybuild/dummy.py rename to powertrain_build/dummy.py index 0363658..2284622 100644 --- a/pybuild/dummy.py +++ b/powertrain_build/dummy.py @@ -3,11 +3,11 @@ """Module for generation of c- and a2l-file with dummy signal declarations.""" -import pybuild.build_defs as bd +import powertrain_build.build_defs as bd -from pybuild.types import byte_size_string, get_bitmask -from pybuild.a2l import A2l -from pybuild.problem_logger import ProblemLogger +from powertrain_build.types import byte_size_string, get_bitmask +from powertrain_build.a2l import A2l +from powertrain_build.problem_logger import ProblemLogger class DummyVar(ProblemLogger): @@ -36,10 +36,11 @@ class DummyVar(ProblemLogger): Args: data_type (str): Data type. Returns: - byte_size_string(pybuild.types.byte_size_string): Return result of pybuild.types.byte_size_string. + byte_size_string(powertrain_build.types.byte_size_string): Return result of + powertrain_build.types.byte_size_string. """ if data_type in self._enumerations: - return byte_size_string(self._enumerations[data_type]['underlying_data_type']) + return byte_size_string(self._enumerations[data_type]["underlying_data_type"]) return byte_size_string(data_type) def _restruct_input_data(self): @@ -48,112 +49,109 @@ class DummyVar(ProblemLogger): This will be used for declaring the variables and generating the A2L-file """ - ext_out = {var: data for ioclass, vardict in self._ext_dict.items() - if ioclass.endswith('-Output') for var, data in vardict.items()} + ext_out = { + var: data + for ioclass, vardict in self._ext_dict.items() + if ioclass.endswith("-Output") + for var, data in vardict.items() + } ext_ = {} - for var in self._res_dict['sigs']['ext']['missing']: - self.debug('ext: %s', var) + for var in self._res_dict["sigs"]["ext"]["missing"]: + self.debug("ext: %s", var) if var in ext_out: data = ext_out[var] - self.debug('ext_data: %s', data) + self.debug("ext_data: %s", data) ext_[var] = data int_ = {} - for unit in self._res_dict['sigs']['int']: - for var in self._res_dict['sigs']['int'][unit]['missing']: - if var not in ext_ and var in self._unit_vars['inports']: - data = self._unit_vars['inports'][var][unit] + for unit in self._res_dict["sigs"]["int"]: + for var in self._res_dict["sigs"]["int"][unit]["missing"]: + if var not in ext_ and var in self._unit_vars["inports"]: + data = self._unit_vars["inports"][var][unit] int_[var] = data for var, data in int_.items(): - data_type_size = self._get_byte_size_string(data['type']) + data_type_size = self._get_byte_size_string(data["type"]) self._int_vars.setdefault(data_type_size, {})[var] = data for var, data in ext_.items(): - data_type_size = self._get_byte_size_string(data['type']) + data_type_size = self._get_byte_size_string(data["type"]) self._ext_vars.setdefault(data_type_size, {})[var] = data def _a2l_dict(self): """Return a dict defining all parameters for a2l-generation.""" - res = { - 'vars': {}, - 'function': 'VcDummy' - } + res = {"vars": {}, "function": "VcDummy"} for inp in [self._ext_vars]: for sizes in inp.values(): for var, data in sizes.items(): - if data['type'] in self._enumerations: - data_type = self._enumerations[data['type']]['underlying_data_type'] + if data["type"] in self._enumerations: + data_type = self._enumerations[data["type"]]["underlying_data_type"] else: - data_type = data['type'] + data_type = data["type"] - resv = res['vars'] - resv.setdefault(var, {})['a2l_data'] = { - 'bitmask': get_bitmask(data_type), - 'description': data.get('description', ''), - 'lsb': '2^0', - 'max': data.get('max'), - 'min': data.get('min'), - 'offset': '0', - 'unit': data['unit'], - 'x_axis': None, - 'y_axis': None - } - resv[var]['array'] = [] - resv[var]['function'] = ['VcEc'] - resv[var]['var'] = { - 'cvc_type': 'CVC_DISP', - 'type': data_type, - 'var': var + resv = res["vars"] + resv.setdefault(var, {})["a2l_data"] = { + "bitmask": get_bitmask(data_type), + "description": data.get("description", ""), + "lsb": "2^0", + "max": data.get("max"), + "min": data.get("min"), + "offset": "0", + "unit": data["unit"], + "x_axis": None, + "y_axis": None, } + resv[var]["array"] = [] + resv[var]["function"] = ["VcEc"] + resv[var]["var"] = {"cvc_type": "CVC_DISP", "type": data_type, "var": var} return res @classmethod def _generate_var_defs(cls, fh_c, vars, enums, comment): """Generate the variable definitions.""" - fh_c.write(f'\n{comment}\n\n') + fh_c.write(f"\n{comment}\n\n") for varsize in sorted(vars.keys(), reverse=True): - fh_c.write(f'/* Variables of size {varsize} bytes */\n\n') + fh_c.write(f"/* Variables of size {varsize} bytes */\n\n") var_defs = vars[varsize] for var in sorted(var_defs.keys()): data = var_defs[var] - if data['type'] in enums: - if enums[data['type']]['default_value'] is not None: - init_value = enums[data['type']]['default_value'] + if data["type"] in enums: + if enums[data["type"]]["default_value"] is not None: + init_value = enums[data["type"]]["default_value"] else: - cls.warning('Initializing enumeration %s to "zero".', data['type']) - init_value = [k for k, v in enums[data['type']]['members'].items() if v == 0][0] + cls.warning('Initializing enumeration %s to "zero".', data["type"]) + init_value = [k for k, v in enums[data["type"]]["members"].items() if v == 0][0] fh_c.write(f"{data['type']} {var} = {init_value};\n") else: fh_c.write(f"{data['type']} {var} = {0};\n") - fh_c.write('\n') + fh_c.write("\n") @classmethod def _generate_var_initialization(cls, fh_c, vars, comment): """Generate the variable initializations.""" - fh_c.write(f'\n{comment}\n\n') - fh_c.write('\nvoid RESTART_VcDummy(void)\n{\n') + fh_c.write(f"\n{comment}\n\n") + fh_c.write("\nvoid RESTART_VcDummy(void)\n{\n") for varsize in sorted(vars.keys(), reverse=True): var_defs = vars[varsize] for var in sorted(var_defs.keys()): fh_c.write(f" {var} = {0};\n") - fh_c.write('}\n') + fh_c.write("}\n") def _generate_c_file(self, filename): """Generate the c-file defining all missing input variables.""" - general_includes = '' + general_includes = "" general_includes += self._unit_cfg.base_types_headers for common_header_file in self._common_header_files: general_includes += f'#include "{common_header_file}"\n' - general_includes += '\n' + general_includes += "\n" - with open(filename, 'w', encoding="utf-8") as fh_c: + with open(filename, "w", encoding="utf-8") as fh_c: fh_c.write(general_includes) fh_c.write(f'#include "{bd.CVC_DISP_START}"\n\n') - self._generate_var_defs(fh_c, self._ext_vars, self._enumerations, '/** Missing external signals **/') + self._generate_var_defs(fh_c, self._ext_vars, self._enumerations, "/** Missing external signals **/") fh_c.write(f'\n#include "{bd.CVC_DISP_END}"\n') - self.info('Generated %s', filename) + self.info("Generated %s", filename) def generate_file(self, filename): """Generate the files for defining all missing input variables.""" self._restruct_input_data() - self._generate_c_file(filename + '.c') + self._generate_c_file(filename + ".c") a2l_dict = self._a2l_dict() - A2l(a2l_dict, self._prj_cfg).gen_a2l(filename + '.a2l') + A2l(a2l_dict, self._prj_cfg).gen_a2l(filename + ".a2l") diff --git a/pybuild/dummy_spm.py b/powertrain_build/dummy_spm.py similarity index 96% rename from pybuild/dummy_spm.py rename to powertrain_build/dummy_spm.py index f265fb3..31a8685 100644 --- a/pybuild/dummy_spm.py +++ b/powertrain_build/dummy_spm.py @@ -7,17 +7,17 @@ import os from operator import itemgetter import math -import pybuild.build_defs as bd -from pybuild import signal -from pybuild.a2l import A2l -from pybuild.problem_logger import ProblemLogger -from pybuild.types import byte_size, get_bitmask +import powertrain_build.build_defs as bd +from powertrain_build import signal +from powertrain_build.a2l import A2l +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.types import byte_size, get_bitmask class DummySpm(ProblemLogger): """Generate c-files which defines missing outport variables in the model out-port interface. - The models declare all in-ports as 'external' and pybuild will then + The models declare all in-ports as 'external' and powertrain-build will then generate any missing outports in the correct #if/#endif guards here. One c-file per outport origin model should be generated. @@ -69,7 +69,7 @@ class DummySpm(ProblemLogger): Args: data_type (str): Data type. Returns: - byte_size(pybuild.types.byte_size): Return result of pybuild.types.byte_size. + byte_size(powertrain_build.types.byte_size): Return result of powertrain_build.types.byte_size. """ if data_type in self._enumerations: return byte_size(self._enumerations[data_type]['underlying_data_type']) diff --git a/pybuild/environmentcheck.py b/powertrain_build/environmentcheck.py similarity index 97% rename from pybuild/environmentcheck.py rename to powertrain_build/environmentcheck.py index 0e5b692..f77e9b6 100644 --- a/pybuild/environmentcheck.py +++ b/powertrain_build/environmentcheck.py @@ -13,7 +13,7 @@ def check_python_string(python_lower, python_upper=None): python_lower (str): Required lower bound for Python version. python_upper (str): Optional upper bound for Python version. Raises: - RuntimeError: If current Python executable is not compatible with pybuild. + RuntimeError: If current Python executable is not compatible with powertrain_build. """ versions = [_split_version(python_lower)] @@ -29,7 +29,7 @@ def check_python_tuple(python_lower, python_upper=None): python_lower (2-tuple): Required lower bound for Python version. python_upper (2-tuple): Optional upper bound for Python version. Raises: - RuntimeError: If current Python executable is not compatible with pybuild. + RuntimeError: If current Python executable is not compatible with powertrain_build. """ cur_version = sys.version_info[:2] diff --git a/pybuild/ext_dbg.py b/powertrain_build/ext_dbg.py similarity index 97% rename from pybuild/ext_dbg.py rename to powertrain_build/ext_dbg.py index 9bb21d1..74269e0 100644 --- a/pybuild/ext_dbg.py +++ b/powertrain_build/ext_dbg.py @@ -11,10 +11,10 @@ TODO: Check if all IO parameters in SPMEMSInterfaceRequirements.xlsx defined as import os import re -from pybuild import build_defs -from pybuild.types import byte_size_string, get_bitmask, a2l_range -from pybuild.a2l import A2l -from pybuild.problem_logger import ProblemLogger +from powertrain_build import build_defs +from powertrain_build.types import byte_size_string, get_bitmask, a2l_range +from powertrain_build.a2l import A2l +from powertrain_build.problem_logger import ProblemLogger class ExtDbg(ProblemLogger): diff --git a/pybuild/ext_var.py b/powertrain_build/ext_var.py similarity index 71% rename from pybuild/ext_var.py rename to powertrain_build/ext_var.py index ae2fe25..d76e025 100644 --- a/pybuild/ext_var.py +++ b/powertrain_build/ext_var.py @@ -4,10 +4,10 @@ # -*- coding: utf-8 -*- """Module containing classes for VCC - Supplier signal interface.""" -from pybuild import build_defs -from pybuild.types import byte_size_string, get_bitmask -from pybuild.a2l import A2l -from pybuild.problem_logger import ProblemLogger +from powertrain_build import build_defs +from powertrain_build.types import byte_size_string, get_bitmask +from powertrain_build.a2l import A2l +from powertrain_build.problem_logger import ProblemLogger class ExtVarBase(ProblemLogger): @@ -24,9 +24,16 @@ class ExtVarBase(ProblemLogger): INPORT_INDEX = 0 OUTPORT_INDEX = 1 - __data_type_size = {'Float32': '4', 'UInt32': '4', 'Int32': '4', - 'UInt16': '2', 'Int16': '2', - 'UInt8': '1', 'Int8': '1', 'Bool': '1'} + __data_type_size = { + "Float32": "4", + "UInt32": "4", + "Int32": "4", + "UInt16": "2", + "Int16": "2", + "UInt8": "1", + "Int8": "1", + "Bool": "1", + } def __init__(self, variable_dict, prj_cfg, unit_cfg, user_defined_types, integrity_level=build_defs.ASIL_QM): """Constructor. @@ -52,10 +59,10 @@ class ExtVarBase(ProblemLogger): Args: integrity_level (str): integrity level of the unit from 'A' to 'D' or 'QM' """ - self._disp_start = integrity_level['CVC']['DISP']['START'] - self._disp_end = integrity_level['CVC']['DISP']['END'] - self._decl_start = integrity_level['PREDECL']['DISP']['START'] - self._decl_end = integrity_level['PREDECL']['DISP']['END'] + self._disp_start = integrity_level["CVC"]["DISP"]["START"] + self._disp_end = integrity_level["CVC"]["DISP"]["END"] + self._decl_start = integrity_level["PREDECL"]["DISP"]["START"] + self._decl_end = integrity_level["PREDECL"]["DISP"]["END"] def _get_byte_size_string(self, data_type): """Get byte size of a data type as string. @@ -64,10 +71,11 @@ class ExtVarBase(ProblemLogger): Args: data_type (str): Data type. Returns: - byte_size_string(pybuild.types.byte_size_string): Return result of pybuild.types.byte_size_string. + byte_size_string(powertrain_build.types.byte_size_string): Return result of + powertrain_build.types.byte_size_string. """ if data_type in self._enumerations: - return byte_size_string(self._enumerations[data_type]['underlying_data_type']) + return byte_size_string(self._enumerations[data_type]["underlying_data_type"]) return byte_size_string(data_type) def _get_bitmask(self, data_type): @@ -77,10 +85,10 @@ class ExtVarBase(ProblemLogger): Args: data_type (str): Data type. Returns: - get_bitmask(pybuild.types.get_bitmask): Return result of pybuild.types.get_bitmask. + get_bitmask(powertrain_build.types.get_bitmask): Return result of powertrain_build.types.get_bitmask. """ if data_type in self._enumerations: - return get_bitmask(self._enumerations[data_type]['underlying_data_type']) + return get_bitmask(self._enumerations[data_type]["underlying_data_type"]) return get_bitmask(data_type) def _restruct_input_data(self): @@ -105,34 +113,27 @@ class ExtVarBase(ProblemLogger): def _a2l_dict(self): """Return a dict defining all parameters for a2l-generation.""" - res = { - 'vars': {}, - 'function': 'VcExtVar' - } + res = {"vars": {}, "function": "VcExtVar"} for inp in self.EXTERNAL_INPORT_TYPES: if inp in self._var_dict: for var, data in self._var_dict[inp].items(): if data[self.TYPE_NAME] in self._enumerations: - data_type = self._enumerations[data[self.TYPE_NAME]]['underlying_data_type'] + data_type = self._enumerations[data[self.TYPE_NAME]]["underlying_data_type"] else: data_type = data[self.TYPE_NAME] - resv = res['vars'] - resv.setdefault(var, {})['a2l_data'] = self.get_a2l_format(data) - resv[var]['array'] = [] - resv[var]['function'] = ['VcEc'] - resv[var]['var'] = { - 'cvc_type': 'CVC_DISP', - 'type': data_type, - 'var': var - } + resv = res["vars"] + resv.setdefault(var, {})["a2l_data"] = self.get_a2l_format(data) + resv[var]["array"] = [] + resv[var]["function"] = ["VcEc"] + resv[var]["var"] = {"cvc_type": "CVC_DISP", "type": data_type, "var": var} return res def _generate_c_file(self, path): """Generate the c-file defining all the supplier input signals.""" - header = path.with_suffix('.h').name + header = path.with_suffix(".h").name var_set = set() - with path.open('w') as fh_c: + with path.open("w") as fh_c: fh_c.write(f'#include "{header}"\n') fh_c.write(f'#include "{self._disp_start}"\n\n') for data_type_s, ext_vars in self._ext_vars[self.INPORT_INDEX].items(): @@ -142,27 +143,27 @@ class ExtVarBase(ProblemLogger): if var not in var_set: fh_c.write(f"CVC_DISP {data[self.TYPE_NAME]} {var} = {data['init']};\n") var_set.add(var) - fh_c.write('\n') + fh_c.write("\n") fh_c.write(f'\n#include "{self._disp_end}"\n') - self.info('Generated %s', path.name) + self.info("Generated %s", path.name) def _generate_h_file(self, path): """Generate header file externally declaring interface signals.""" filename = path.stem guard = f"{filename.upper()}_H" var_set = set() - with path.open('w') as fh_c: - fh_c.write(f'#ifndef {guard}\n') - fh_c.write(f'#define {guard}\n') - fh_c.write('#define CVC_DISP\n') + with path.open("w") as fh_c: + fh_c.write(f"#ifndef {guard}\n") + fh_c.write(f"#define {guard}\n") + fh_c.write("#define CVC_DISP\n") fh_c.write(self._unit_cfg.base_types_headers) for common_header_file in self._common_header_files: fh_c.write(f'#include "{common_header_file}"\n') - fh_c.write('\n') + fh_c.write("\n") fh_c.write(f'#include "{self._decl_start}"\n') - fh_c.write('/* VCC Inports */\n') + fh_c.write("/* VCC Inports */\n") for data_type_s, ext_vars in self._ext_vars[self.INPORT_INDEX].items(): fh_c.write(f"/* Variables of size {data_type_s} bytes */\n\n") for var in sorted(ext_vars.keys()): @@ -170,9 +171,9 @@ class ExtVarBase(ProblemLogger): data = ext_vars[var] fh_c.write(f"extern CVC_DISP {data[self.TYPE_NAME]} {var};\n") var_set.add(var) - fh_c.write('\n') + fh_c.write("\n") - fh_c.write('/* VCC Outports */\n') + fh_c.write("/* VCC Outports */\n") for data_type_s, ext_vars in self._ext_vars[self.OUTPORT_INDEX].items(): fh_c.write(f"/* Variables of size {data_type_s} bytes */\n\n") for var in sorted(ext_vars.keys()): @@ -180,22 +181,22 @@ class ExtVarBase(ProblemLogger): data = ext_vars[var] fh_c.write(f"extern CVC_DISP {data[self.TYPE_NAME]} {var};\n") var_set.add(var) - fh_c.write('\n') + fh_c.write("\n") fh_c.write(f'#include "{self._decl_end}"\n') - fh_c.write('#endif\n') - self.info('Generated %s', path.name) + fh_c.write("#endif\n") + self.info("Generated %s", path.name) def generate_files(self, path): """Generate the c- and a2l-file for defining all the supplier input variables.""" self._restruct_input_data() if not self._ext_vars[0] and not self._ext_vars[1]: - self.info(f'Skipping {path.name} as there were no corresponding vars.') + self.info(f"Skipping {path.name} as there were no corresponding vars.") return - self._generate_c_file(path.with_suffix('.c')) - self._generate_h_file(path.with_suffix('.h')) + self._generate_c_file(path.with_suffix(".c")) + self._generate_h_file(path.with_suffix(".h")) a2l_dict = self._a2l_dict() a2l = A2l(a2l_dict, self._prj_cfg) - a2l.gen_a2l(path.with_suffix('.a2l')) + a2l.gen_a2l(path.with_suffix(".a2l")) class ExtVarCsv(ExtVarBase): @@ -228,9 +229,10 @@ class ExtVarCsv(ExtVarBase): 'xxx-Output': ... } """ - EXTERNAL_INPORT_TYPES = ['EMS-Input', 'CAN-Input', 'Private CAN-Input', 'LIN-Input'] - EXTERNAL_OUTPORT_TYPES = ['EMS-Output', 'CAN-Output', 'Private CAN-Output', 'LIN-Output'] - TYPE_NAME = 'type' + + EXTERNAL_INPORT_TYPES = ["EMS-Input", "CAN-Input", "Private CAN-Input", "LIN-Input"] + EXTERNAL_OUTPORT_TYPES = ["EMS-Output", "CAN-Output", "Private CAN-Output", "LIN-Output"] + TYPE_NAME = "type" def get_a2l_format(self, data): """Get a2l format. @@ -241,15 +243,15 @@ class ExtVarCsv(ExtVarBase): dict: A2l format dictionary. """ return { - 'bitmask': self._get_bitmask(data[self.TYPE_NAME]), - 'description': data['description'], - 'lsb': '2^0', - 'max': data['max'], - 'min': data['min'], - 'offset': '0', - 'unit': data['unit'], - 'x_axis': None, - 'y_axis': None + "bitmask": self._get_bitmask(data[self.TYPE_NAME]), + "description": data["description"], + "lsb": "2^0", + "max": data["max"], + "min": data["min"], + "offset": "0", + "unit": data["unit"], + "x_axis": None, + "y_axis": None, } @@ -271,9 +273,10 @@ class ExtVarYaml(ExtVarBase): 'status': {}, } """ - EXTERNAL_INPORT_TYPES = ['input', 'status'] - EXTERNAL_OUTPORT_TYPES = ['output'] - TYPE_NAME = 'variable_type' + + EXTERNAL_INPORT_TYPES = ["input", "status"] + EXTERNAL_OUTPORT_TYPES = ["output"] + TYPE_NAME = "variable_type" def get_a2l_format(self, data): """Get a2l format. @@ -284,13 +287,13 @@ class ExtVarYaml(ExtVarBase): dict: A2l format dictionary. """ return { - 'bitmask': self._get_bitmask(data[self.TYPE_NAME]), - 'description': data['description'], - 'lsb': '2^0', - 'max': data['range']['max'], - 'min': data['range']['min'], - 'offset': '0', - 'unit': data['unit'], - 'x_axis': None, - 'y_axis': None + "bitmask": self._get_bitmask(data[self.TYPE_NAME]), + "description": data["description"], + "lsb": "2^0", + "max": data["range"]["max"], + "min": data["range"]["min"], + "offset": "0", + "unit": data["unit"], + "x_axis": None, + "y_axis": None, } diff --git a/pybuild/feature_configs.py b/powertrain_build/feature_configs.py similarity index 98% rename from pybuild/feature_configs.py rename to powertrain_build/feature_configs.py index 0b005ee..6509653 100644 --- a/pybuild/feature_configs.py +++ b/powertrain_build/feature_configs.py @@ -10,9 +10,9 @@ import os import re from pprint import pformat -from pybuild.lib.helper_functions import deep_dict_update -from pybuild.problem_logger import ProblemLogger -from pybuild.xlrd_csv import WorkBook +from powertrain_build.lib.helper_functions import deep_dict_update +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.xlrd_csv import WorkBook class FeatureConfigs(ProblemLogger): diff --git a/pybuild/gen_allsysteminfo.py b/powertrain_build/gen_allsysteminfo.py similarity index 97% rename from pybuild/gen_allsysteminfo.py rename to powertrain_build/gen_allsysteminfo.py index 626a0f6..cd4bfba 100644 --- a/pybuild/gen_allsysteminfo.py +++ b/powertrain_build/gen_allsysteminfo.py @@ -7,10 +7,10 @@ import os from copy import deepcopy from numpy import array from scipy.io import savemat -from pybuild.signal_interfaces import SignalInterfaces -from pybuild.unit_configs import UnitConfigs -from pybuild.lib.helper_functions import merge_dicts -from pybuild.problem_logger import ProblemLogger +from powertrain_build.signal_interfaces import SignalInterfaces +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.lib.helper_functions import merge_dicts +from powertrain_build.problem_logger import ProblemLogger def _get_signals_by_type(signal_conf, signal_type): diff --git a/pybuild/gen_label_split.py b/powertrain_build/gen_label_split.py similarity index 98% rename from pybuild/gen_label_split.py rename to powertrain_build/gen_label_split.py index 7bc3cf6..e492219 100644 --- a/pybuild/gen_label_split.py +++ b/powertrain_build/gen_label_split.py @@ -8,10 +8,10 @@ import json import sys from xml.etree import ElementTree from pathlib import Path -from pybuild.feature_configs import FeatureConfigs -from pybuild.unit_configs import UnitConfigs -from pybuild.signal_interfaces import CsvSignalInterfaces -from pybuild.lib import helper_functions, logger +from powertrain_build.feature_configs import FeatureConfigs +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.signal_interfaces import CsvSignalInterfaces +from powertrain_build.lib import helper_functions, logger LOGGER = logger.create_logger(__file__) diff --git a/pybuild/handcode_replacer.py b/powertrain_build/handcode_replacer.py similarity index 100% rename from pybuild/handcode_replacer.py rename to powertrain_build/handcode_replacer.py diff --git a/pybuild/html_report.py b/powertrain_build/html_report.py similarity index 100% rename from pybuild/html_report.py rename to powertrain_build/html_report.py diff --git a/pybuild/interface/README.md b/powertrain_build/interface/README.md similarity index 100% rename from pybuild/interface/README.md rename to powertrain_build/interface/README.md diff --git a/pybuild/zone_controller/__init__.py b/powertrain_build/interface/__init__.py similarity index 66% rename from pybuild/zone_controller/__init__.py rename to powertrain_build/interface/__init__.py index f5a9e61..17f3787 100644 --- a/pybuild/zone_controller/__init__.py +++ b/powertrain_build/interface/__init__.py @@ -1,4 +1,4 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""pybuild.zone_controller.""" +"""powertrain_build.interface.""" diff --git a/pybuild/interface/application.py b/powertrain_build/interface/application.py similarity index 94% rename from pybuild/interface/application.py rename to powertrain_build/interface/application.py index 9f9712e..179fa0c 100644 --- a/pybuild/interface/application.py +++ b/powertrain_build/interface/application.py @@ -7,12 +7,12 @@ from pathlib import Path import json -from pybuild.interface.base import BaseApplication, Signal, MultipleProducersError, Domain, Interface -from pybuild.lib import logger -from pybuild.build_proj_config import BuildProjConfig -from pybuild.feature_configs import FeatureConfigs -from pybuild.unit_configs import UnitConfigs -from pybuild.user_defined_types import UserDefinedTypes +from powertrain_build.interface.base import BaseApplication, Signal, MultipleProducersError, Domain, Interface +from powertrain_build.lib import logger +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.feature_configs import FeatureConfigs +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.user_defined_types import UserDefinedTypes LOGGER = logger.create_logger("application") @@ -202,7 +202,7 @@ class Application(BaseApplication): self._methods.append(method) def get_signal_properties(self, signal): - """ Get properties for the signal from pybuild definition. + """ Get properties for the signal from powertrain_build definition. Args: signal (Signal): Signal object @@ -217,10 +217,10 @@ class Application(BaseApplication): return {} def get_rasters(self): - """ Get rasters parsed from pybuild. + """ Get rasters parsed from powertrain_build. Returns: - rasters (list): rasters parsed from pybuild + rasters (list): rasters parsed from powertrain_build """ if self._signals is None: self._get_signals() @@ -282,7 +282,7 @@ class Raster(BaseApplication): """Construct a new Raster object. Args: - app (pybuild.interface.application.Application): Pybuild project raster is part of + app (powertrain_build.interface.application.Application): Pybuild project raster is part of """ self.app = app self.name = str() @@ -292,7 +292,7 @@ class Raster(BaseApplication): self.models = set() def parse_definition(self, definition): - """ Parse the definition from pybuild. + """ Parse the definition from powertrain_build. Args: definition (tuple): @@ -330,7 +330,7 @@ class Raster(BaseApplication): self._outsignals.add(signal.name) def get_signal_properties(self, signal): - """ Get properties for the signal from pybuild definition. + """ Get properties for the signal from powertrain_build definition. Args: signal (Signal): Signal object @@ -354,7 +354,7 @@ class Model(BaseApplication): self._signal_specs = None def get_signal_properties(self, signal): - """ Get properties for the signal from pybuild definition. + """ Get properties for the signal from powertrain_build definition. Args: signal (Signal): Signal object @@ -410,7 +410,7 @@ class Model(BaseApplication): return json.load(fhndl) def parse_definition(self, definition): - """ Parse the definition from pybuild. + """ Parse the definition from powertrain_build. Args: definition (tuple): @@ -428,7 +428,7 @@ class Method(BaseApplication): """Construct a new Method object. Args: - app (pybuild.interface.application.Application): Pybuild project raster is part of. + app (powertrain_build.interface.application.Application): Pybuild project raster is part of. unit (str): Model that the method is defined in. """ self.app = app @@ -444,7 +444,7 @@ class Method(BaseApplication): self._properties = {} def parse_definition(self, definition): - """ Parse the definition from pybuild. + """ Parse the definition from powertrain_build. Args: definition (tuple): diff --git a/pybuild/interface/base.py b/powertrain_build/interface/base.py similarity index 99% rename from pybuild/interface/base.py rename to powertrain_build/interface/base.py index 487f2fd..acc9ec4 100644 --- a/pybuild/interface/base.py +++ b/powertrain_build/interface/base.py @@ -5,7 +5,7 @@ """Python module used for abstracting an application that should be interfacing others.""" from abc import abstractmethod from ruamel.yaml import YAML -from pybuild.lib import logger +from powertrain_build.lib import logger LOGGER = logger.create_logger('base') diff --git a/pybuild/interface/csp_api.py b/powertrain_build/interface/csp_api.py similarity index 99% rename from pybuild/interface/csp_api.py rename to powertrain_build/interface/csp_api.py index 7987475..9236b1b 100644 --- a/pybuild/interface/csp_api.py +++ b/powertrain_build/interface/csp_api.py @@ -6,8 +6,8 @@ import enum from ruamel.yaml import YAML from abc import abstractmethod -from pybuild.interface.base import BaseApplication, Signal -from pybuild.lib import logger +from powertrain_build.interface.base import BaseApplication, Signal +from powertrain_build.lib import logger LOGGER = logger.create_logger("service") diff --git a/pybuild/interface/device_proxy.py b/powertrain_build/interface/device_proxy.py similarity index 99% rename from pybuild/interface/device_proxy.py rename to powertrain_build/interface/device_proxy.py index 70e824e..7db5cbc 100644 --- a/pybuild/interface/device_proxy.py +++ b/powertrain_build/interface/device_proxy.py @@ -4,8 +4,8 @@ """Python module used for reading device proxy arxml:s""" from ruamel.yaml import YAML import enum -from pybuild.interface.base import BaseApplication, Signal -from pybuild.lib import logger +from powertrain_build.interface.base import BaseApplication, Signal +from powertrain_build.lib import logger LOGGER = logger.create_logger("device_proxy") diff --git a/pybuild/interface/ems.py b/powertrain_build/interface/ems.py similarity index 91% rename from pybuild/interface/ems.py rename to powertrain_build/interface/ems.py index a687096..3e6479b 100644 --- a/pybuild/interface/ems.py +++ b/powertrain_build/interface/ems.py @@ -4,10 +4,10 @@ """Module for extraction Energy Management System""" import os -from pybuild.interface.base import BaseApplication, Signal -from pybuild.lib import logger -from pybuild.signal_interfaces import CsvSignalInterfaces -from pybuild.build_proj_config import BuildProjConfig +from powertrain_build.interface.base import BaseApplication, Signal +from powertrain_build.lib import logger +from powertrain_build.signal_interfaces import CsvSignalInterfaces +from powertrain_build.build_proj_config import BuildProjConfig LOGGER = logger.create_logger(__file__) diff --git a/pybuild/interface/export_global_vars.py b/powertrain_build/interface/export_global_vars.py similarity index 90% rename from pybuild/interface/export_global_vars.py rename to powertrain_build/interface/export_global_vars.py index 27f65b4..6688886 100644 --- a/pybuild/interface/export_global_vars.py +++ b/powertrain_build/interface/export_global_vars.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Module to export information of global variables from pybuild projects.""" +"""Module to export information of global variables from powertrain_build projects.""" import argparse import os @@ -10,9 +10,9 @@ from typing import Dict, Tuple from ruamel.yaml import YAML -from pybuild.build_proj_config import BuildProjConfig -from pybuild.feature_configs import FeatureConfigs -from pybuild.unit_configs import UnitConfigs +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.feature_configs import FeatureConfigs +from powertrain_build.unit_configs import UnitConfigs def get_global_variables(project_config_path: str) -> Dict: @@ -53,7 +53,7 @@ def _get_variable_type(variable_info: Dict) -> str: def _get_project_data(project_config_path: str) -> Tuple[str, Dict]: - """Gets data for a pybuild project. + """Gets data for a powertrain-build project. Args: project_config_path (str): Path to ProjectCfg.json file. diff --git a/pybuild/interface/generate_adapters.py b/powertrain_build/interface/generate_adapters.py similarity index 89% rename from pybuild/interface/generate_adapters.py rename to powertrain_build/interface/generate_adapters.py index aa67058..ab49b11 100644 --- a/pybuild/interface/generate_adapters.py +++ b/powertrain_build/interface/generate_adapters.py @@ -5,13 +5,13 @@ """Python module used for calculating interfaces for CSP""" from pathlib import Path from os import path -from pybuild.interface.hal import HALA -from pybuild.interface.device_proxy import DPAL -from pybuild.interface.service import ServiceFramework -from pybuild.interface import simulink -from pybuild.lib import logger -from pybuild.interface import generation_utils -from pybuild.lib.helper_functions import deep_json_update +from powertrain_build.interface.hal import HALA +from powertrain_build.interface.device_proxy import DPAL +from powertrain_build.interface.service import ServiceFramework +from powertrain_build.interface import simulink +from powertrain_build.lib import logger +from powertrain_build.interface import generation_utils +from powertrain_build.lib.helper_functions import deep_json_update LOGGER = logger.create_logger("CSP adapters") diff --git a/pybuild/interface/generate_hi_interface.py b/powertrain_build/interface/generate_hi_interface.py similarity index 91% rename from pybuild/interface/generate_hi_interface.py rename to powertrain_build/interface/generate_hi_interface.py index 96b5558..6e634d8 100644 --- a/pybuild/interface/generate_hi_interface.py +++ b/powertrain_build/interface/generate_hi_interface.py @@ -4,9 +4,9 @@ # -*- coding: utf-8 -*- """Python module used for calculating interfaces for CSP HI""" from pathlib import Path -from pybuild.interface import generation_utils -from pybuild.interface.device_proxy import DPAL -from pybuild.lib.helper_functions import recursive_default_dict, to_normal_dict +from powertrain_build.interface import generation_utils +from powertrain_build.interface.device_proxy import DPAL +from powertrain_build.lib.helper_functions import recursive_default_dict, to_normal_dict OP_READ = 'read' OP_WRITE = 'write' diff --git a/pybuild/interface/generate_service.py b/powertrain_build/interface/generate_service.py similarity index 92% rename from pybuild/interface/generate_service.py rename to powertrain_build/interface/generate_service.py index 0d52ce6..db012a4 100644 --- a/pybuild/interface/generate_service.py +++ b/powertrain_build/interface/generate_service.py @@ -4,9 +4,9 @@ # -*- coding: utf-8 -*- """Python module used for calculating interfaces for CSP""" from pathlib import Path -from pybuild.interface.service import get_service -from pybuild.lib import logger -from pybuild.interface import generation_utils +from powertrain_build.interface.service import get_service +from powertrain_build.lib import logger +from powertrain_build.interface import generation_utils LOGGER = logger.create_logger("CSP service") diff --git a/pybuild/interface/generate_wrappers.py b/powertrain_build/interface/generate_wrappers.py similarity index 93% rename from pybuild/interface/generate_wrappers.py rename to powertrain_build/interface/generate_wrappers.py index 116afdd..899a077 100644 --- a/pybuild/interface/generate_wrappers.py +++ b/powertrain_build/interface/generate_wrappers.py @@ -4,11 +4,11 @@ # -*- coding: utf-8 -*- """Python module used for calculating interfaces for CSP""" from pathlib import Path -from pybuild.interface.hal import HALA, get_hal_list -from pybuild.interface.device_proxy import DPAL -from pybuild.interface.service import ServiceFramework, get_service_list -from pybuild.lib import logger -from pybuild.interface import generation_utils +from powertrain_build.interface.hal import HALA, get_hal_list +from powertrain_build.interface.device_proxy import DPAL +from powertrain_build.interface.service import ServiceFramework, get_service_list +from powertrain_build.lib import logger +from powertrain_build.interface import generation_utils LOGGER = logger.create_logger("CSP wrappers") diff --git a/pybuild/interface/generation_utils.py b/powertrain_build/interface/generation_utils.py similarity index 95% rename from pybuild/interface/generation_utils.py rename to powertrain_build/interface/generation_utils.py index ab90c2a..c23064d 100644 --- a/pybuild/interface/generation_utils.py +++ b/powertrain_build/interface/generation_utils.py @@ -6,9 +6,9 @@ import argparse from ruamel.yaml import YAML from pathlib import Path -from pybuild.interface.application import Application, get_internal_domain -from pybuild.interface.base import filter_signals -from pybuild.lib import logger +from powertrain_build.interface.application import Application, get_internal_domain +from powertrain_build.interface.base import filter_signals +from powertrain_build.lib import logger LOGGER = logger.create_logger("CSP interface generation utils") @@ -43,7 +43,7 @@ def process_app(config): Args: config (pathlib.Path): Path to the ProjectCfg.json Returns: - app (Application): pybuild project + app (Application): powertrain-build project """ app = Application() app.parse_definition(config) diff --git a/pybuild/interface/hal.py b/powertrain_build/interface/hal.py similarity index 98% rename from pybuild/interface/hal.py rename to powertrain_build/interface/hal.py index 27b0d4f..adaf872 100644 --- a/pybuild/interface/hal.py +++ b/powertrain_build/interface/hal.py @@ -5,8 +5,8 @@ import re from pathlib import Path from ruamel.yaml import YAML -from pybuild.interface.csp_api import CspApi -from pybuild.lib import logger +from powertrain_build.interface.csp_api import CspApi +from powertrain_build.lib import logger LOGGER = logger.create_logger('base') diff --git a/pybuild/interface/model_yaml_verification.py b/powertrain_build/interface/model_yaml_verification.py similarity index 98% rename from pybuild/interface/model_yaml_verification.py rename to powertrain_build/interface/model_yaml_verification.py index eb13fd3..8fdcccd 100644 --- a/pybuild/interface/model_yaml_verification.py +++ b/powertrain_build/interface/model_yaml_verification.py @@ -8,8 +8,8 @@ import logging from pathlib import Path from voluptuous import All, MultipleInvalid, Optional, Required, Schema from ruamel.yaml import YAML -from pybuild.interface.application import Application -from pybuild.interface.base import BaseApplication +from powertrain_build.interface.application import Application +from powertrain_build.interface.base import BaseApplication class ModelYmlVerification(BaseApplication): @@ -310,7 +310,7 @@ def get_app(project_config): Args: config (pathlib.Path): Path to the ProjectCfg.json. Returns: - app (Application): pybuild project. + app (Application): powertrain-build project. """ app = Application() app.parse_definition(project_config) diff --git a/pybuild/interface/service.py b/powertrain_build/interface/service.py similarity index 97% rename from pybuild/interface/service.py rename to powertrain_build/interface/service.py index 3d3d1af..d1416b6 100644 --- a/pybuild/interface/service.py +++ b/powertrain_build/interface/service.py @@ -6,10 +6,10 @@ import re -from pybuild.interface.base import filter_signals -from pybuild.interface.csp_api import CspApi -from pybuild.interface.application import get_internal_domain -from pybuild.lib import logger +from powertrain_build.interface.base import filter_signals +from powertrain_build.interface.csp_api import CspApi +from powertrain_build.interface.application import get_internal_domain +from powertrain_build.lib import logger LOGGER = logger.create_logger("service") diff --git a/pybuild/interface/simulink.py b/powertrain_build/interface/simulink.py similarity index 99% rename from pybuild/interface/simulink.py rename to powertrain_build/interface/simulink.py index 48348c4..8a28814 100644 --- a/pybuild/interface/simulink.py +++ b/powertrain_build/interface/simulink.py @@ -4,7 +4,7 @@ """Module to handle the Simulink interface.""" -from pybuild.lib import logger +from powertrain_build.lib import logger LOGGER = logger.create_logger("simulink") diff --git a/pybuild/interface/update_call_sources.py b/powertrain_build/interface/update_call_sources.py similarity index 100% rename from pybuild/interface/update_call_sources.py rename to powertrain_build/interface/update_call_sources.py diff --git a/pybuild/interface/update_model_yaml.py b/powertrain_build/interface/update_model_yaml.py similarity index 97% rename from pybuild/interface/update_model_yaml.py rename to powertrain_build/interface/update_model_yaml.py index ec70b42..4eb1211 100644 --- a/pybuild/interface/update_model_yaml.py +++ b/powertrain_build/interface/update_model_yaml.py @@ -7,8 +7,8 @@ import argparse from pathlib import Path from ruamel.yaml import YAML -from pybuild.interface.application import Application -from pybuild.interface.base import BaseApplication +from powertrain_build.interface.application import Application +from powertrain_build.interface.base import BaseApplication class BadYamlFormat(Exception): @@ -148,7 +148,7 @@ def get_app(config): Args: config (pathlib.Path): Path to the ProjectCfg.json. Returns: - app (Application): pybuild project. + app (Application): powertrain_build project. """ app = Application() app.parse_definition(config) diff --git a/pybuild/interface/zone_controller.py b/powertrain_build/interface/zone_controller.py similarity index 99% rename from pybuild/interface/zone_controller.py rename to powertrain_build/interface/zone_controller.py index f03c98f..3646e7e 100644 --- a/pybuild/interface/zone_controller.py +++ b/powertrain_build/interface/zone_controller.py @@ -3,8 +3,8 @@ """Python module used for handling zone controller specifications""" from ruamel.yaml import YAML -from pybuild.lib import logger -from pybuild.interface.base import BaseApplication +from powertrain_build.lib import logger +from powertrain_build.interface.base import BaseApplication LOGGER = logger.create_logger("base") diff --git a/pybuild/lib/__init__.py b/powertrain_build/lib/__init__.py similarity index 71% rename from pybuild/lib/__init__.py rename to powertrain_build/lib/__init__.py index 9429aad..923401f 100644 --- a/pybuild/lib/__init__.py +++ b/powertrain_build/lib/__init__.py @@ -1,4 +1,4 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""pybuild.lib.""" +"""powertrain_build.lib.""" diff --git a/pybuild/lib/helper_functions.py b/powertrain_build/lib/helper_functions.py similarity index 100% rename from pybuild/lib/helper_functions.py rename to powertrain_build/lib/helper_functions.py diff --git a/pybuild/lib/logger.py b/powertrain_build/lib/logger.py similarity index 100% rename from pybuild/lib/logger.py rename to powertrain_build/lib/logger.py diff --git a/pybuild/matlab_scripts/CodeGen/BuildAutomationPyBuild.m b/powertrain_build/matlab_scripts/CodeGen/BuildAutomationPyBuild.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/BuildAutomationPyBuild.m rename to powertrain_build/matlab_scripts/CodeGen/BuildAutomationPyBuild.m diff --git a/pybuild/matlab_scripts/CodeGen/Generate_A2L.m b/powertrain_build/matlab_scripts/CodeGen/Generate_A2L.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/Generate_A2L.m rename to powertrain_build/matlab_scripts/CodeGen/Generate_A2L.m diff --git a/pybuild/matlab_scripts/CodeGen/generateTLUnit.m b/powertrain_build/matlab_scripts/CodeGen/generateTLUnit.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/generateTLUnit.m rename to powertrain_build/matlab_scripts/CodeGen/generateTLUnit.m diff --git a/pybuild/matlab_scripts/CodeGen/getAsilClassification.m b/powertrain_build/matlab_scripts/CodeGen/getAsilClassification.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/getAsilClassification.m rename to powertrain_build/matlab_scripts/CodeGen/getAsilClassification.m diff --git a/pybuild/matlab_scripts/CodeGen/modelConfiguredForTL.m b/powertrain_build/matlab_scripts/CodeGen/modelConfiguredForTL.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/modelConfiguredForTL.m rename to powertrain_build/matlab_scripts/CodeGen/modelConfiguredForTL.m diff --git a/pybuild/matlab_scripts/CodeGen/moveDefOutports.m b/powertrain_build/matlab_scripts/CodeGen/moveDefOutports.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/moveDefOutports.m rename to powertrain_build/matlab_scripts/CodeGen/moveDefOutports.m diff --git a/pybuild/matlab_scripts/CodeGen/parseCalMeasData.m b/powertrain_build/matlab_scripts/CodeGen/parseCalMeasData.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parseCalMeasData.m rename to powertrain_build/matlab_scripts/CodeGen/parseCalMeasData.m diff --git a/pybuild/matlab_scripts/CodeGen/parseCoreIdentifiers.m b/powertrain_build/matlab_scripts/CodeGen/parseCoreIdentifiers.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parseCoreIdentifiers.m rename to powertrain_build/matlab_scripts/CodeGen/parseCoreIdentifiers.m diff --git a/pybuild/matlab_scripts/CodeGen/parseDIDs.m b/powertrain_build/matlab_scripts/CodeGen/parseDIDs.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parseDIDs.m rename to powertrain_build/matlab_scripts/CodeGen/parseDIDs.m diff --git a/pybuild/matlab_scripts/CodeGen/parseInPorts.m b/powertrain_build/matlab_scripts/CodeGen/parseInPorts.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parseInPorts.m rename to powertrain_build/matlab_scripts/CodeGen/parseInPorts.m diff --git a/pybuild/matlab_scripts/CodeGen/parseIncludeConfigs.m b/powertrain_build/matlab_scripts/CodeGen/parseIncludeConfigs.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parseIncludeConfigs.m rename to powertrain_build/matlab_scripts/CodeGen/parseIncludeConfigs.m diff --git a/pybuild/matlab_scripts/CodeGen/parseModelInfo.m b/powertrain_build/matlab_scripts/CodeGen/parseModelInfo.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parseModelInfo.m rename to powertrain_build/matlab_scripts/CodeGen/parseModelInfo.m diff --git a/pybuild/matlab_scripts/CodeGen/parseNVM.m b/powertrain_build/matlab_scripts/CodeGen/parseNVM.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parseNVM.m rename to powertrain_build/matlab_scripts/CodeGen/parseNVM.m diff --git a/pybuild/matlab_scripts/CodeGen/parseOutPorts.m b/powertrain_build/matlab_scripts/CodeGen/parseOutPorts.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parseOutPorts.m rename to powertrain_build/matlab_scripts/CodeGen/parseOutPorts.m diff --git a/pybuild/matlab_scripts/CodeGen/parsePreProcBlks.m b/powertrain_build/matlab_scripts/CodeGen/parsePreProcBlks.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/parsePreProcBlks.m rename to powertrain_build/matlab_scripts/CodeGen/parsePreProcBlks.m diff --git a/pybuild/matlab_scripts/CodeGen/struct2JSON.m b/powertrain_build/matlab_scripts/CodeGen/struct2JSON.m similarity index 100% rename from pybuild/matlab_scripts/CodeGen/struct2JSON.m rename to powertrain_build/matlab_scripts/CodeGen/struct2JSON.m diff --git a/pybuild/matlab_scripts/CodeGen/updateCodeSwConfig.m b/powertrain_build/matlab_scripts/CodeGen/updateCodeSwConfig.m similarity index 53% rename from pybuild/matlab_scripts/CodeGen/updateCodeSwConfig.m rename to powertrain_build/matlab_scripts/CodeGen/updateCodeSwConfig.m index 2301798..cc1c91b 100644 --- a/pybuild/matlab_scripts/CodeGen/updateCodeSwConfig.m +++ b/powertrain_build/matlab_scripts/CodeGen/updateCodeSwConfig.m @@ -4,7 +4,7 @@ function updateCodeSwConfig(RootFolder, model_path) % updateCodeSwConfig(RootFolder, model_path) % - % Executes 'py -3.6 -m pybuild.config models' for the model. + % Executes 'py -3.6 -m powertrain_build.config models' for the model. % This script reads the .json, .c and .h-files and looks for configs for % the variables that already have a config in the json. % @@ -13,26 +13,19 @@ function updateCodeSwConfig(RootFolder, model_path) % model_path: Path to the model to regenerate config for. old_pythonpath = getenv('PYTHONPATH'); - if ~isempty(getenv('PYBUILD_ACTIVATE')) - % Repo using venv in Zuul/Jenkins. - % Installs pytools python package and dependencies, see Script/PyTools/setup_pytools.*. - [~, out]=system(['CALL %PYBUILD_ACTIVATE% & python -m pybuild.config models "' model_path '"']); - elseif ~isempty(getenv('VENV_FOLDER')) - % Legacy, repo using venv in Zuul/Jenkins. - % Repo using pytools folder but it's dependencies in a venv. - [~, out]=system(['CALL %VENV_FOLDER%\Scripts\activate.bat & python -m pybuild.config models "' model_path '"']); + if ~isempty(getenv('PYTOOLS_ACTIVATE')) + [~, out]=system(['CALL %PYTOOLS_ACTIVATE% & python -m powertrain_build.config models "' model_path '"']); elseif ~isempty(getenv('CALLING_PYTHON')) % Local run using calling python version fprintf('\nUsing calling python: %s\n', getenv('CALLING_PYTHON')); setenv('PYTHONPATH', RootFolder) - [~, out]=system(['%CALLING_PYTHON% -m pybuild.config models "' model_path '"']); + [~, out]=system(['%CALLING_PYTHON% -m powertrain_build.config models "' model_path '"']); else % Local run fprintf('\nUsing python version 3.6\n'); setenv('PYTHONPATH', RootFolder) - [~, out]=system(['py -3.6 -m pybuild.config models "' model_path '"']); + [~, out]=system(['py -3.6 -m powertrain_build.config models "' model_path '"']); end - disp(out) setenv('PYTHONPATH', old_pythonpath) end diff --git a/pybuild/matlab_scripts/Init_PyBuild.m b/powertrain_build/matlab_scripts/Init_PyBuild.m similarity index 98% rename from pybuild/matlab_scripts/Init_PyBuild.m rename to powertrain_build/matlab_scripts/Init_PyBuild.m index 57c0c5e..66f50bf 100644 --- a/pybuild/matlab_scripts/Init_PyBuild.m +++ b/powertrain_build/matlab_scripts/Init_PyBuild.m @@ -23,7 +23,7 @@ dsdd_manage_project('SetProjectFile', dd_file(1).name); tl_pref('set', 'projectfileautosave', 'off'); % Init Pybuild -disp('Initializing pybuild') +disp('Initializing powertrain-build') Models = Init_Models('Models'); Projects = Init_Projects('Projects', Models); QuantityUnitList = Read_Units(); diff --git a/pybuild/matlab_scripts/__init__.py b/powertrain_build/matlab_scripts/__init__.py similarity index 100% rename from pybuild/matlab_scripts/__init__.py rename to powertrain_build/matlab_scripts/__init__.py diff --git a/pybuild/matlab_scripts/helperFunctions/Get_Full_Name.m b/powertrain_build/matlab_scripts/helperFunctions/Get_Full_Name.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/Get_Full_Name.m rename to powertrain_build/matlab_scripts/helperFunctions/Get_Full_Name.m diff --git a/pybuild/matlab_scripts/helperFunctions/Get_SrcLines.m b/powertrain_build/matlab_scripts/helperFunctions/Get_SrcLines.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/Get_SrcLines.m rename to powertrain_build/matlab_scripts/helperFunctions/Get_SrcLines.m diff --git a/pybuild/matlab_scripts/helperFunctions/Init_Models.m b/powertrain_build/matlab_scripts/helperFunctions/Init_Models.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/Init_Models.m rename to powertrain_build/matlab_scripts/helperFunctions/Init_Models.m diff --git a/pybuild/matlab_scripts/helperFunctions/Init_Projects.m b/powertrain_build/matlab_scripts/helperFunctions/Init_Projects.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/Init_Projects.m rename to powertrain_build/matlab_scripts/helperFunctions/Init_Projects.m diff --git a/pybuild/matlab_scripts/helperFunctions/Read_Units.m b/powertrain_build/matlab_scripts/helperFunctions/Read_Units.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/Read_Units.m rename to powertrain_build/matlab_scripts/helperFunctions/Read_Units.m diff --git a/pybuild/matlab_scripts/helperFunctions/SetProjectTimeSamples.m b/powertrain_build/matlab_scripts/helperFunctions/SetProjectTimeSamples.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/SetProjectTimeSamples.m rename to powertrain_build/matlab_scripts/helperFunctions/SetProjectTimeSamples.m diff --git a/pybuild/matlab_scripts/helperFunctions/Strip_Suffix.m b/powertrain_build/matlab_scripts/helperFunctions/Strip_Suffix.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/Strip_Suffix.m rename to powertrain_build/matlab_scripts/helperFunctions/Strip_Suffix.m diff --git a/pybuild/matlab_scripts/helperFunctions/followLink.m b/powertrain_build/matlab_scripts/helperFunctions/followLink.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/followLink.m rename to powertrain_build/matlab_scripts/helperFunctions/followLink.m diff --git a/pybuild/matlab_scripts/helperFunctions/getCodeSwitches.m b/powertrain_build/matlab_scripts/helperFunctions/getCodeSwitches.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getCodeSwitches.m rename to powertrain_build/matlab_scripts/helperFunctions/getCodeSwitches.m diff --git a/pybuild/matlab_scripts/helperFunctions/getConsumerBlocks.m b/powertrain_build/matlab_scripts/helperFunctions/getConsumerBlocks.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getConsumerBlocks.m rename to powertrain_build/matlab_scripts/helperFunctions/getConsumerBlocks.m diff --git a/pybuild/matlab_scripts/helperFunctions/getDefBlock.m b/powertrain_build/matlab_scripts/helperFunctions/getDefBlock.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getDefBlock.m rename to powertrain_build/matlab_scripts/helperFunctions/getDefBlock.m diff --git a/pybuild/matlab_scripts/helperFunctions/getDefOutport.m b/powertrain_build/matlab_scripts/helperFunctions/getDefOutport.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getDefOutport.m rename to powertrain_build/matlab_scripts/helperFunctions/getDefOutport.m diff --git a/pybuild/matlab_scripts/helperFunctions/getDstBlocks.m b/powertrain_build/matlab_scripts/helperFunctions/getDstBlocks.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getDstBlocks.m rename to powertrain_build/matlab_scripts/helperFunctions/getDstBlocks.m diff --git a/pybuild/matlab_scripts/helperFunctions/getDstLines.m b/powertrain_build/matlab_scripts/helperFunctions/getDstLines.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getDstLines.m rename to powertrain_build/matlab_scripts/helperFunctions/getDstLines.m diff --git a/pybuild/matlab_scripts/helperFunctions/getInterfaceSignals.m b/powertrain_build/matlab_scripts/helperFunctions/getInterfaceSignals.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getInterfaceSignals.m rename to powertrain_build/matlab_scripts/helperFunctions/getInterfaceSignals.m diff --git a/pybuild/matlab_scripts/helperFunctions/getName.m b/powertrain_build/matlab_scripts/helperFunctions/getName.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getName.m rename to powertrain_build/matlab_scripts/helperFunctions/getName.m diff --git a/pybuild/matlab_scripts/helperFunctions/getPath.m b/powertrain_build/matlab_scripts/helperFunctions/getPath.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getPath.m rename to powertrain_build/matlab_scripts/helperFunctions/getPath.m diff --git a/pybuild/matlab_scripts/helperFunctions/getProperValue.m b/powertrain_build/matlab_scripts/helperFunctions/getProperValue.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getProperValue.m rename to powertrain_build/matlab_scripts/helperFunctions/getProperValue.m diff --git a/pybuild/matlab_scripts/helperFunctions/getSrcBlocks.m b/powertrain_build/matlab_scripts/helperFunctions/getSrcBlocks.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getSrcBlocks.m rename to powertrain_build/matlab_scripts/helperFunctions/getSrcBlocks.m diff --git a/pybuild/matlab_scripts/helperFunctions/getSrcLines.m b/powertrain_build/matlab_scripts/helperFunctions/getSrcLines.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/getSrcLines.m rename to powertrain_build/matlab_scripts/helperFunctions/getSrcLines.m diff --git a/pybuild/matlab_scripts/helperFunctions/loadLibraries.m b/powertrain_build/matlab_scripts/helperFunctions/loadLibraries.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/loadLibraries.m rename to powertrain_build/matlab_scripts/helperFunctions/loadLibraries.m diff --git a/pybuild/matlab_scripts/helperFunctions/loadjson.m b/powertrain_build/matlab_scripts/helperFunctions/loadjson.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/loadjson.m rename to powertrain_build/matlab_scripts/helperFunctions/loadjson.m diff --git a/pybuild/matlab_scripts/helperFunctions/modifyEnumStructField.m b/powertrain_build/matlab_scripts/helperFunctions/modifyEnumStructField.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/modifyEnumStructField.m rename to powertrain_build/matlab_scripts/helperFunctions/modifyEnumStructField.m diff --git a/pybuild/matlab_scripts/helperFunctions/removeConfigDuplicates.m b/powertrain_build/matlab_scripts/helperFunctions/removeConfigDuplicates.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/removeConfigDuplicates.m rename to powertrain_build/matlab_scripts/helperFunctions/removeConfigDuplicates.m diff --git a/pybuild/matlab_scripts/helperFunctions/sortSystemByClass.m b/powertrain_build/matlab_scripts/helperFunctions/sortSystemByClass.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/sortSystemByClass.m rename to powertrain_build/matlab_scripts/helperFunctions/sortSystemByClass.m diff --git a/pybuild/matlab_scripts/helperFunctions/tl_getfast.m b/powertrain_build/matlab_scripts/helperFunctions/tl_getfast.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/tl_getfast.m rename to powertrain_build/matlab_scripts/helperFunctions/tl_getfast.m diff --git a/pybuild/matlab_scripts/helperFunctions/topLevelSystem.m b/powertrain_build/matlab_scripts/helperFunctions/topLevelSystem.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/topLevelSystem.m rename to powertrain_build/matlab_scripts/helperFunctions/topLevelSystem.m diff --git a/pybuild/matlab_scripts/helperFunctions/updateModels.m b/powertrain_build/matlab_scripts/helperFunctions/updateModels.m similarity index 100% rename from pybuild/matlab_scripts/helperFunctions/updateModels.m rename to powertrain_build/matlab_scripts/helperFunctions/updateModels.m diff --git a/pybuild/memory_section.py b/powertrain_build/memory_section.py similarity index 99% rename from pybuild/memory_section.py rename to powertrain_build/memory_section.py index c40e63e..0e10a16 100644 --- a/pybuild/memory_section.py +++ b/powertrain_build/memory_section.py @@ -6,8 +6,8 @@ import time from pathlib import Path -from pybuild import build_defs -from pybuild.problem_logger import ProblemLogger +from powertrain_build import build_defs +from powertrain_build.problem_logger import ProblemLogger class MemorySection(ProblemLogger): diff --git a/pybuild/nvm_def.py b/powertrain_build/nvm_def.py similarity index 99% rename from pybuild/nvm_def.py rename to powertrain_build/nvm_def.py index dffa50c..1d92549 100644 --- a/pybuild/nvm_def.py +++ b/powertrain_build/nvm_def.py @@ -7,10 +7,10 @@ import re import os import json -import pybuild.build_defs as bd -from pybuild.types import byte_size, get_bitmask -from pybuild.a2l import A2l -from pybuild.problem_logger import ProblemLogger +import powertrain_build.build_defs as bd +from powertrain_build.types import byte_size, get_bitmask +from powertrain_build.a2l import A2l +from powertrain_build.problem_logger import ProblemLogger class NVMDef(ProblemLogger): diff --git a/pybuild/problem_logger.py b/powertrain_build/problem_logger.py similarity index 100% rename from pybuild/problem_logger.py rename to powertrain_build/problem_logger.py diff --git a/pybuild/pt_matlab.py b/powertrain_build/pt_matlab.py similarity index 100% rename from pybuild/pt_matlab.py rename to powertrain_build/pt_matlab.py diff --git a/pybuild/pt_win32.py b/powertrain_build/pt_win32.py similarity index 98% rename from pybuild/pt_win32.py rename to powertrain_build/pt_win32.py index e9458a0..1ed9d2b 100644 --- a/pybuild/pt_win32.py +++ b/powertrain_build/pt_win32.py @@ -6,7 +6,7 @@ See pywin32 documentation or windows api documentation for more information. """ -from pybuild.lib.helper_functions import merge_dicts +from powertrain_build.lib.helper_functions import merge_dicts STILL_ACTIVE = 259 diff --git a/pybuild/replace_compu_tab_ref.py b/powertrain_build/replace_compu_tab_ref.py similarity index 100% rename from pybuild/replace_compu_tab_ref.py rename to powertrain_build/replace_compu_tab_ref.py diff --git a/pybuild/sched_funcs.py b/powertrain_build/sched_funcs.py similarity index 97% rename from pybuild/sched_funcs.py rename to powertrain_build/sched_funcs.py index df78212..8627126 100644 --- a/pybuild/sched_funcs.py +++ b/powertrain_build/sched_funcs.py @@ -5,10 +5,10 @@ from os.path import join as pjoin from os.path import split as psplit -import pybuild.build_defs as build_defs -from pybuild.build_proj_config import BuildProjConfig -from pybuild.problem_logger import ProblemLogger -from pybuild.unit_configs import UnitConfigs +import powertrain_build.build_defs as build_defs +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.unit_configs import UnitConfigs class SchedFuncs(ProblemLogger): diff --git a/pybuild/signal.py b/powertrain_build/signal.py similarity index 100% rename from pybuild/signal.py rename to powertrain_build/signal.py diff --git a/pybuild/signal_if_html_rep.py b/powertrain_build/signal_if_html_rep.py similarity index 99% rename from pybuild/signal_if_html_rep.py rename to powertrain_build/signal_if_html_rep.py index b0be225..fa064d3 100644 --- a/pybuild/signal_if_html_rep.py +++ b/powertrain_build/signal_if_html_rep.py @@ -3,7 +3,7 @@ """Module containing classes for the signal interfaces report.""" from collections import defaultdict -from pybuild.html_report import HtmlReport +from powertrain_build.html_report import HtmlReport class SigIfHtmlReport(HtmlReport): diff --git a/pybuild/signal_if_html_rep_all.py b/powertrain_build/signal_if_html_rep_all.py similarity index 99% rename from pybuild/signal_if_html_rep_all.py rename to powertrain_build/signal_if_html_rep_all.py index 35cb136..550c73b 100644 --- a/pybuild/signal_if_html_rep_all.py +++ b/powertrain_build/signal_if_html_rep_all.py @@ -3,7 +3,7 @@ """Module containing classes for the signal interfaces report.""" from collections import defaultdict -from pybuild.html_report import HtmlReport +from powertrain_build.html_report import HtmlReport class SigIfHtmlReportAll(HtmlReport): diff --git a/pybuild/signal_incons_html_rep.py b/powertrain_build/signal_incons_html_rep.py similarity index 98% rename from pybuild/signal_incons_html_rep.py rename to powertrain_build/signal_incons_html_rep.py index 8e16d5a..e2fbddb 100644 --- a/pybuild/signal_incons_html_rep.py +++ b/powertrain_build/signal_incons_html_rep.py @@ -2,7 +2,7 @@ # Licensed under Apache 2.0. """Module containing classes for generation of signal consistency check report.""" -from pybuild.signal_incons_html_rep_base import SigConsHtmlReportBase +from powertrain_build.signal_incons_html_rep_base import SigConsHtmlReportBase class SigConsHtmlReport(SigConsHtmlReportBase): diff --git a/pybuild/signal_incons_html_rep_all.py b/powertrain_build/signal_incons_html_rep_all.py similarity index 99% rename from pybuild/signal_incons_html_rep_all.py rename to powertrain_build/signal_incons_html_rep_all.py index 250d5cf..1dba0b5 100644 --- a/pybuild/signal_incons_html_rep_all.py +++ b/powertrain_build/signal_incons_html_rep_all.py @@ -4,7 +4,7 @@ """Module containing classes for generation of signal consistency check report.""" import json -from pybuild.signal_incons_html_rep_base import SigConsHtmlReportBase +from powertrain_build.signal_incons_html_rep_base import SigConsHtmlReportBase class SigConsHtmlReportAll(SigConsHtmlReportBase): diff --git a/pybuild/signal_incons_html_rep_base.py b/powertrain_build/signal_incons_html_rep_base.py similarity index 99% rename from pybuild/signal_incons_html_rep_base.py rename to powertrain_build/signal_incons_html_rep_base.py index 3452284..edb3d55 100644 --- a/pybuild/signal_incons_html_rep_base.py +++ b/powertrain_build/signal_incons_html_rep_base.py @@ -2,7 +2,7 @@ # Licensed under Apache 2.0. """Module containing classes for generation of signal consistency check report.""" -from pybuild.html_report import HtmlReport +from powertrain_build.html_report import HtmlReport class SigConsHtmlReportBase(HtmlReport): diff --git a/pybuild/signal_inconsistency_check.py b/powertrain_build/signal_inconsistency_check.py similarity index 97% rename from pybuild/signal_inconsistency_check.py rename to powertrain_build/signal_inconsistency_check.py index 2d632f2..343b038 100644 --- a/pybuild/signal_inconsistency_check.py +++ b/powertrain_build/signal_inconsistency_check.py @@ -14,13 +14,13 @@ from pathlib import Path import git -from pybuild.build_proj_config import BuildProjConfig -from pybuild.feature_configs import FeatureConfigs -from pybuild.lib import helper_functions, logger -from pybuild.signal_incons_html_rep_all import SigConsHtmlReportAll -from pybuild.signal_interfaces import CsvSignalInterfaces, YamlSignalInterfaces -from pybuild.unit_configs import UnitConfigs -from pybuild.user_defined_types import UserDefinedTypes +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.feature_configs import FeatureConfigs +from powertrain_build.lib import helper_functions, logger +from powertrain_build.signal_incons_html_rep_all import SigConsHtmlReportAll +from powertrain_build.signal_interfaces import CsvSignalInterfaces, YamlSignalInterfaces +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.user_defined_types import UserDefinedTypes LOGGER = logger.create_logger(__file__) EXIT_CODE_OK = 0 @@ -63,7 +63,7 @@ TEMPLATE = """ def gen_sig_incons_index_file(project_list): """Generate Index_SigCheck_All.html.""" - # TODO Remove function and add as method in pybuild/signal_incons_html_rep_all.py + # TODO Remove function and add as method in powertrain_build/signal_incons_html_rep_all.py rows = "" project_row = """
  • SigCheckAll {project}
  • \n""" diff --git a/pybuild/signal_interfaces.py b/powertrain_build/signal_interfaces.py similarity index 97% rename from pybuild/signal_interfaces.py rename to powertrain_build/signal_interfaces.py index 9cab04b..c053f16 100644 --- a/pybuild/signal_interfaces.py +++ b/powertrain_build/signal_interfaces.py @@ -15,13 +15,13 @@ from pprint import pformat from pathlib import Path from collections import defaultdict -from pybuild.build_proj_config import BuildProjConfig -from pybuild.feature_configs import FeatureConfigs -from pybuild.lib.helper_functions import deep_dict_update -from pybuild.problem_logger import ProblemLogger -from pybuild.types import get_ec_type -from pybuild.unit_configs import UnitConfigs, CodeGenerators -from pybuild.user_defined_types import UserDefinedTypes +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.feature_configs import FeatureConfigs +from powertrain_build.lib.helper_functions import deep_dict_update +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.types import get_ec_type +from powertrain_build.unit_configs import UnitConfigs, CodeGenerators +from powertrain_build.user_defined_types import UserDefinedTypes class CsvReaderCounter: @@ -387,13 +387,13 @@ class YamlSignalInterfaces(SignalInterfaces): super().__init__(unit_cfg, model_names=model_names) # Postpone imports to here to work on machines without PyYaml installed - from pybuild.interface.base import filter_signals - from pybuild.interface.application import Application, get_internal_domain - from pybuild.interface.generation_utils import get_interface, get_method_interface - from pybuild.interface.hal import HALA - from pybuild.interface.device_proxy import DPAL - from pybuild.interface.zone_controller import ZCAL - from pybuild.interface.service import ServiceFramework + from powertrain_build.interface.base import filter_signals + from powertrain_build.interface.application import Application, get_internal_domain + from powertrain_build.interface.generation_utils import get_interface, get_method_interface + from powertrain_build.interface.hal import HALA + from powertrain_build.interface.device_proxy import DPAL + from powertrain_build.interface.zone_controller import ZCAL + from powertrain_build.interface.service import ServiceFramework app = Application() app.pybuild['build_cfg'] = prj_cfg diff --git a/pybuild/templates/Index_SigCheck_All.html b/powertrain_build/templates/Index_SigCheck_All.html similarity index 100% rename from pybuild/templates/Index_SigCheck_All.html rename to powertrain_build/templates/Index_SigCheck_All.html diff --git a/pybuild/templates/Index_SigIf_All.html b/powertrain_build/templates/Index_SigIf_All.html similarity index 100% rename from pybuild/templates/Index_SigIf_All.html rename to powertrain_build/templates/Index_SigIf_All.html diff --git a/pybuild/types.py b/powertrain_build/types.py similarity index 100% rename from pybuild/types.py rename to powertrain_build/types.py diff --git a/pybuild/unit_configs.py b/powertrain_build/unit_configs.py similarity index 99% rename from pybuild/unit_configs.py rename to powertrain_build/unit_configs.py index 4d5f18f..3c0108f 100644 --- a/pybuild/unit_configs.py +++ b/powertrain_build/unit_configs.py @@ -8,9 +8,9 @@ import os import time from pprint import pformat -from pybuild.build_proj_config import BuildProjConfig -from pybuild.problem_logger import ProblemLogger -from pybuild.versioncheck import Version +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.versioncheck import Version class CodeGenerators: diff --git a/pybuild/user_defined_types.py b/powertrain_build/user_defined_types.py similarity index 99% rename from pybuild/user_defined_types.py rename to powertrain_build/user_defined_types.py index 2a21745..6c8fae5 100644 --- a/pybuild/user_defined_types.py +++ b/powertrain_build/user_defined_types.py @@ -9,9 +9,9 @@ import time from ruamel.yaml import YAML from copy import deepcopy from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.problem_logger import ProblemLogger -from pybuild.unit_configs import UnitConfigs +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.unit_configs import UnitConfigs class UserDefinedTypes(ProblemLogger): diff --git a/pybuild/versioncheck.py b/powertrain_build/versioncheck.py similarity index 95% rename from pybuild/versioncheck.py rename to powertrain_build/versioncheck.py index a16c8fa..ebb3c21 100644 --- a/pybuild/versioncheck.py +++ b/powertrain_build/versioncheck.py @@ -5,7 +5,7 @@ import re -from pybuild import __config_version__ +from powertrain_build import __config_version__ class Version: @@ -42,7 +42,7 @@ class Version: """Check version compatibility. Args: - version (str/int/float): The version to be compared with the version of pybuild. + version (str/int/float): The version to be compared with the version of powertrain_build. Returns: bool: True/False based on version compatibility. diff --git a/pybuild/wrapper.py b/powertrain_build/wrapper.py similarity index 95% rename from pybuild/wrapper.py rename to powertrain_build/wrapper.py index d18cd45..6125fa6 100644 --- a/pybuild/wrapper.py +++ b/powertrain_build/wrapper.py @@ -18,8 +18,8 @@ except ImportError: import shutil import git -from pybuild import build, pt_matlab -from pybuild.lib import logger, helper_functions +from powertrain_build import build, pt_matlab +from powertrain_build.lib import logger, helper_functions LOGGER = logger.create_logger(__file__) @@ -234,13 +234,13 @@ class PyBuildWrapper(pt_matlab.Matlab): should_run: True/False whether PyBuild should run or not. model_list: List of models to update/generate code for. """ - run_pybuild = args.build is not None or getattr(args, "project_config", None) is not None - should_run = args.update or args.codegen or run_pybuild + run_powertrain_build = args.build is not None or getattr(args, "project_config", None) is not None + should_run = args.update or args.codegen or run_powertrain_build model_list = args.models if args.models else self.get_changed_models() LOGGER.info("Affected models: %s", ", ".join(model_list)) if not model_list: # PyBuild should not run if there were no model changes - should_run = run_pybuild + should_run = run_powertrain_build model_list = None return should_run, model_list @@ -317,14 +317,14 @@ class PyBuildWrapper(pt_matlab.Matlab): os.environ.setdefault("CALLING_PYTHON", calling_python_string) # Specify a new script and log file name for each run - script_name = f"pybuild_matlab_{mode}.m" - self.log = f"pybuild_matlab_{mode}.log" + script_name = f"powertrain_build_matlab_{mode}.m" + self.log = f"powertrain_build_matlab_{mode}.log" # Set up matlab path - matlab_scripts_path = os.path.join("pybuild_matlab_scripts") + matlab_scripts_path = os.path.join("powertrain_build_matlab_scripts") # Copy matlab-scripts to the project root - matlab_script_folder = files("pybuild.matlab_scripts") + matlab_script_folder = files("powertrain_build.matlab_scripts") shutil.rmtree(matlab_scripts_path, ignore_errors=True) shutil.copytree(matlab_script_folder, matlab_scripts_path) @@ -361,11 +361,11 @@ class PyBuildWrapper(pt_matlab.Matlab): self.get_file_hashes(self.models) return 0 - def run_pybuild(self): - """Execute PyBuild. + def run_powertrain_build(self): + """Execute powertrain-build. Returns: - exit_code: Exit code from PyBuild build step. + exit_code: Exit code from Powertrain-build build step. """ try: exit_code = build.build( @@ -409,11 +409,11 @@ class PyBuildWrapper(pt_matlab.Matlab): if self.build: LOGGER.info("Running PyBuild.build for %s!", self.build) - exit_code |= self.run_pybuild() + exit_code |= self.run_powertrain_build() if self.build_specific: LOGGER.info("Running PyBuild specific build for %s!", self.project_config) - exit_code |= self.run_pybuild() + exit_code |= self.run_powertrain_build() return exit_code @@ -469,8 +469,8 @@ class PyBuildWrapper(pt_matlab.Matlab): default="matlab-scripts", help="Path to folder containing Matlab scripts and simulink libraries to include.", ) - pybuild_parsers = parser.add_subparsers(help="PyBuild specific build.") - build_specific_parser = pybuild_parsers.add_parser( + powertrain_build_parser = parser.add_subparsers(help="PyBuild specific build.") + build_specific_parser = powertrain_build_parser.add_parser( "build-specific", help="Run PyBuild for project with specific settings." ) build.add_args(build_specific_parser) diff --git a/pybuild/xlrd_csv.py b/powertrain_build/xlrd_csv.py similarity index 100% rename from pybuild/xlrd_csv.py rename to powertrain_build/xlrd_csv.py diff --git a/pybuild/interface/__init__.py b/powertrain_build/zone_controller/__init__.py similarity index 63% rename from pybuild/interface/__init__.py rename to powertrain_build/zone_controller/__init__.py index 7ff1ad8..a0f00a7 100644 --- a/pybuild/interface/__init__.py +++ b/powertrain_build/zone_controller/__init__.py @@ -1,4 +1,4 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""pybuild.interface.""" +"""powertrain_build.zone_controller.""" diff --git a/pybuild/zone_controller/calibration.py b/powertrain_build/zone_controller/calibration.py similarity index 99% rename from pybuild/zone_controller/calibration.py rename to powertrain_build/zone_controller/calibration.py index 422db56..3ca63d0 100644 --- a/pybuild/zone_controller/calibration.py +++ b/powertrain_build/zone_controller/calibration.py @@ -4,7 +4,7 @@ """Module for handling ZoneController calibration.""" from pathlib import Path -from pybuild.problem_logger import ProblemLogger +from powertrain_build.problem_logger import ProblemLogger class ZoneControllerCalibration(ProblemLogger): diff --git a/pybuild/zone_controller/composition_yaml.py b/powertrain_build/zone_controller/composition_yaml.py similarity index 98% rename from pybuild/zone_controller/composition_yaml.py rename to powertrain_build/zone_controller/composition_yaml.py index 25b2e5d..15e462b 100644 --- a/pybuild/zone_controller/composition_yaml.py +++ b/powertrain_build/zone_controller/composition_yaml.py @@ -7,9 +7,9 @@ import re from pathlib import Path from ruamel.yaml import YAML -from pybuild.problem_logger import ProblemLogger -from pybuild.types import a2l_range -from pybuild.zone_controller.calibration import ZoneControllerCalibration as ZCC +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.types import a2l_range +from powertrain_build.zone_controller.calibration import ZoneControllerCalibration as ZCC class CompositionYaml(ProblemLogger): @@ -148,7 +148,7 @@ class CompositionYaml(ProblemLogger): Returns: all_info (dict): Dict to be written to yaml. """ - software_components, pybuild_data_types = self._get_software_components() + software_components, pt_build_data_types = self._get_software_components() all_info = { "ExternalFiles": { @@ -156,7 +156,7 @@ class CompositionYaml(ProblemLogger): "GenerateExternalImplementationTypes": self.build_cfg.get_gen_ext_impl_type(), }, "SoftwareComponents": software_components, - "DataTypes": {**self.data_types, **pybuild_data_types}, + "DataTypes": {**self.data_types, **pt_build_data_types}, "PortInterfaces": self.port_interfaces, } diff --git a/requirements.txt b/requirements.txt index e3dce5b..985c465 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ gitpython >= 3.1.8 pbr >= 6.0.0 -requests == 2.32.3 +requests == 2.27.1; python_version == "3.6" +requests == 2.32.3; python_version > "3.6" certifi == 2024.7.4 ruamel.yaml.clib == 0.2.7; python_version == "3.6" ruamel.yaml == 0.17.21; python_version == "3.6" diff --git a/setup.cfg b/setup.cfg index 9a222a3..122d8ea 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,10 +27,10 @@ requires_python = >=3.6, <3.11 [files] packages = - pybuild - pybuild.interface - pybuild.lib - pybuild.zone_controller + powertrain_build + powertrain_build.interface + powertrain_build.lib + powertrain_build.zone_controller [pbr] skip_git_sdist = 1 diff --git a/test_data/pybuild/test_dids/zc_dids.py b/test_data/powertrain_build/test_dids/zc_dids.py similarity index 99% rename from test_data/pybuild/test_dids/zc_dids.py rename to test_data/powertrain_build/test_dids/zc_dids.py index 7062f27..efa7f01 100644 --- a/test_data/pybuild/test_dids/zc_dids.py +++ b/test_data/powertrain_build/test_dids/zc_dids.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test data for pybuild.dids.ZCDIDs.""" +"""Unit test data for powertrain_build.dids.ZCDIDs.""" dummy_project_dids = { 'dummy_did_one': { diff --git a/test_data/zone_controller/test_composition_yaml/composition_yaml.py b/test_data/zone_controller/test_composition_yaml/composition_yaml.py index 62c5665..4f822ca 100644 --- a/test_data/zone_controller/test_composition_yaml/composition_yaml.py +++ b/test_data/zone_controller/test_composition_yaml/composition_yaml.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test data for pybuild.zone_controller.composition_yaml.""" +"""Unit test data for powertrain_build.zone_controller.composition_yaml.""" from test_data.zone_controller.test_composition_yaml import composition_yaml_setup diff --git a/test_data/zone_controller/test_composition_yaml/composition_yaml_setup.py b/test_data/zone_controller/test_composition_yaml/composition_yaml_setup.py index 564994c..da1fd93 100644 --- a/test_data/zone_controller/test_composition_yaml/composition_yaml_setup.py +++ b/test_data/zone_controller/test_composition_yaml/composition_yaml_setup.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test setup data for pybuild.zone_controller.composition_yaml.""" +"""Unit test setup data for powertrain_build.zone_controller.composition_yaml.""" base_configuration = { "Composition": "some_arxml.arxml", diff --git a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_a2l_axis_data.py b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_a2l_axis_data.py index 9aa525e..cf7085f 100644 --- a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_a2l_axis_data.py +++ b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_a2l_axis_data.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test data for pybuild.zone_controller.composition_yaml with a2l axis data.""" +"""Unit test data for powertrain_build.zone_controller.composition_yaml with a2l axis data.""" from test_data.zone_controller.test_composition_yaml import composition_yaml_setup diff --git a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_calls_all_fields.py b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_calls_all_fields.py index 0f0303b..20f1eec 100644 --- a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_calls_all_fields.py +++ b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_calls_all_fields.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test data for pybuild.zone_controller.composition_yaml with calls using all fields.""" +"""Unit test data for powertrain_build.zone_controller.composition_yaml with calls using all fields.""" from test_data.zone_controller.test_composition_yaml import composition_yaml_setup diff --git a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_calls_no_optional_fields.py b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_calls_no_optional_fields.py index 0553c65..265a59b 100644 --- a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_calls_no_optional_fields.py +++ b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_calls_no_optional_fields.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test data for pybuild.zone_controller.composition_yaml with calls no optional fields.""" +"""Unit test data for powertrain_build.zone_controller.composition_yaml with calls no optional fields.""" from test_data.zone_controller.test_composition_yaml import composition_yaml_setup diff --git a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_dids.py b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_dids.py index 32f5920..766d6a8 100644 --- a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_dids.py +++ b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_dids.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test data for pybuild.zone_controller.composition_yaml with DIDs.""" +"""Unit test data for powertrain_build.zone_controller.composition_yaml with DIDs.""" from test_data.zone_controller.test_composition_yaml import composition_yaml_setup diff --git a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_dtcs.py b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_dtcs.py index c3c904f..44a2260 100644 --- a/test_data/zone_controller/test_composition_yaml/composition_yaml_with_dtcs.py +++ b/test_data/zone_controller/test_composition_yaml/composition_yaml_with_dtcs.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test data for pybuild.zone_controller.composition_yaml with DTCs.""" +"""Unit test data for powertrain_build.zone_controller.composition_yaml with DTCs.""" from test_data.zone_controller.test_composition_yaml import composition_yaml_setup diff --git a/tests/interface/__init__.py b/tests/interface/__init__.py index 937ff95..fb51ae6 100644 --- a/tests/interface/__init__.py +++ b/tests/interface/__init__.py @@ -1,4 +1,4 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""pybuild.interface unit tests.""" +"""powertrain_build.interface unit tests.""" diff --git a/tests/interface/test_export_global_vars.py b/tests/interface/test_export_global_vars.py index 30a786d..34c93e6 100644 --- a/tests/interface/test_export_global_vars.py +++ b/tests/interface/test_export_global_vars.py @@ -5,7 +5,7 @@ from unittest import TestCase, mock -from pybuild.interface.export_global_vars import get_global_variables +from powertrain_build.interface.export_global_vars import get_global_variables class TestGlobalVarsExport(TestCase): @@ -33,7 +33,9 @@ class TestGlobalVarsExport(TestCase): }, }, ) - with mock.patch("pybuild.interface.export_global_vars._get_project_data", return_value=dummy_pybuild_return): + with mock.patch( + "powertrain_build.interface.export_global_vars._get_project_data", return_value=dummy_pybuild_return + ): result = get_global_variables("Dummy") expected_variables = [ {"name": "sVcOut_D_One", "type": "dummy_type"}, diff --git a/tests/interface/test_generate_hi_interface.py b/tests/interface/test_generate_hi_interface.py index 03af19b..7ef2194 100644 --- a/tests/interface/test_generate_hi_interface.py +++ b/tests/interface/test_generate_hi_interface.py @@ -10,7 +10,7 @@ from argparse import Namespace from pathlib import Path from unittest import TestCase from ruamel.yaml import YAML -from pybuild.interface.generate_hi_interface import generate_hi_interface +from powertrain_build.interface.generate_hi_interface import generate_hi_interface class TestHIManifestParser(TestCase): diff --git a/tests/interface/test_generation_utils.py b/tests/interface/test_generation_utils.py index 3b057c4..6d5e3ae 100644 --- a/tests/interface/test_generation_utils.py +++ b/tests/interface/test_generation_utils.py @@ -6,20 +6,20 @@ import unittest from unittest import mock -from pybuild.interface import generation_utils -from pybuild.interface.application import Application, Raster -from pybuild.interface.base import Signal -from pybuild.interface.hal import HALA +from powertrain_build.interface import generation_utils +from powertrain_build.interface.application import Application, Raster +from powertrain_build.interface.base import Signal +from powertrain_build.interface.hal import HALA class TestGenerationUtils(unittest.TestCase): """Test cases for the generation utils.""" - @mock.patch('pybuild.interface.application.Raster.insignals', new_callable=mock.PropertyMock) - @mock.patch('pybuild.interface.application.Raster.outsignals', new_callable=mock.PropertyMock) - @mock.patch('pybuild.interface.csp_api.CspApi.read_translation') - @mock.patch('pybuild.interface.hal.HALA.get_map_file') - @mock.patch('pybuild.interface.hal.HALA._get_hal_translation') + @mock.patch('powertrain_build.interface.application.Raster.insignals', new_callable=mock.PropertyMock) + @mock.patch('powertrain_build.interface.application.Raster.outsignals', new_callable=mock.PropertyMock) + @mock.patch('powertrain_build.interface.csp_api.CspApi.read_translation') + @mock.patch('powertrain_build.interface.hal.HALA.get_map_file') + @mock.patch('powertrain_build.interface.hal.HALA._get_hal_translation') def test_get_interface(self, mock_hal_translation, mock_hal_file, mock_read_file, raster_out, raster_in): """Test get_interface method.""" # Setup signals diff --git a/tests/interface/test_interface.py b/tests/interface/test_interface.py index dc5dd8d..de76773 100644 --- a/tests/interface/test_interface.py +++ b/tests/interface/test_interface.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from pybuild.interface.base import Domain, Interface, MultipleProducersError, Signal +from powertrain_build.interface.base import Domain, Interface, MultipleProducersError, Signal class DummyApp: diff --git a/tests/interface/test_interface_application.py b/tests/interface/test_interface_application.py index 6976035..f03e3c0 100644 --- a/tests/interface/test_interface_application.py +++ b/tests/interface/test_interface_application.py @@ -5,13 +5,13 @@ import pathlib import unittest from unittest import mock -from pybuild.interface.application import Application, Raster, Model -from pybuild.interface.base import Signal +from powertrain_build.interface.application import Application, Raster, Model +from powertrain_build.interface.base import Signal class TestApplication(unittest.TestCase): def test_parse_definition(self): - # Tested in pybuild. + # Tested in powertrain_build. pass def test_parse_ports(self): diff --git a/tests/interface/test_interface_device_proxy.py b/tests/interface/test_interface_device_proxy.py index 295eea9..9c0f305 100644 --- a/tests/interface/test_interface_device_proxy.py +++ b/tests/interface/test_interface_device_proxy.py @@ -4,8 +4,8 @@ import unittest from unittest import mock -from pybuild.interface.base import Signal -from pybuild.interface.device_proxy import DPAL, BadYamlFormat +from powertrain_build.interface.base import Signal +from powertrain_build.interface.device_proxy import DPAL, BadYamlFormat class TestDPAL(unittest.TestCase): diff --git a/tests/interface/test_interface_hal.py b/tests/interface/test_interface_hal.py index f1becc9..c031634 100644 --- a/tests/interface/test_interface_hal.py +++ b/tests/interface/test_interface_hal.py @@ -6,8 +6,8 @@ import unittest from unittest import mock -from pybuild.interface.base import Signal -from pybuild.interface.hal import HALA +from powertrain_build.interface.base import Signal +from powertrain_build.interface.hal import HALA SIGNAL_SPEC = ( "enum_0", # enum padding diff --git a/tests/interface/test_interface_service.py b/tests/interface/test_interface_service.py index 08f76ec..4342288 100644 --- a/tests/interface/test_interface_service.py +++ b/tests/interface/test_interface_service.py @@ -5,9 +5,9 @@ import unittest from unittest import mock from pathlib import Path -from pybuild.interface.base import Signal -from pybuild.interface.service import ServiceFramework, get_service_list -from pybuild.interface.csp_api import MissingApi +from powertrain_build.interface.base import Signal +from powertrain_build.interface.service import ServiceFramework, get_service_list +from powertrain_build.interface.csp_api import MissingApi SIGNAL_SPEC = ( diff --git a/tests/interface/test_model_yaml_verification.py b/tests/interface/test_model_yaml_verification.py index 820b62a..dcb16b3 100644 --- a/tests/interface/test_model_yaml_verification.py +++ b/tests/interface/test_model_yaml_verification.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from pybuild.interface.model_yaml_verification import ModelYmlVerification +from powertrain_build.interface.model_yaml_verification import ModelYmlVerification class TestModelYamlVerification(unittest.TestCase): diff --git a/tests/interface/test_simulink.py b/tests/interface/test_simulink.py index 3154ae4..a04272e 100644 --- a/tests/interface/test_simulink.py +++ b/tests/interface/test_simulink.py @@ -8,7 +8,7 @@ import json import os import unittest -from pybuild.interface import simulink +from powertrain_build.interface import simulink class TestSimulink(unittest.TestCase): diff --git a/tests/interface/test_update_call_sources.py b/tests/interface/test_update_call_sources.py index 0ac9260..19a2a7a 100644 --- a/tests/interface/test_update_call_sources.py +++ b/tests/interface/test_update_call_sources.py @@ -7,7 +7,7 @@ import json import unittest -from pybuild.interface import update_call_sources +from powertrain_build.interface import update_call_sources # C-Code chunks CHUNK_0 = ( diff --git a/tests/interface/test_update_model_yaml.py b/tests/interface/test_update_model_yaml.py index d9f4551..618fa86 100644 --- a/tests/interface/test_update_model_yaml.py +++ b/tests/interface/test_update_model_yaml.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from pybuild.interface.update_model_yaml import BadYamlFormat, UpdateYmlFormat +from powertrain_build.interface.update_model_yaml import BadYamlFormat, UpdateYmlFormat class TestUpdateYamlFormat(unittest.TestCase): diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py index fbb6ed9..ce8acf1 100644 --- a/tests/lib/__init__.py +++ b/tests/lib/__init__.py @@ -1,4 +1,4 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""pybuild.lib unit tests.""" +"""powertrain_build.lib unit tests.""" diff --git a/tests/lib/test_helper_functions.py b/tests/lib/test_helper_functions.py index 38476aa..85885ce 100644 --- a/tests/lib/test_helper_functions.py +++ b/tests/lib/test_helper_functions.py @@ -3,7 +3,7 @@ """Unittests for helper_functions.""" import unittest -from pybuild.lib import helper_functions as HF +from powertrain_build.lib import helper_functions as HF class TestHelperFunctions(unittest.TestCase): diff --git a/tests/lib/test_logger.py b/tests/lib/test_logger.py index 43b404a..377445c 100644 --- a/tests/lib/test_logger.py +++ b/tests/lib/test_logger.py @@ -2,7 +2,7 @@ # Licensed under Apache 2.0. """Unit tests for logger module.""" -from pybuild.lib import logger +from powertrain_build.lib import logger def test_parse_log_level_default_on_error(): diff --git a/tests/pybuild/.pylintrc b/tests/powertrain_build/.pylintrc similarity index 100% rename from tests/pybuild/.pylintrc rename to tests/powertrain_build/.pylintrc diff --git a/tests/pybuild/__init__.py b/tests/powertrain_build/__init__.py similarity index 100% rename from tests/pybuild/__init__.py rename to tests/powertrain_build/__init__.py diff --git a/tests/pybuild/a2l_merge_data.py b/tests/powertrain_build/a2l_merge_data.py similarity index 100% rename from tests/pybuild/a2l_merge_data.py rename to tests/powertrain_build/a2l_merge_data.py diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/CAN-Input.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/CAN-Input.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/CAN-Input.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/CAN-Input.csv diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/CAN-Output.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/CAN-Output.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/CAN-Output.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/CAN-Output.csv diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/EMS-Input.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/EMS-Input.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/EMS-Input.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/EMS-Input.csv diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/EMS-Output.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/EMS-Output.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/EMS-Output.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/EMS-Output.csv diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/LIN-Input.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/LIN-Input.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/LIN-Input.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/LIN-Input.csv diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/LIN-Output.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/LIN-Output.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/LIN-Output.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/LIN-Output.csv diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/Legend.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/Legend.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/Legend.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/Legend.csv diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/Private CAN-Input.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/Private CAN-Input.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/Private CAN-Input.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/Private CAN-Input.csv diff --git a/tests/pybuild/cnfg_files/ActiveInterfaces/Private CAN-Output.csv b/tests/powertrain_build/cnfg_files/ActiveInterfaces/Private CAN-Output.csv similarity index 100% rename from tests/pybuild/cnfg_files/ActiveInterfaces/Private CAN-Output.csv rename to tests/powertrain_build/cnfg_files/ActiveInterfaces/Private CAN-Output.csv diff --git a/tests/pybuild/cnfg_files/BaseConfig.json b/tests/powertrain_build/cnfg_files/BaseConfig.json similarity index 100% rename from tests/pybuild/cnfg_files/BaseConfig.json rename to tests/powertrain_build/cnfg_files/BaseConfig.json diff --git a/tests/pybuild/cnfg_files/CoreIdNameDefinition_EventIDs.csv b/tests/powertrain_build/cnfg_files/CoreIdNameDefinition_EventIDs.csv similarity index 100% rename from tests/pybuild/cnfg_files/CoreIdNameDefinition_EventIDs.csv rename to tests/powertrain_build/cnfg_files/CoreIdNameDefinition_EventIDs.csv diff --git a/tests/pybuild/cnfg_files/CoreIdNameDefinition_FunctionIDs.csv b/tests/powertrain_build/cnfg_files/CoreIdNameDefinition_FunctionIDs.csv similarity index 100% rename from tests/pybuild/cnfg_files/CoreIdNameDefinition_FunctionIDs.csv rename to tests/powertrain_build/cnfg_files/CoreIdNameDefinition_FunctionIDs.csv diff --git a/tests/pybuild/cnfg_files/CoreIdNameDefinition_IUMPR.csv b/tests/powertrain_build/cnfg_files/CoreIdNameDefinition_IUMPR.csv similarity index 100% rename from tests/pybuild/cnfg_files/CoreIdNameDefinition_IUMPR.csv rename to tests/powertrain_build/cnfg_files/CoreIdNameDefinition_IUMPR.csv diff --git a/tests/pybuild/cnfg_files/CoreIdNameDefinition_Mode$06.csv b/tests/powertrain_build/cnfg_files/CoreIdNameDefinition_Mode$06.csv similarity index 100% rename from tests/pybuild/cnfg_files/CoreIdNameDefinition_Mode$06.csv rename to tests/powertrain_build/cnfg_files/CoreIdNameDefinition_Mode$06.csv diff --git a/tests/pybuild/cnfg_files/CoreIdNameDefinition_Ranking.csv b/tests/powertrain_build/cnfg_files/CoreIdNameDefinition_Ranking.csv similarity index 100% rename from tests/pybuild/cnfg_files/CoreIdNameDefinition_Ranking.csv rename to tests/powertrain_build/cnfg_files/CoreIdNameDefinition_Ranking.csv diff --git a/tests/pybuild/cnfg_files/DIDIds_FullRange_Float32.csv b/tests/powertrain_build/cnfg_files/DIDIds_FullRange_Float32.csv similarity index 100% rename from tests/pybuild/cnfg_files/DIDIds_FullRange_Float32.csv rename to tests/powertrain_build/cnfg_files/DIDIds_FullRange_Float32.csv diff --git a/tests/pybuild/cnfg_files/DIDIds_FullRange_UInt32.csv b/tests/powertrain_build/cnfg_files/DIDIds_FullRange_UInt32.csv similarity index 100% rename from tests/pybuild/cnfg_files/DIDIds_FullRange_UInt32.csv rename to tests/powertrain_build/cnfg_files/DIDIds_FullRange_UInt32.csv diff --git a/tests/pybuild/cnfg_files/LabelsplitCfg.json b/tests/powertrain_build/cnfg_files/LabelsplitCfg.json similarity index 100% rename from tests/pybuild/cnfg_files/LabelsplitCfg.json rename to tests/powertrain_build/cnfg_files/LabelsplitCfg.json diff --git a/tests/pybuild/cnfg_files/Mock-gen_allsysteminfo-_get_core_ids.json b/tests/powertrain_build/cnfg_files/Mock-gen_allsysteminfo-_get_core_ids.json similarity index 100% rename from tests/pybuild/cnfg_files/Mock-gen_allsysteminfo-_get_core_ids.json rename to tests/powertrain_build/cnfg_files/Mock-gen_allsysteminfo-_get_core_ids.json diff --git a/tests/pybuild/cnfg_files/Mock-gen_allsysteminfo-_get_dids.json b/tests/powertrain_build/cnfg_files/Mock-gen_allsysteminfo-_get_dids.json similarity index 100% rename from tests/pybuild/cnfg_files/Mock-gen_allsysteminfo-_get_dids.json rename to tests/powertrain_build/cnfg_files/Mock-gen_allsysteminfo-_get_dids.json diff --git a/tests/pybuild/cnfg_files/Mock-unit_configs-get_per_unit_cfg.json b/tests/powertrain_build/cnfg_files/Mock-unit_configs-get_per_unit_cfg.json similarity index 100% rename from tests/pybuild/cnfg_files/Mock-unit_configs-get_per_unit_cfg.json rename to tests/powertrain_build/cnfg_files/Mock-unit_configs-get_per_unit_cfg.json diff --git a/tests/pybuild/cnfg_files/ProjectCfg.json b/tests/powertrain_build/cnfg_files/ProjectCfg.json similarity index 100% rename from tests/pybuild/cnfg_files/ProjectCfg.json rename to tests/powertrain_build/cnfg_files/ProjectCfg.json diff --git a/tests/pybuild/cnfg_files/SPMEMSInterfaceRequirements_ExportedToCSV.xlsm b/tests/powertrain_build/cnfg_files/SPMEMSInterfaceRequirements_ExportedToCSV.xlsm similarity index 100% rename from tests/pybuild/cnfg_files/SPMEMSInterfaceRequirements_ExportedToCSV.xlsm rename to tests/powertrain_build/cnfg_files/SPMEMSInterfaceRequirements_ExportedToCSV.xlsm diff --git a/tests/pybuild/cnfg_files/SPM_Codeswitch_Setup.csv b/tests/powertrain_build/cnfg_files/SPM_Codeswitch_Setup.csv similarity index 100% rename from tests/pybuild/cnfg_files/SPM_Codeswitch_Setup.csv rename to tests/powertrain_build/cnfg_files/SPM_Codeswitch_Setup.csv diff --git a/tests/pybuild/cnfg_files/SPM_Codeswitch_Setup_PVC.csv b/tests/powertrain_build/cnfg_files/SPM_Codeswitch_Setup_PVC.csv similarity index 100% rename from tests/pybuild/cnfg_files/SPM_Codeswitch_Setup_PVC.csv rename to tests/powertrain_build/cnfg_files/SPM_Codeswitch_Setup_PVC.csv diff --git a/tests/pybuild/cnfg_files/VcAesSupM.a2l b/tests/powertrain_build/cnfg_files/VcAesSupM.a2l similarity index 100% rename from tests/pybuild/cnfg_files/VcAesSupM.a2l rename to tests/powertrain_build/cnfg_files/VcAesSupM.a2l diff --git a/tests/pybuild/cnfg_files/VcVmcPmm.c b/tests/powertrain_build/cnfg_files/VcVmcPmm.c similarity index 100% rename from tests/pybuild/cnfg_files/VcVmcPmm.c rename to tests/powertrain_build/cnfg_files/VcVmcPmm.c diff --git a/tests/pybuild/cnfg_files/VcVmcPmm.e b/tests/powertrain_build/cnfg_files/VcVmcPmm.e similarity index 100% rename from tests/pybuild/cnfg_files/VcVmcPmm.e rename to tests/powertrain_build/cnfg_files/VcVmcPmm.e diff --git a/tests/pybuild/cnfg_files/VcVmcPmm__HEP7_OPortMvd_LocalDefs.h b/tests/powertrain_build/cnfg_files/VcVmcPmm__HEP7_OPortMvd_LocalDefs.h similarity index 100% rename from tests/pybuild/cnfg_files/VcVmcPmm__HEP7_OPortMvd_LocalDefs.h rename to tests/powertrain_build/cnfg_files/VcVmcPmm__HEP7_OPortMvd_LocalDefs.h diff --git a/tests/pybuild/cnfg_files/conf.local/interface_data_types.yml b/tests/powertrain_build/cnfg_files/conf.local/interface_data_types.yml similarity index 100% rename from tests/pybuild/cnfg_files/conf.local/interface_data_types.yml rename to tests/powertrain_build/cnfg_files/conf.local/interface_data_types.yml diff --git a/tests/pybuild/cnfg_files/config_VcVmcPmm__HEP7.json b/tests/powertrain_build/cnfg_files/config_VcVmcPmm__HEP7.json similarity index 100% rename from tests/pybuild/cnfg_files/config_VcVmcPmm__HEP7.json rename to tests/powertrain_build/cnfg_files/config_VcVmcPmm__HEP7.json diff --git a/tests/pybuild/cnfg_files/expected_signals_in_nvm_structs.json b/tests/powertrain_build/cnfg_files/expected_signals_in_nvm_structs.json similarity index 100% rename from tests/pybuild/cnfg_files/expected_signals_in_nvm_structs.json rename to tests/powertrain_build/cnfg_files/expected_signals_in_nvm_structs.json diff --git a/tests/pybuild/cnfg_files/invalid_unit_cfgs/config_ invalid name.json b/tests/powertrain_build/cnfg_files/invalid_unit_cfgs/config_ invalid name.json similarity index 100% rename from tests/pybuild/cnfg_files/invalid_unit_cfgs/config_ invalid name.json rename to tests/powertrain_build/cnfg_files/invalid_unit_cfgs/config_ invalid name.json diff --git a/tests/pybuild/cnfg_files/invalid_unit_cfgs/config_InvalidConfig.json b/tests/powertrain_build/cnfg_files/invalid_unit_cfgs/config_InvalidConfig.json similarity index 100% rename from tests/pybuild/cnfg_files/invalid_unit_cfgs/config_InvalidConfig.json rename to tests/powertrain_build/cnfg_files/invalid_unit_cfgs/config_InvalidConfig.json diff --git a/tests/pybuild/cnfg_files/invalid_unit_cfgs/config_InvalidJsonData.json b/tests/powertrain_build/cnfg_files/invalid_unit_cfgs/config_InvalidJsonData.json similarity index 100% rename from tests/pybuild/cnfg_files/invalid_unit_cfgs/config_InvalidJsonData.json rename to tests/powertrain_build/cnfg_files/invalid_unit_cfgs/config_InvalidJsonData.json diff --git a/tests/pybuild/cnfg_files/label_split_cfg.json b/tests/powertrain_build/cnfg_files/label_split_cfg.json similarity index 100% rename from tests/pybuild/cnfg_files/label_split_cfg.json rename to tests/powertrain_build/cnfg_files/label_split_cfg.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_critical.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_critical.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_critical.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_critical.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_critical_duplicate.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_critical_duplicate.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_critical_duplicate.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_critical_duplicate.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_dcl.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_dcl.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_dcl.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_dcl.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_empty.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_empty.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_empty.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_empty.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_empty_small.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_empty_small.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_empty_small.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_empty_small.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_single_signal.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_single_signal.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_single_signal.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_single_signal.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_small.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_small.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_small.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_small.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_used_positions.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_used_positions.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_used_positions.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_used_positions.json diff --git a/tests/pybuild/cnfg_files/nvm_structs_ref_wrong_type.json b/tests/powertrain_build/cnfg_files/nvm_structs_ref_wrong_type.json similarity index 100% rename from tests/pybuild/cnfg_files/nvm_structs_ref_wrong_type.json rename to tests/powertrain_build/cnfg_files/nvm_structs_ref_wrong_type.json diff --git a/tests/pybuild/cnfg_files/rasters.json b/tests/powertrain_build/cnfg_files/rasters.json similarity index 100% rename from tests/pybuild/cnfg_files/rasters.json rename to tests/powertrain_build/cnfg_files/rasters.json diff --git a/tests/pybuild/cnfg_files/signalinterface.yaml b/tests/powertrain_build/cnfg_files/signalinterface.yaml similarity index 100% rename from tests/pybuild/cnfg_files/signalinterface.yaml rename to tests/powertrain_build/cnfg_files/signalinterface.yaml diff --git a/tests/pybuild/cnfg_files/test-repo/ConfigDocuments/BaseConfig.json b/tests/powertrain_build/cnfg_files/test-repo/ConfigDocuments/BaseConfig.json similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/ConfigDocuments/BaseConfig.json rename to tests/powertrain_build/cnfg_files/test-repo/ConfigDocuments/BaseConfig.json diff --git a/tests/pybuild/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/VcTestRx.yaml b/tests/powertrain_build/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/VcTestRx.yaml similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/VcTestRx.yaml rename to tests/powertrain_build/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/VcTestRx.yaml diff --git a/tests/pybuild/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/config_VcTestRx.json b/tests/powertrain_build/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/config_VcTestRx.json similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/config_VcTestRx.json rename to tests/powertrain_build/cnfg_files/test-repo/Models/IF/VcTestRx/pybuild_cfg/config_VcTestRx.json diff --git a/tests/pybuild/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/VcTestTx.yaml b/tests/powertrain_build/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/VcTestTx.yaml similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/VcTestTx.yaml rename to tests/powertrain_build/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/VcTestTx.yaml diff --git a/tests/pybuild/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/config_VcTestTx.json b/tests/powertrain_build/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/config_VcTestTx.json similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/config_VcTestTx.json rename to tests/powertrain_build/cnfg_files/test-repo/Models/IF/VcTestTx/pybuild_cfg/config_VcTestTx.json diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup_Thermal.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup_Thermal.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup_Thermal.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CSP_Codeswitch_Setup_Thermal.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_EventIDs.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_EventIDs.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_EventIDs.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_EventIDs.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_FunctionIDs.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_FunctionIDs.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_FunctionIDs.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_FunctionIDs.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPR.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPR.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPR.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPR.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPRDen.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPRDen.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPRDen.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_IUMPRDen.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Mode$06.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Mode$06.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Mode$06.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Mode$06.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Ranking.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Ranking.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Ranking.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/CoreIdNameDefinition_Ranking.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_Float32.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_Float32.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_Float32.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_Float32.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_Float32.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_Float32.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_Float32.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_Float32.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_UInt32.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_UInt32.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_UInt32.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_FullRange_UInt32.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_UInt32.csv b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_UInt32.csv similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_UInt32.csv rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ConfigDocuments/DIDIds_UInt32.csv diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ProjectCfg.json b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ProjectCfg.json similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/ProjectCfg.json rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/ProjectCfg.json diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/DeviceDomains.json b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/DeviceDomains.json similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/DeviceDomains.json rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/DeviceDomains.json diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/ServiceInterfaces.json b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/ServiceInterfaces.json similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/ServiceInterfaces.json rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/ServiceInterfaces.json diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/cs-module.yml b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/cs-module.yml similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/cs-module.yml rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/cs-module.yml diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/nvm_structs.json b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/nvm_structs.json similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/nvm_structs.json rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/nvm_structs.json diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/project_defaults.txt b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/project_defaults.txt similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/project_defaults.txt rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/project_defaults.txt diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/rasters.json b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/rasters.json similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/rasters.json rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/CATC/conf.local/rasters.json diff --git a/tests/pybuild/cnfg_files/test-repo/Projects/CSP/hal_list.yaml b/tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/hal_list.yaml similarity index 100% rename from tests/pybuild/cnfg_files/test-repo/Projects/CSP/hal_list.yaml rename to tests/powertrain_build/cnfg_files/test-repo/Projects/CSP/hal_list.yaml diff --git a/tests/pybuild/cnfg_files/test.a2l b/tests/powertrain_build/cnfg_files/test.a2l similarity index 100% rename from tests/pybuild/cnfg_files/test.a2l rename to tests/powertrain_build/cnfg_files/test.a2l diff --git a/tests/pybuild/cnfg_files/test_consumer.a2l b/tests/powertrain_build/cnfg_files/test_consumer.a2l similarity index 100% rename from tests/pybuild/cnfg_files/test_consumer.a2l rename to tests/powertrain_build/cnfg_files/test_consumer.a2l diff --git a/tests/pybuild/cnfg_files/test_mrg__kalle.a2l b/tests/powertrain_build/cnfg_files/test_mrg__kalle.a2l similarity index 100% rename from tests/pybuild/cnfg_files/test_mrg__kalle.a2l rename to tests/powertrain_build/cnfg_files/test_mrg__kalle.a2l diff --git a/tests/pybuild/cnfg_files/test_producer.a2l b/tests/powertrain_build/cnfg_files/test_producer.a2l similarity index 100% rename from tests/pybuild/cnfg_files/test_producer.a2l rename to tests/powertrain_build/cnfg_files/test_producer.a2l diff --git a/tests/pybuild/cnfg_files/tl_aux_defines_VmcPmm__HE.h b/tests/powertrain_build/cnfg_files/tl_aux_defines_VmcPmm__HE.h similarity index 100% rename from tests/pybuild/cnfg_files/tl_aux_defines_VmcPmm__HE.h rename to tests/powertrain_build/cnfg_files/tl_aux_defines_VmcPmm__HE.h diff --git a/tests/pybuild/cnfg_files/unit_cfgs/Invalid_If_LocalDefs.h b/tests/powertrain_build/cnfg_files/unit_cfgs/Invalid_If_LocalDefs.h similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs/Invalid_If_LocalDefs.h rename to tests/powertrain_build/cnfg_files/unit_cfgs/Invalid_If_LocalDefs.h diff --git a/tests/pybuild/cnfg_files/unit_cfgs/Invalid_Include_LocalDefs.h b/tests/powertrain_build/cnfg_files/unit_cfgs/Invalid_Include_LocalDefs.h similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs/Invalid_Include_LocalDefs.h rename to tests/powertrain_build/cnfg_files/unit_cfgs/Invalid_Include_LocalDefs.h diff --git a/tests/pybuild/cnfg_files/unit_cfgs/Valid_Local_Reference_LocalDefs.h b/tests/powertrain_build/cnfg_files/unit_cfgs/Valid_Local_Reference_LocalDefs.h similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs/Valid_Local_Reference_LocalDefs.h rename to tests/powertrain_build/cnfg_files/unit_cfgs/Valid_Local_Reference_LocalDefs.h diff --git a/tests/pybuild/cnfg_files/unit_cfgs/Valid_Reference_LocalDefs.h b/tests/powertrain_build/cnfg_files/unit_cfgs/Valid_Reference_LocalDefs.h similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs/Valid_Reference_LocalDefs.h rename to tests/powertrain_build/cnfg_files/unit_cfgs/Valid_Reference_LocalDefs.h diff --git a/tests/pybuild/cnfg_files/unit_cfgs/VcAesSupM__gen3_OPortMvd_LocalDefs.h b/tests/powertrain_build/cnfg_files/unit_cfgs/VcAesSupM__gen3_OPortMvd_LocalDefs.h similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs/VcAesSupM__gen3_OPortMvd_LocalDefs.h rename to tests/powertrain_build/cnfg_files/unit_cfgs/VcAesSupM__gen3_OPortMvd_LocalDefs.h diff --git a/tests/pybuild/cnfg_files/unit_cfgs/VcDeDa_OPortMvd_LocalDefs.h b/tests/powertrain_build/cnfg_files/unit_cfgs/VcDeDa_OPortMvd_LocalDefs.h similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs/VcDeDa_OPortMvd_LocalDefs.h rename to tests/powertrain_build/cnfg_files/unit_cfgs/VcDeDa_OPortMvd_LocalDefs.h diff --git a/tests/pybuild/cnfg_files/unit_cfgs/config_VcAesSupM__gen3.json b/tests/powertrain_build/cnfg_files/unit_cfgs/config_VcAesSupM__gen3.json similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs/config_VcAesSupM__gen3.json rename to tests/powertrain_build/cnfg_files/unit_cfgs/config_VcAesSupM__gen3.json diff --git a/tests/pybuild/cnfg_files/unit_cfgs_ec/VcAesSupM__gen3_OPortMvd_LocalDefs.h b/tests/powertrain_build/cnfg_files/unit_cfgs_ec/VcAesSupM__gen3_OPortMvd_LocalDefs.h similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs_ec/VcAesSupM__gen3_OPortMvd_LocalDefs.h rename to tests/powertrain_build/cnfg_files/unit_cfgs_ec/VcAesSupM__gen3_OPortMvd_LocalDefs.h diff --git a/tests/pybuild/cnfg_files/unit_cfgs_ec/config_VcAesSupM__gen3.json b/tests/powertrain_build/cnfg_files/unit_cfgs_ec/config_VcAesSupM__gen3.json similarity index 100% rename from tests/pybuild/cnfg_files/unit_cfgs_ec/config_VcAesSupM__gen3.json rename to tests/powertrain_build/cnfg_files/unit_cfgs_ec/config_VcAesSupM__gen3.json diff --git a/tests/pybuild/common_src_files/Tab1DIntpI1T0.c b/tests/powertrain_build/common_src_files/Tab1DIntpI1T0.c similarity index 100% rename from tests/pybuild/common_src_files/Tab1DIntpI1T0.c rename to tests/powertrain_build/common_src_files/Tab1DIntpI1T0.c diff --git a/tests/pybuild/core_cnfg.py b/tests/powertrain_build/core_cnfg.py similarity index 100% rename from tests/pybuild/core_cnfg.py rename to tests/powertrain_build/core_cnfg.py diff --git a/tests/pybuild/core_dummy_cnfg.py b/tests/powertrain_build/core_dummy_cnfg.py similarity index 100% rename from tests/pybuild/core_dummy_cnfg.py rename to tests/powertrain_build/core_dummy_cnfg.py diff --git a/tests/pybuild/io_cnfg.py b/tests/powertrain_build/io_cnfg.py similarity index 100% rename from tests/pybuild/io_cnfg.py rename to tests/powertrain_build/io_cnfg.py diff --git a/tests/pybuild/reference_files/EmptySigCheck.html b/tests/powertrain_build/reference_files/EmptySigCheck.html similarity index 100% rename from tests/pybuild/reference_files/EmptySigCheck.html rename to tests/powertrain_build/reference_files/EmptySigCheck.html diff --git a/tests/pybuild/reference_files/EnumTest.m b/tests/powertrain_build/reference_files/EnumTest.m similarity index 100% rename from tests/pybuild/reference_files/EnumTest.m rename to tests/powertrain_build/reference_files/EnumTest.m diff --git a/tests/pybuild/reference_files/OPort_defs.json b/tests/powertrain_build/reference_files/OPort_defs.json similarity index 100% rename from tests/pybuild/reference_files/OPort_defs.json rename to tests/powertrain_build/reference_files/OPort_defs.json diff --git a/tests/pybuild/reference_files/SS1/test_model/VcTestModel.h b/tests/powertrain_build/reference_files/SS1/test_model/VcTestModel.h similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model/VcTestModel.h rename to tests/powertrain_build/reference_files/SS1/test_model/VcTestModel.h diff --git a/tests/pybuild/reference_files/SS1/test_model/VcTestModel_par.m b/tests/powertrain_build/reference_files/SS1/test_model/VcTestModel_par.m similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model/VcTestModel_par.m rename to tests/powertrain_build/reference_files/SS1/test_model/VcTestModel_par.m diff --git a/tests/pybuild/reference_files/SS1/test_model/VcTestModel_sgp.xml b/tests/powertrain_build/reference_files/SS1/test_model/VcTestModel_sgp.xml similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model/VcTestModel_sgp.xml rename to tests/powertrain_build/reference_files/SS1/test_model/VcTestModel_sgp.xml diff --git a/tests/pybuild/reference_files/SS1/test_model/udt_VcTestModel.h b/tests/powertrain_build/reference_files/SS1/test_model/udt_VcTestModel.h similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model/udt_VcTestModel.h rename to tests/powertrain_build/reference_files/SS1/test_model/udt_VcTestModel.h diff --git a/tests/pybuild/reference_files/SS1/test_model1/VcTestModel1.h b/tests/powertrain_build/reference_files/SS1/test_model1/VcTestModel1.h similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model1/VcTestModel1.h rename to tests/powertrain_build/reference_files/SS1/test_model1/VcTestModel1.h diff --git a/tests/pybuild/reference_files/SS1/test_model1/VcTestModel1_par.m b/tests/powertrain_build/reference_files/SS1/test_model1/VcTestModel1_par.m similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model1/VcTestModel1_par.m rename to tests/powertrain_build/reference_files/SS1/test_model1/VcTestModel1_par.m diff --git a/tests/pybuild/reference_files/SS1/test_model1/udt_VcTestModel1.h b/tests/powertrain_build/reference_files/SS1/test_model1/udt_VcTestModel1.h similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model1/udt_VcTestModel1.h rename to tests/powertrain_build/reference_files/SS1/test_model1/udt_VcTestModel1.h diff --git a/tests/pybuild/reference_files/SS1/test_model2/VcTestModel2.h b/tests/powertrain_build/reference_files/SS1/test_model2/VcTestModel2.h similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model2/VcTestModel2.h rename to tests/powertrain_build/reference_files/SS1/test_model2/VcTestModel2.h diff --git a/tests/pybuild/reference_files/SS1/test_model2/udt_VcTestModel2.h b/tests/powertrain_build/reference_files/SS1/test_model2/udt_VcTestModel2.h similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model2/udt_VcTestModel2.h rename to tests/powertrain_build/reference_files/SS1/test_model2/udt_VcTestModel2.h diff --git a/tests/pybuild/reference_files/SS1/test_model3/VcTestModel3.h b/tests/powertrain_build/reference_files/SS1/test_model3/VcTestModel3.h similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model3/VcTestModel3.h rename to tests/powertrain_build/reference_files/SS1/test_model3/VcTestModel3.h diff --git a/tests/pybuild/reference_files/SS1/test_model3/udt_VcTestModel3.h b/tests/powertrain_build/reference_files/SS1/test_model3/udt_VcTestModel3.h similarity index 100% rename from tests/pybuild/reference_files/SS1/test_model3/udt_VcTestModel3.h rename to tests/powertrain_build/reference_files/SS1/test_model3/udt_VcTestModel3.h diff --git a/tests/pybuild/reference_files/SigIf.html b/tests/powertrain_build/reference_files/SigIf.html similarity index 100% rename from tests/pybuild/reference_files/SigIf.html rename to tests/powertrain_build/reference_files/SigIf.html diff --git a/tests/pybuild/reference_files/SigIfAll.html b/tests/powertrain_build/reference_files/SigIfAll.html similarity index 100% rename from tests/pybuild/reference_files/SigIfAll.html rename to tests/powertrain_build/reference_files/SigIfAll.html diff --git a/tests/pybuild/reference_files/SimulinkEnum.m b/tests/powertrain_build/reference_files/SimulinkEnum.m similarity index 100% rename from tests/pybuild/reference_files/SimulinkEnum.m rename to tests/powertrain_build/reference_files/SimulinkEnum.m diff --git a/tests/pybuild/reference_files/VEA_VED4_SPA.a2l b/tests/powertrain_build/reference_files/VEA_VED4_SPA.a2l similarity index 100% rename from tests/pybuild/reference_files/VEA_VED4_SPA.a2l rename to tests/powertrain_build/reference_files/VEA_VED4_SPA.a2l diff --git a/tests/pybuild/reference_files/VcDummy_spm.c b/tests/powertrain_build/reference_files/VcDummy_spm.c similarity index 100% rename from tests/pybuild/reference_files/VcDummy_spm.c rename to tests/powertrain_build/reference_files/VcDummy_spm.c diff --git a/tests/pybuild/reference_files/VcDummy_spm.h b/tests/powertrain_build/reference_files/VcDummy_spm.h similarity index 100% rename from tests/pybuild/reference_files/VcDummy_spm.h rename to tests/powertrain_build/reference_files/VcDummy_spm.h diff --git a/tests/pybuild/reference_files/VcDummy_spm_with_enum.h b/tests/powertrain_build/reference_files/VcDummy_spm_with_enum.h similarity index 100% rename from tests/pybuild/reference_files/VcDummy_spm_with_enum.h rename to tests/powertrain_build/reference_files/VcDummy_spm_with_enum.h diff --git a/tests/pybuild/reference_files/VcExtINI.c b/tests/powertrain_build/reference_files/VcExtINI.c similarity index 100% rename from tests/pybuild/reference_files/VcExtINI.c rename to tests/powertrain_build/reference_files/VcExtINI.c diff --git a/tests/pybuild/reference_files/WrongFileNameEnum.m b/tests/powertrain_build/reference_files/WrongFileNameEnum.m similarity index 100% rename from tests/pybuild/reference_files/WrongFileNameEnum.m rename to tests/powertrain_build/reference_files/WrongFileNameEnum.m diff --git a/tests/pybuild/reference_files/config_OPort_defs.json b/tests/powertrain_build/reference_files/config_OPort_defs.json similarity index 100% rename from tests/pybuild/reference_files/config_OPort_defs.json rename to tests/powertrain_build/reference_files/config_OPort_defs.json diff --git a/tests/pybuild/reference_files/config_VcVmcPmm_OPort.json b/tests/powertrain_build/reference_files/config_VcVmcPmm_OPort.json similarity index 100% rename from tests/pybuild/reference_files/config_VcVmcPmm_OPort.json rename to tests/powertrain_build/reference_files/config_VcVmcPmm_OPort.json diff --git a/tests/pybuild/reference_files/config_VcVmcPmm__HEP7.json b/tests/powertrain_build/reference_files/config_VcVmcPmm__HEP7.json similarity index 100% rename from tests/pybuild/reference_files/config_VcVmcPmm__HEP7.json rename to tests/powertrain_build/reference_files/config_VcVmcPmm__HEP7.json diff --git a/tests/pybuild/reference_files/config_aux_defs.json b/tests/powertrain_build/reference_files/config_aux_defs.json similarity index 100% rename from tests/pybuild/reference_files/config_aux_defs.json rename to tests/powertrain_build/reference_files/config_aux_defs.json diff --git a/tests/pybuild/reference_files/config_combined.json b/tests/powertrain_build/reference_files/config_combined.json similarity index 100% rename from tests/pybuild/reference_files/config_combined.json rename to tests/powertrain_build/reference_files/config_combined.json diff --git a/tests/pybuild/reference_files/config_combined_header.json b/tests/powertrain_build/reference_files/config_combined_header.json similarity index 100% rename from tests/pybuild/reference_files/config_combined_header.json rename to tests/powertrain_build/reference_files/config_combined_header.json diff --git a/tests/pybuild/reference_files/config_local_defs.json b/tests/powertrain_build/reference_files/config_local_defs.json similarity index 100% rename from tests/pybuild/reference_files/config_local_defs.json rename to tests/powertrain_build/reference_files/config_local_defs.json diff --git a/tests/pybuild/reference_files/nvm_structs_ref_dcl.json b/tests/powertrain_build/reference_files/nvm_structs_ref_dcl.json similarity index 100% rename from tests/pybuild/reference_files/nvm_structs_ref_dcl.json rename to tests/powertrain_build/reference_files/nvm_structs_ref_dcl.json diff --git a/tests/pybuild/reference_files/ts_test.h b/tests/powertrain_build/reference_files/ts_test.h similarity index 100% rename from tests/pybuild/reference_files/ts_test.h rename to tests/powertrain_build/reference_files/ts_test.h diff --git a/tests/pybuild/reference_files/vcc_nvm_struct_ref.a2l b/tests/powertrain_build/reference_files/vcc_nvm_struct_ref.a2l similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_struct_ref.a2l rename to tests/powertrain_build/reference_files/vcc_nvm_struct_ref.a2l diff --git a/tests/pybuild/reference_files/vcc_nvm_struct_ref.c b/tests/powertrain_build/reference_files/vcc_nvm_struct_ref.c similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_struct_ref.c rename to tests/powertrain_build/reference_files/vcc_nvm_struct_ref.c diff --git a/tests/pybuild/reference_files/vcc_nvm_struct_ref.h b/tests/powertrain_build/reference_files/vcc_nvm_struct_ref.h similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_struct_ref.h rename to tests/powertrain_build/reference_files/vcc_nvm_struct_ref.h diff --git a/tests/pybuild/reference_files/vcc_nvm_struct_ref_critical_duplicate.a2l b/tests/powertrain_build/reference_files/vcc_nvm_struct_ref_critical_duplicate.a2l similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_struct_ref_critical_duplicate.a2l rename to tests/powertrain_build/reference_files/vcc_nvm_struct_ref_critical_duplicate.a2l diff --git a/tests/pybuild/reference_files/vcc_nvm_struct_ref_critical_duplicate.h b/tests/powertrain_build/reference_files/vcc_nvm_struct_ref_critical_duplicate.h similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_struct_ref_critical_duplicate.h rename to tests/powertrain_build/reference_files/vcc_nvm_struct_ref_critical_duplicate.h diff --git a/tests/pybuild/reference_files/vcc_nvm_struct_ref_critical_remove.a2l b/tests/powertrain_build/reference_files/vcc_nvm_struct_ref_critical_remove.a2l similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_struct_ref_critical_remove.a2l rename to tests/powertrain_build/reference_files/vcc_nvm_struct_ref_critical_remove.a2l diff --git a/tests/pybuild/reference_files/vcc_nvm_struct_ref_critical_remove.h b/tests/powertrain_build/reference_files/vcc_nvm_struct_ref_critical_remove.h similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_struct_ref_critical_remove.h rename to tests/powertrain_build/reference_files/vcc_nvm_struct_ref_critical_remove.h diff --git a/tests/pybuild/reference_files/vcc_nvm_structs_critical.c b/tests/powertrain_build/reference_files/vcc_nvm_structs_critical.c similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_structs_critical.c rename to tests/powertrain_build/reference_files/vcc_nvm_structs_critical.c diff --git a/tests/pybuild/reference_files/vcc_nvm_structs_critical.h b/tests/powertrain_build/reference_files/vcc_nvm_structs_critical.h similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_structs_critical.h rename to tests/powertrain_build/reference_files/vcc_nvm_structs_critical.h diff --git a/tests/pybuild/reference_files/vcc_nvm_structs_critical_bosch.a2l b/tests/powertrain_build/reference_files/vcc_nvm_structs_critical_bosch.a2l similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_structs_critical_bosch.a2l rename to tests/powertrain_build/reference_files/vcc_nvm_structs_critical_bosch.a2l diff --git a/tests/pybuild/reference_files/vcc_nvm_structs_critical_denso.a2l b/tests/powertrain_build/reference_files/vcc_nvm_structs_critical_denso.a2l similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_structs_critical_denso.a2l rename to tests/powertrain_build/reference_files/vcc_nvm_structs_critical_denso.a2l diff --git a/tests/pybuild/reference_files/vcc_nvm_structs_ref_used_positions.h b/tests/powertrain_build/reference_files/vcc_nvm_structs_ref_used_positions.h similarity index 100% rename from tests/pybuild/reference_files/vcc_nvm_structs_ref_used_positions.h rename to tests/powertrain_build/reference_files/vcc_nvm_structs_ref_used_positions.h diff --git a/tests/pybuild/src_files/mdl/C.mdl b/tests/powertrain_build/src_files/mdl/C.mdl similarity index 100% rename from tests/pybuild/src_files/mdl/C.mdl rename to tests/powertrain_build/src_files/mdl/C.mdl diff --git a/tests/pybuild/src_files/mdl/C_par.m b/tests/powertrain_build/src_files/mdl/C_par.m similarity index 100% rename from tests/pybuild/src_files/mdl/C_par.m rename to tests/powertrain_build/src_files/mdl/C_par.m diff --git a/tests/pybuild/src_files/mdl/SSA/A/A.mdl b/tests/powertrain_build/src_files/mdl/SSA/A/A.mdl similarity index 100% rename from tests/pybuild/src_files/mdl/SSA/A/A.mdl rename to tests/powertrain_build/src_files/mdl/SSA/A/A.mdl diff --git a/tests/pybuild/src_files/mdl/SSA/A/A_par.m b/tests/powertrain_build/src_files/mdl/SSA/A/A_par.m similarity index 100% rename from tests/pybuild/src_files/mdl/SSA/A/A_par.m rename to tests/powertrain_build/src_files/mdl/SSA/A/A_par.m diff --git a/tests/pybuild/src_files/mdl/SSB/B/B.mdl b/tests/powertrain_build/src_files/mdl/SSB/B/B.mdl similarity index 100% rename from tests/pybuild/src_files/mdl/SSB/B/B.mdl rename to tests/powertrain_build/src_files/mdl/SSB/B/B.mdl diff --git a/tests/pybuild/src_files/mdl/SSB/B/B_par.m b/tests/powertrain_build/src_files/mdl/SSB/B/B_par.m similarity index 100% rename from tests/pybuild/src_files/mdl/SSB/B/B_par.m rename to tests/powertrain_build/src_files/mdl/SSB/B/B_par.m diff --git a/tests/pybuild/src_files/mdl/SSB/B/test/BB.mdl b/tests/powertrain_build/src_files/mdl/SSB/B/test/BB.mdl similarity index 100% rename from tests/pybuild/src_files/mdl/SSB/B/test/BB.mdl rename to tests/powertrain_build/src_files/mdl/SSB/B/test/BB.mdl diff --git a/tests/pybuild/src_files/mdl/SSB/B/test/BB_par.m b/tests/powertrain_build/src_files/mdl/SSB/B/test/BB_par.m similarity index 100% rename from tests/pybuild/src_files/mdl/SSB/B/test/BB_par.m rename to tests/powertrain_build/src_files/mdl/SSB/B/test/BB_par.m diff --git a/tests/pybuild/src_files/mdl/SSB/B1/B1.mdl b/tests/powertrain_build/src_files/mdl/SSB/B1/B1.mdl similarity index 100% rename from tests/pybuild/src_files/mdl/SSB/B1/B1.mdl rename to tests/powertrain_build/src_files/mdl/SSB/B1/B1.mdl diff --git a/tests/pybuild/src_files/mdl/SSB/B1/B1_par.m b/tests/powertrain_build/src_files/mdl/SSB/B1/B1_par.m similarity index 100% rename from tests/pybuild/src_files/mdl/SSB/B1/B1_par.m rename to tests/powertrain_build/src_files/mdl/SSB/B1/B1_par.m diff --git a/tests/pybuild/src_files/src_file1.c b/tests/powertrain_build/src_files/src_file1.c similarity index 100% rename from tests/pybuild/src_files/src_file1.c rename to tests/powertrain_build/src_files/src_file1.c diff --git a/tests/pybuild/src_files/src_file1.h b/tests/powertrain_build/src_files/src_file1.h similarity index 100% rename from tests/pybuild/src_files/src_file1.h rename to tests/powertrain_build/src_files/src_file1.h diff --git a/tests/pybuild/sw_cnfg.py b/tests/powertrain_build/sw_cnfg.py similarity index 100% rename from tests/pybuild/sw_cnfg.py rename to tests/powertrain_build/sw_cnfg.py diff --git a/tests/pybuild/test_a2l.py b/tests/powertrain_build/test_a2l.py similarity index 99% rename from tests/pybuild/test_a2l.py rename to tests/powertrain_build/test_a2l.py index 92ddad8..2e83202 100644 --- a/tests/pybuild/test_a2l.py +++ b/tests/powertrain_build/test_a2l.py @@ -6,8 +6,8 @@ from copy import deepcopy import unittest from unittest.mock import MagicMock -from pybuild.a2l import A2l -from pybuild.build_proj_config import BuildProjConfig +from powertrain_build.a2l import A2l +from powertrain_build.build_proj_config import BuildProjConfig A2L_DATA = { "function": "rVcAesSupM", diff --git a/tests/pybuild/test_a2l_merge.py b/tests/powertrain_build/test_a2l_merge.py similarity index 99% rename from tests/pybuild/test_a2l_merge.py rename to tests/powertrain_build/test_a2l_merge.py index 1a6c2cc..6e6c647 100644 --- a/tests/pybuild/test_a2l_merge.py +++ b/tests/powertrain_build/test_a2l_merge.py @@ -6,7 +6,7 @@ import unittest from unittest.mock import mock_open, patch, MagicMock from pathlib import Path -from pybuild.a2l_merge import A2lMerge +from powertrain_build.a2l_merge import A2lMerge from .a2l_merge_data import A2L_MERGED_1, A2L_MERGED_2 # Fake unit config files diff --git a/tests/pybuild/test_a2l_templates.py b/tests/powertrain_build/test_a2l_templates.py similarity index 99% rename from tests/pybuild/test_a2l_templates.py rename to tests/powertrain_build/test_a2l_templates.py index 3d5bfa5..d98584b 100644 --- a/tests/pybuild/test_a2l_templates.py +++ b/tests/powertrain_build/test_a2l_templates.py @@ -4,14 +4,14 @@ """Unit tests for merge_a2l.py.""" import unittest -from pybuild.a2l_templates import A2lProjectTemplate, A2lSilverTemplate +from powertrain_build.a2l_templates import A2lProjectTemplate, A2lSilverTemplate class TestA2lProjectTemplate(unittest.TestCase): - """Tests for pybuild.a2l_templates.""" + """Tests for powertrain_build.a2l_templates.""" def test_a2l_project_template(self): - """Test pybuild.a2l_templates.A2lProjectTemplate.""" + """Test powertrain_build.a2l_templates.A2lProjectTemplate.""" events = [] events = [ { @@ -684,7 +684,7 @@ class TestA2lProjectTemplate(unittest.TestCase): self.assertListEqual(a2l.split('\n'), expected) def test_a2l_silver_template(self): - """Test pybuild.a2l_templates.test_A2lSilverTemplate.""" + """Test powertrain_build.a2l_templates.test_A2lSilverTemplate.""" test_a2l = '\n'.join([ '/begin CHARACTERISTIC', ' char_dummy /* Name */', diff --git a/tests/pybuild/test_build.py b/tests/powertrain_build/test_build.py similarity index 91% rename from tests/pybuild/test_build.py rename to tests/powertrain_build/test_build.py index 8f45f65..d90163e 100644 --- a/tests/pybuild/test_build.py +++ b/tests/powertrain_build/test_build.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test script for pybuild.build module.""" +"""Unit test script for powertrain_build.build module.""" import os import logging @@ -9,13 +9,13 @@ import unittest from unittest.mock import MagicMock, patch, PropertyMock from pathlib import Path -from pybuild.lib import helper_functions -from pybuild.problem_logger import ProblemLogger -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs -from pybuild.signal_interfaces import CsvSignalInterfaces -from pybuild.core import Core -from pybuild import build +from powertrain_build.lib import helper_functions +from powertrain_build.problem_logger import ProblemLogger +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.signal_interfaces import CsvSignalInterfaces +from powertrain_build.core import Core +from powertrain_build import build SRC_DIR = Path(__file__).parent @@ -207,7 +207,7 @@ class TestBuild(unittest.TestCase): filepath + '/VcDebugOutput.c', filepath + '/VcDebugOutput.a2l'] remove(*files) - with patch('pybuild.user_defined_types.UserDefinedTypes') as udt_mock: + with patch('powertrain_build.user_defined_types.UserDefinedTypes') as udt_mock: udt_mock.return_value.common_header_files = PropertyMock(return_value=[]) build.generate_ext_var(self.build_cfg, self.unit_cfg, signal_if, udt_mock) signal_if.get_external_io.assert_called_once() @@ -262,13 +262,13 @@ class TestBuild(unittest.TestCase): def test_build_no_cfg(self): """Check that main entrypoint raises exception for missing config.""" prj_root = str(Path(SRC_DIR, 'cnfg_files', 'NonexistentProjectCfg.json')) - with unittest.mock.patch('pybuild.build.find_all_project_configs') as mock: + with unittest.mock.patch('powertrain_build.build.find_all_project_configs') as mock: mock.return_value = [prj_root] self.assertRaises(FileNotFoundError, build.build, prj_root, quiet=True) @staticmethod - @unittest.mock.patch('pybuild.unit_configs.UnitConfigs.get_per_unit_cfg') - @unittest.mock.patch('pybuild.build.find_all_project_configs') + @unittest.mock.patch('powertrain_build.unit_configs.UnitConfigs.get_per_unit_cfg') + @unittest.mock.patch('powertrain_build.build.find_all_project_configs') def test_build(mock_find_all_project_configs, mock_get_per_unit_cfg): """Check that main entrypoint can be run without exceptions.""" prj_root = str(Path(SRC_DIR, 'cnfg_files', 'ProjectCfg.json')) @@ -285,8 +285,8 @@ class TestBuild(unittest.TestCase): exists(output) @staticmethod - @unittest.mock.patch('pybuild.unit_configs.UnitConfigs.get_per_unit_cfg') - @unittest.mock.patch('pybuild.build.find_all_project_configs') + @unittest.mock.patch('powertrain_build.unit_configs.UnitConfigs.get_per_unit_cfg') + @unittest.mock.patch('powertrain_build.build.find_all_project_configs') def test_build_ec(mock_find_all_project_configs, mock_get_per_unit_cfg): """Check that main entrypoint can be run without exceptions.""" prj_root = str(Path(SRC_DIR, 'cnfg_files', 'ProjectCfg.json')) @@ -306,8 +306,8 @@ class TestBuild(unittest.TestCase): exists(output) @staticmethod - @unittest.mock.patch('pybuild.unit_configs.UnitConfigs.get_per_unit_cfg') - @unittest.mock.patch('pybuild.build.find_all_project_configs') + @unittest.mock.patch('powertrain_build.unit_configs.UnitConfigs.get_per_unit_cfg') + @unittest.mock.patch('powertrain_build.build.find_all_project_configs') def test_build_mixed_ec_tl(mock_find_all_project_configs, mock_get_per_unit_cfg): """Check that main entrypoint can be run without exceptions.""" prj_root = str(Path(SRC_DIR, 'cnfg_files', 'ProjectCfg.json')) @@ -327,8 +327,8 @@ class TestBuild(unittest.TestCase): exists(output) @staticmethod - @unittest.mock.patch('pybuild.unit_configs.UnitConfigs.get_per_unit_cfg') - @unittest.mock.patch('pybuild.build.find_all_project_configs') + @unittest.mock.patch('powertrain_build.unit_configs.UnitConfigs.get_per_unit_cfg') + @unittest.mock.patch('powertrain_build.build.find_all_project_configs') def test_build_no_abort(mock_find_all_project_configs, mock_get_per_unit_cfg): """Check that main entrypoint can be run without exceptions with no abort set to True.""" prj_root = str(Path(SRC_DIR, 'cnfg_files', 'ProjectCfg.json')) diff --git a/tests/pybuild/test_build_proj_configs.py b/tests/powertrain_build/test_build_proj_configs.py similarity index 94% rename from tests/pybuild/test_build_proj_configs.py rename to tests/powertrain_build/test_build_proj_configs.py index 8c479e4..71043e9 100644 --- a/tests/pybuild/test_build_proj_configs.py +++ b/tests/powertrain_build/test_build_proj_configs.py @@ -6,7 +6,7 @@ import unittest from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig +from powertrain_build.build_proj_config import BuildProjConfig CNFG_DIR = Path(Path(__file__).parent, 'cnfg_files') diff --git a/tests/pybuild/test_check_interface.py b/tests/powertrain_build/test_check_interface.py similarity index 93% rename from tests/pybuild/test_check_interface.py rename to tests/powertrain_build/test_check_interface.py index 536de96..5f62af8 100644 --- a/tests/pybuild/test_check_interface.py +++ b/tests/powertrain_build/test_check_interface.py @@ -2,9 +2,9 @@ from unittest import TestCase, mock -from pybuild.interface.base import BaseApplication, Signal, LOGGER as bl -from pybuild.interface.application import Model -import pybuild.check_interface as checker +from powertrain_build.interface.base import BaseApplication, Signal, LOGGER as bl +from powertrain_build.interface.application import Model +import powertrain_build.check_interface as checker checker.LOGGER.setLevel(10) bl.setLevel(10) @@ -13,7 +13,7 @@ bl.setLevel(10) class TestChecker(TestCase): """Test the check_interface module.""" - @mock.patch("pybuild.interface.application.Application.parse_definition") + @mock.patch("powertrain_build.interface.application.Application.parse_definition") def test_process_app(self, app_parser): """Test the process_app function.""" app = checker.process_app("test") diff --git a/tests/pybuild/test_config.py b/tests/powertrain_build/test_config.py similarity index 96% rename from tests/pybuild/test_config.py rename to tests/powertrain_build/test_config.py index 774951f..41be8ce 100644 --- a/tests/pybuild/test_config.py +++ b/tests/powertrain_build/test_config.py @@ -8,10 +8,10 @@ import unittest from unittest.mock import patch from pathlib import Path -from pybuild.config import ProcessHandler -from pybuild.config import CConfigParser -from pybuild.config import HeaderConfigParser -from pybuild.config import JsonConfigHandler +from powertrain_build.config import ProcessHandler +from powertrain_build.config import CConfigParser +from powertrain_build.config import HeaderConfigParser +from powertrain_build.config import JsonConfigHandler SRC_DIR = Path(__file__).parent SKIP_WHILE_DEVELOPING = False diff --git a/tests/pybuild/test_core.py b/tests/powertrain_build/test_core.py similarity index 98% rename from tests/pybuild/test_core.py rename to tests/powertrain_build/test_core.py index 83edfd6..04a8b90 100644 --- a/tests/pybuild/test_core.py +++ b/tests/powertrain_build/test_core.py @@ -5,9 +5,9 @@ import unittest from unittest.mock import MagicMock from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs -from pybuild.core import Core, HICore, ZCCore +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.core import Core, HICore, ZCCore from .core_cnfg import CORE_CFG diff --git a/tests/pybuild/test_core_dummy.py b/tests/powertrain_build/test_core_dummy.py similarity index 99% rename from tests/pybuild/test_core_dummy.py rename to tests/powertrain_build/test_core_dummy.py index f6431b9..adfb372 100644 --- a/tests/pybuild/test_core_dummy.py +++ b/tests/powertrain_build/test_core_dummy.py @@ -6,8 +6,8 @@ import io import unittest from unittest.mock import patch, mock_open, MagicMock -from pybuild.core_dummy import CoreDummy -from pybuild.unit_configs import UnitConfigs +from powertrain_build.core_dummy import CoreDummy +from powertrain_build.unit_configs import UnitConfigs from .core_cnfg import CORE_CFG from . import core_dummy_cnfg diff --git a/tests/pybuild/test_create_conversion_table.py b/tests/powertrain_build/test_create_conversion_table.py similarity index 97% rename from tests/pybuild/test_create_conversion_table.py rename to tests/powertrain_build/test_create_conversion_table.py index 6c88eb5..f66d158 100644 --- a/tests/pybuild/test_create_conversion_table.py +++ b/tests/powertrain_build/test_create_conversion_table.py @@ -2,7 +2,7 @@ # Licensed under Apache 2.0. import unittest -from pybuild.create_conversion_table import get_vtab_text +from powertrain_build.create_conversion_table import get_vtab_text class TestGetVtabText(unittest.TestCase): diff --git a/tests/pybuild/test_dids.py b/tests/powertrain_build/test_dids.py similarity index 99% rename from tests/pybuild/test_dids.py rename to tests/powertrain_build/test_dids.py index 66e1792..f6a415e 100644 --- a/tests/pybuild/test_dids.py +++ b/tests/powertrain_build/test_dids.py @@ -8,9 +8,9 @@ from unittest.mock import MagicMock from unittest.mock import patch from unittest.mock import mock_open from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.dids import DIDs, HIDIDs, ZCDIDs -from test_data.pybuild.test_dids.zc_dids import ( +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.dids import DIDs, HIDIDs, ZCDIDs +from test_data.powertrain_build.test_dids.zc_dids import ( dummy_project_dids, bad_dummy_project_dids, valid_dids, diff --git a/tests/pybuild/test_dummy_spm.py b/tests/powertrain_build/test_dummy_spm.py similarity index 95% rename from tests/pybuild/test_dummy_spm.py rename to tests/powertrain_build/test_dummy_spm.py index c5e7997..0454ea1 100644 --- a/tests/pybuild/test_dummy_spm.py +++ b/tests/powertrain_build/test_dummy_spm.py @@ -7,11 +7,11 @@ import unittest import os from unittest.mock import patch, mock_open, MagicMock -from pybuild.dummy_spm import DummySpm -from pybuild.build_proj_config import BuildProjConfig -from pybuild.feature_configs import FeatureConfigs -from pybuild.unit_configs import UnitConfigs -from pybuild.user_defined_types import UserDefinedTypes +from powertrain_build.dummy_spm import DummySpm +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.feature_configs import FeatureConfigs +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.user_defined_types import UserDefinedTypes UNDEFINED_OUTPORTS = [ diff --git a/tests/pybuild/test_environmentcheck.py b/tests/powertrain_build/test_environmentcheck.py similarity index 94% rename from tests/pybuild/test_environmentcheck.py rename to tests/powertrain_build/test_environmentcheck.py index 3bc9ddd..0c5b438 100644 --- a/tests/pybuild/test_environmentcheck.py +++ b/tests/powertrain_build/test_environmentcheck.py @@ -3,14 +3,14 @@ """Tests for pybuild environment check module. -Run from project: py -3 -m pytest ./pybuild/test/test_environmentcheck.py +Run from project: py -3 -m pytest ./powertrain_build/test/test_environmentcheck.py """ import unittest from unittest.mock import patch -from pybuild import environmentcheck +from powertrain_build import environmentcheck class TestpybuildEnvironmentCheck(unittest.TestCase): diff --git a/tests/pybuild/test_ext_dbg.py b/tests/powertrain_build/test_ext_dbg.py similarity index 92% rename from tests/pybuild/test_ext_dbg.py rename to tests/powertrain_build/test_ext_dbg.py index ed38128..c3eedfb 100644 --- a/tests/pybuild/test_ext_dbg.py +++ b/tests/powertrain_build/test_ext_dbg.py @@ -5,9 +5,9 @@ import unittest from unittest.mock import MagicMock -from pybuild.ext_dbg import ExtDbg -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs +from powertrain_build.ext_dbg import ExtDbg +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs from .io_cnfg import DBG_CNFG_DICT diff --git a/tests/pybuild/test_ext_var.py b/tests/powertrain_build/test_ext_var.py similarity index 97% rename from tests/pybuild/test_ext_var.py rename to tests/powertrain_build/test_ext_var.py index 63c9624..f519186 100644 --- a/tests/pybuild/test_ext_var.py +++ b/tests/powertrain_build/test_ext_var.py @@ -6,10 +6,10 @@ import unittest from pathlib import Path from unittest.mock import patch, mock_open, MagicMock -from pybuild.ext_var import ExtVarCsv -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs -from pybuild.user_defined_types import UserDefinedTypes +from powertrain_build.ext_var import ExtVarCsv +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.user_defined_types import UserDefinedTypes from .io_cnfg import DBG_CNFG_DICT, EC_CNFG_DICT diff --git a/tests/pybuild/test_feature_configs.py b/tests/powertrain_build/test_feature_configs.py similarity index 96% rename from tests/pybuild/test_feature_configs.py rename to tests/powertrain_build/test_feature_configs.py index adb00aa..d0c7123 100644 --- a/tests/pybuild/test_feature_configs.py +++ b/tests/powertrain_build/test_feature_configs.py @@ -7,8 +7,8 @@ import unittest from unittest.mock import MagicMock, patch from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.feature_configs import FeatureConfigs +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.feature_configs import FeatureConfigs from .sw_cnfg import SW_DICT SRC_DIR = Path(__file__).parent @@ -35,7 +35,7 @@ class TestFeatureConfigs(unittest.TestCase): self.build_cfg.get_did_cfg_file_name = MagicMock(return_value='DIDIds_FullRange') self.build_cfg.get_prj_config = MagicMock(return_value='CFG1') patcher_read_config_sw = patch( - 'tests.pybuild.test_feature_configs.FeatureConfigs._parse_all_code_sw_configs', + 'tests.powertrain_build.test_feature_configs.FeatureConfigs._parse_all_code_sw_configs', MagicMock()) self.mock_read_config_sw = patcher_read_config_sw.start() self.addCleanup(patcher_read_config_sw.stop) diff --git a/tests/pybuild/test_gen_allsysteminfo.py b/tests/powertrain_build/test_gen_allsysteminfo.py similarity index 95% rename from tests/pybuild/test_gen_allsysteminfo.py rename to tests/powertrain_build/test_gen_allsysteminfo.py index 895910e..c3240fe 100644 --- a/tests/pybuild/test_gen_allsysteminfo.py +++ b/tests/powertrain_build/test_gen_allsysteminfo.py @@ -7,9 +7,9 @@ from pathlib import Path from unittest import TestCase from unittest.mock import MagicMock from numpy import ndarray -from pybuild.signal_interfaces import CsvSignalInterfaces -from pybuild.unit_configs import UnitConfigs -from pybuild.gen_allsysteminfo import GenAllSystemInfo +from powertrain_build.signal_interfaces import CsvSignalInterfaces +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.gen_allsysteminfo import GenAllSystemInfo CNFG_DIR = Path(Path(__file__).parent, 'cnfg_files') diff --git a/tests/pybuild/test_gen_label_split.py b/tests/powertrain_build/test_gen_label_split.py similarity index 95% rename from tests/pybuild/test_gen_label_split.py rename to tests/powertrain_build/test_gen_label_split.py index 3fb96c8..2e00e5e 100644 --- a/tests/pybuild/test_gen_label_split.py +++ b/tests/powertrain_build/test_gen_label_split.py @@ -6,8 +6,8 @@ from pathlib import Path from unittest import TestCase from unittest.mock import MagicMock, patch -from pybuild.build_proj_config import BuildProjConfig -from pybuild.gen_label_split import LabelSplit +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.gen_label_split import LabelSplit CNFG_DIR = Path(Path(__file__).parent, 'cnfg_files') REF_DIR = Path(Path(__file__).parent, 'reference_files') @@ -115,7 +115,7 @@ class TestGenLabelSplit(TestCase): no_hybrid_test = self.label_split.get_sgp_symbol_group(no_hybrid_group) self.assertEqual(no_hybrid_test, '') - @patch('pybuild.gen_label_split.LabelSplit.get_sgp_symbol_group', autospec=True) + @patch('powertrain_build.gen_label_split.LabelSplit.get_sgp_symbol_group', autospec=True) def test_get_interface_symbols_and_groups(self, sg_mock): sg_mock.return_value = 'SG_P' interface_dict = { @@ -150,8 +150,8 @@ class TestGenLabelSplit(TestCase): ] self.assertListEqual(symbols_and_groups, expected) - @patch('pybuild.gen_label_split.LabelSplit.get_interface_symbols_and_groups', autospec=True) - @patch('pybuild.gen_label_split.LabelSplit.get_sgp_symbols', autospec=True) + @patch('powertrain_build.gen_label_split.LabelSplit.get_interface_symbols_and_groups', autospec=True) + @patch('powertrain_build.gen_label_split.LabelSplit.get_sgp_symbols', autospec=True) def test_get_debug_symbols_and_groups(self, sgp_symbols_mock, interface_symbols_and_groups_mock): # This function calls other (already tested functions), however, it has an important check in the end tp test. self.label_split.signal_interface = MagicMock() @@ -219,8 +219,8 @@ class TestGenLabelSplit(TestCase): sgp_file = self.label_split.get_unit_sgp_file('VcTestModel') self.assertFalse(sgp_file.is_file()) - @patch('pybuild.gen_label_split.LabelSplit.get_unit_sgp_file', autospec=True) - @patch('pybuild.gen_label_split.LabelSplit.check_unit_par_file', autospec=True) + @patch('powertrain_build.gen_label_split.LabelSplit.get_unit_sgp_file', autospec=True) + @patch('powertrain_build.gen_label_split.LabelSplit.check_unit_par_file', autospec=True) def test_get_unit_symbols_and_groups(self, unit_par_file_mock, sgp_file_mock): sgp_file_mock.return_value = Path(REF_DIR, 'SS1', 'test_model', 'VcTestModel_sgp.xml') unit_calibration_symbols = [ diff --git a/tests/pybuild/test_handcode_replacer.py b/tests/powertrain_build/test_handcode_replacer.py similarity index 94% rename from tests/pybuild/test_handcode_replacer.py rename to tests/powertrain_build/test_handcode_replacer.py index 47776c1..605b0a4 100644 --- a/tests/pybuild/test_handcode_replacer.py +++ b/tests/powertrain_build/test_handcode_replacer.py @@ -1,14 +1,14 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test script for pybuild.handcode_replacer module.""" +"""Unit test script for powertrain_build.handcode_replacer module.""" import unittest -from pybuild import handcode_replacer +from powertrain_build import handcode_replacer class TestPragmaRegexStart(unittest.TestCase): - """Unit tests for pybuild.handcode_replacer regexes.""" + """Unit tests for powertrain_build.handcode_replacer regexes.""" def setUp(self): self.pragma_replacer = handcode_replacer.PragmaReplacer() diff --git a/tests/pybuild/test_memory_section.py b/tests/powertrain_build/test_memory_section.py similarity index 98% rename from tests/pybuild/test_memory_section.py rename to tests/powertrain_build/test_memory_section.py index d418238..aa378e9 100644 --- a/tests/pybuild/test_memory_section.py +++ b/tests/powertrain_build/test_memory_section.py @@ -5,9 +5,9 @@ from pathlib import Path from unittest import mock, TestCase -from pybuild.build_proj_config import BuildProjConfig -from pybuild.memory_section import MemorySection -from pybuild.lib import helper_functions +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.memory_section import MemorySection +from powertrain_build.lib import helper_functions from .test_build import remove SRC_DIR = Path(__file__).parent diff --git a/tests/pybuild/test_nvm_def.py b/tests/powertrain_build/test_nvm_def.py similarity index 99% rename from tests/pybuild/test_nvm_def.py rename to tests/powertrain_build/test_nvm_def.py index a01f4e1..ced5a24 100644 --- a/tests/pybuild/test_nvm_def.py +++ b/tests/powertrain_build/test_nvm_def.py @@ -12,9 +12,9 @@ import unittest from unittest.mock import MagicMock, mock_open, patch, call from pathlib import Path -from pybuild.lib import helper_functions -from pybuild.nvm_def import NVMDef -from pybuild.unit_configs import UnitConfigs +from powertrain_build.lib import helper_functions +from powertrain_build.nvm_def import NVMDef +from powertrain_build.unit_configs import UnitConfigs SRC_DIR = Path(__file__).parent diff --git a/tests/pybuild/test_pt_matlab.py b/tests/powertrain_build/test_pt_matlab.py similarity index 99% rename from tests/pybuild/test_pt_matlab.py rename to tests/powertrain_build/test_pt_matlab.py index f4a756f..175ed59 100644 --- a/tests/pybuild/test_pt_matlab.py +++ b/tests/powertrain_build/test_pt_matlab.py @@ -6,7 +6,7 @@ import unittest from unittest.mock import patch, Mock -from pybuild import pt_matlab +from powertrain_build import pt_matlab class TestMatlab(unittest.TestCase): diff --git a/tests/pybuild/test_pt_win32.py b/tests/powertrain_build/test_pt_win32.py similarity index 98% rename from tests/pybuild/test_pt_win32.py rename to tests/powertrain_build/test_pt_win32.py index 3ed9ee3..fd41279 100644 --- a/tests/pybuild/test_pt_win32.py +++ b/tests/powertrain_build/test_pt_win32.py @@ -10,7 +10,7 @@ try: except ImportError as import_error: raise unittest.SkipTest("Failed to import win32api, probably wrong platform") from import_error -from pybuild import pt_win32 +from powertrain_build import pt_win32 class TestPtWin32Process(unittest.TestCase): diff --git a/tests/pybuild/test_read_feat_cnfgs.py b/tests/powertrain_build/test_read_feat_cnfgs.py similarity index 97% rename from tests/pybuild/test_read_feat_cnfgs.py rename to tests/powertrain_build/test_read_feat_cnfgs.py index 5473530..6bebe42 100644 --- a/tests/pybuild/test_read_feat_cnfgs.py +++ b/tests/powertrain_build/test_read_feat_cnfgs.py @@ -6,8 +6,8 @@ import re import unittest from unittest.mock import MagicMock from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.feature_configs import FeatureConfigs +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.feature_configs import FeatureConfigs from .sw_cnfg import SW_FILE_DICT SRC_DIR = Path(__file__).parent diff --git a/tests/pybuild/test_read_sig_ifs.py b/tests/powertrain_build/test_read_sig_ifs.py similarity index 95% rename from tests/pybuild/test_read_sig_ifs.py rename to tests/powertrain_build/test_read_sig_ifs.py index a37e0c8..b353f1f 100644 --- a/tests/pybuild/test_read_sig_ifs.py +++ b/tests/powertrain_build/test_read_sig_ifs.py @@ -8,9 +8,9 @@ import unittest from pathlib import Path from unittest.mock import MagicMock, patch, mock_open, call -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs -from pybuild.signal_interfaces import CsvSignalInterfaces +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.signal_interfaces import CsvSignalInterfaces class RawIOCfg: @@ -139,7 +139,7 @@ class TestSignalIterfacesRead(BaseSetUp): expected_res = self.raw_io_cfg.get_raw_io_cnfg() self.assertDictEqual(result, expected_res) - @patch('pybuild.signal_interfaces.open', new_callable=mock_open()) + @patch('powertrain_build.signal_interfaces.open', new_callable=mock_open()) def test_verify_files_read(self, m): """Verify that files are opened and read.""" private_can_input_call = call(Path(BaseSetUp.ACTIVE_INTERFACE_DIRECTORY, diff --git a/tests/pybuild/test_sched_funcs.py b/tests/powertrain_build/test_sched_funcs.py similarity index 93% rename from tests/pybuild/test_sched_funcs.py rename to tests/powertrain_build/test_sched_funcs.py index d685b4c..2373d9a 100644 --- a/tests/pybuild/test_sched_funcs.py +++ b/tests/powertrain_build/test_sched_funcs.py @@ -8,9 +8,9 @@ from unittest.mock import MagicMock from os.path import exists from os import remove from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.sched_funcs import SchedFuncs -from pybuild.unit_configs import UnitConfigs +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.sched_funcs import SchedFuncs +from powertrain_build.unit_configs import UnitConfigs SRC_DIR = Path(__file__).parent diff --git a/tests/pybuild/test_sig_if_html_rep.py b/tests/powertrain_build/test_sig_if_html_rep.py similarity index 98% rename from tests/pybuild/test_sig_if_html_rep.py rename to tests/powertrain_build/test_sig_if_html_rep.py index 8f66469..23863f8 100644 --- a/tests/pybuild/test_sig_if_html_rep.py +++ b/tests/powertrain_build/test_sig_if_html_rep.py @@ -6,10 +6,10 @@ from copy import deepcopy import unittest from unittest.mock import MagicMock from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs -from pybuild.signal_interfaces import CsvSignalInterfaces -from pybuild.signal_if_html_rep import SigIfHtmlReport +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.signal_interfaces import CsvSignalInterfaces +from powertrain_build.signal_if_html_rep import SigIfHtmlReport UNIT_CFG = { 'VcAesSupM__gen3': { diff --git a/tests/pybuild/test_sig_if_html_rep_all.py b/tests/powertrain_build/test_sig_if_html_rep_all.py similarity index 98% rename from tests/pybuild/test_sig_if_html_rep_all.py rename to tests/powertrain_build/test_sig_if_html_rep_all.py index ae3b7dc..3e4dacc 100644 --- a/tests/pybuild/test_sig_if_html_rep_all.py +++ b/tests/powertrain_build/test_sig_if_html_rep_all.py @@ -7,10 +7,10 @@ from copy import deepcopy import unittest from unittest.mock import MagicMock from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs -from pybuild.signal_interfaces import CsvSignalInterfaces -from pybuild.signal_if_html_rep_all import SigIfHtmlReportAll +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.signal_interfaces import CsvSignalInterfaces +from powertrain_build.signal_if_html_rep_all import SigIfHtmlReportAll UNIT_CFG = { 'VcAesSupM__gen3': { diff --git a/tests/pybuild/test_sig_ifs.py b/tests/powertrain_build/test_sig_ifs.py similarity index 99% rename from tests/pybuild/test_sig_ifs.py rename to tests/powertrain_build/test_sig_ifs.py index fa7dd97..cf1d3ea 100644 --- a/tests/pybuild/test_sig_ifs.py +++ b/tests/powertrain_build/test_sig_ifs.py @@ -8,9 +8,9 @@ import unittest import pprint from unittest.mock import MagicMock, patch from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs -from pybuild.signal_interfaces import CsvSignalInterfaces +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.signal_interfaces import CsvSignalInterfaces class SigIfCfg: diff --git a/tests/pybuild/test_sig_incons_html_rep.py b/tests/powertrain_build/test_sig_incons_html_rep.py similarity index 99% rename from tests/pybuild/test_sig_incons_html_rep.py rename to tests/powertrain_build/test_sig_incons_html_rep.py index 738764b..b0ac501 100644 --- a/tests/pybuild/test_sig_incons_html_rep.py +++ b/tests/powertrain_build/test_sig_incons_html_rep.py @@ -7,7 +7,7 @@ import os import os.path import unittest from pathlib import Path -from pybuild.signal_incons_html_rep import SigConsHtmlReport +from powertrain_build.signal_incons_html_rep import SigConsHtmlReport INDATA = { "sigs": { diff --git a/tests/pybuild/test_sig_incons_html_rep_all.py b/tests/powertrain_build/test_sig_incons_html_rep_all.py similarity index 99% rename from tests/pybuild/test_sig_incons_html_rep_all.py rename to tests/powertrain_build/test_sig_incons_html_rep_all.py index 2de8617..3905bf2 100644 --- a/tests/pybuild/test_sig_incons_html_rep_all.py +++ b/tests/powertrain_build/test_sig_incons_html_rep_all.py @@ -6,7 +6,7 @@ import os import os.path import unittest from pathlib import Path -from pybuild.signal_incons_html_rep_all import SigConsHtmlReportAll +from powertrain_build.signal_incons_html_rep_all import SigConsHtmlReportAll INDATA = { "CFG1": { diff --git a/tests/pybuild/test_signal_inconsistency_check.py b/tests/powertrain_build/test_signal_inconsistency_check.py similarity index 99% rename from tests/pybuild/test_signal_inconsistency_check.py rename to tests/powertrain_build/test_signal_inconsistency_check.py index 963fafb..520ee99 100644 --- a/tests/pybuild/test_signal_inconsistency_check.py +++ b/tests/powertrain_build/test_signal_inconsistency_check.py @@ -5,7 +5,7 @@ import unittest from argparse import Namespace from unittest.mock import MagicMock, patch -from pybuild.signal_inconsistency_check import ( +from powertrain_build.signal_inconsistency_check import ( EXIT_CODE_INCORRECT_CSV, EXIT_CODE_MISSING_CONSUMER, EXIT_CODE_NEVER_ACTIVE_SIGNALS, @@ -340,7 +340,7 @@ class TestSignalInconsistency(unittest.TestCase): result = signal_inconsistency.aggregate_model_inports() self.assertEqual(expected_result, result) - @patch("pybuild.signal_interfaces.CsvSignalInterfaces") + @patch("powertrain_build.signal_interfaces.CsvSignalInterfaces") def test_aggregate_supplier_inports(self, mock): """Test aggregate external outports""" mock_instance = mock.return_value @@ -513,7 +513,7 @@ class TestSignalInconsistency(unittest.TestCase): result = signal_inconsistency.get_consumer_int("TEST_SIG2") self.assertEqual(result, expected_result) - @patch("pybuild.signal_interfaces.CsvSignalInterfaces") + @patch("powertrain_build.signal_interfaces.CsvSignalInterfaces") def test_get_consumer_ext(self, mock): """Test aggregate external outports""" mock_instance = mock.return_value diff --git a/tests/pybuild/test_signal_interfaces_yaml.py b/tests/powertrain_build/test_signal_interfaces_yaml.py similarity index 96% rename from tests/pybuild/test_signal_interfaces_yaml.py rename to tests/powertrain_build/test_signal_interfaces_yaml.py index af6dd7a..0133e4b 100644 --- a/tests/pybuild/test_signal_interfaces_yaml.py +++ b/tests/powertrain_build/test_signal_interfaces_yaml.py @@ -6,7 +6,7 @@ import unittest from pathlib import Path -from pybuild.signal_interfaces import YamlSignalInterfaces +from powertrain_build.signal_interfaces import YamlSignalInterfaces BASEDIR = Path(__file__).parent / "cnfg_files/test-repo" CSP_PROJECT_ROOT = BASEDIR / "Projects/CSP/CATC" diff --git a/tests/pybuild/test_signals.py b/tests/powertrain_build/test_signals.py similarity index 96% rename from tests/pybuild/test_signals.py rename to tests/powertrain_build/test_signals.py index 4a175b4..91e618a 100644 --- a/tests/pybuild/test_signals.py +++ b/tests/powertrain_build/test_signals.py @@ -7,8 +7,8 @@ import copy import unittest from unittest.mock import MagicMock from pathlib import Path -from pybuild.build_proj_config import BuildProjConfig -from pybuild.signal_interfaces import CsvSignalInterfaces +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.signal_interfaces import CsvSignalInterfaces from .io_cnfg import IO_CNFG_DICT, INPUT_CNFG_DICT, OUTPUT_CNFG_DICT, DBG_CNFG_DICT, DEP_IO_CNFG_DICT CNFG_DIR = Path(Path(__file__).parent, 'cnfg_files') diff --git a/tests/pybuild/test_unit_configs.py b/tests/powertrain_build/test_unit_configs.py similarity index 99% rename from tests/pybuild/test_unit_configs.py rename to tests/powertrain_build/test_unit_configs.py index a21d2f4..88c4ce9 100644 --- a/tests/pybuild/test_unit_configs.py +++ b/tests/powertrain_build/test_unit_configs.py @@ -7,9 +7,9 @@ from unittest.mock import MagicMock from pathlib import Path from copy import deepcopy -from pybuild.unit_configs import UnitConfigs -from pybuild.build_proj_config import BuildProjConfig -from pybuild.feature_configs import FeatureConfigs +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.feature_configs import FeatureConfigs CNFG_DIR = Path(Path(__file__).parent, 'cnfg_files') diff --git a/tests/pybuild/test_user_defined_types.py b/tests/powertrain_build/test_user_defined_types.py similarity index 99% rename from tests/pybuild/test_user_defined_types.py rename to tests/powertrain_build/test_user_defined_types.py index 380daf4..da4648d 100644 --- a/tests/pybuild/test_user_defined_types.py +++ b/tests/powertrain_build/test_user_defined_types.py @@ -6,9 +6,9 @@ import unittest from pathlib import Path from unittest.mock import patch, mock_open, MagicMock -from pybuild.build_proj_config import BuildProjConfig -from pybuild.unit_configs import UnitConfigs -from pybuild.user_defined_types import UserDefinedTypes +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.user_defined_types import UserDefinedTypes REF_DIR = Path(Path(__file__).parent, 'reference_files') CFG_DIR = Path(Path(__file__).parent, 'cnfg_files') diff --git a/tests/pybuild/test_versioncheck.py b/tests/powertrain_build/test_versioncheck.py similarity index 91% rename from tests/pybuild/test_versioncheck.py rename to tests/powertrain_build/test_versioncheck.py index a245ab1..aba1a44 100644 --- a/tests/pybuild/test_versioncheck.py +++ b/tests/powertrain_build/test_versioncheck.py @@ -1,15 +1,15 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Tests for pybuild version compatibility check module.""" +"""Tests for powertrain-build version compatibility check module.""" import unittest -from pybuild import __config_version__ -from pybuild.versioncheck import Version +from powertrain_build import __config_version__ +from powertrain_build.versioncheck import Version class TestVersionCheck(unittest.TestCase): - """Unit tests for pybuild version compatibility check module.""" + """Unit tests for powertrain-build version compatibility check module.""" def test_float_version(self): version = Version(1.04) diff --git a/tests/zone_controller/test_calibration.py b/tests/zone_controller/test_calibration.py index 0e8b950..0913e18 100644 --- a/tests/zone_controller/test_calibration.py +++ b/tests/zone_controller/test_calibration.py @@ -1,11 +1,11 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test script for pybuild.zone_controller.calibration.""" +"""Unit test script for powertrain_build.zone_controller.calibration.""" from unittest import TestCase from unittest.mock import MagicMock -from pybuild.zone_controller.calibration import ZoneControllerCalibration +from powertrain_build.zone_controller.calibration import ZoneControllerCalibration class TestZoneControllerCalibration(TestCase): diff --git a/tests/zone_controller/test_composition_yaml.py b/tests/zone_controller/test_composition_yaml.py index 544e983..5d24ab4 100644 --- a/tests/zone_controller/test_composition_yaml.py +++ b/tests/zone_controller/test_composition_yaml.py @@ -1,7 +1,7 @@ # Copyright 2024 Volvo Car Corporation # Licensed under Apache 2.0. -"""Unit test script for pybuild.zone_controller.generate_yaml.""" +"""Unit test script for powertrain_build.zone_controller.generate_yaml.""" import copy import os @@ -9,11 +9,11 @@ import unittest from pathlib import Path from unittest.mock import MagicMock, patch -from pybuild.build_proj_config import BuildProjConfig -from pybuild.core import ZCCore -from pybuild.dids import ZCDIDs -from pybuild.unit_configs import UnitConfigs -from pybuild.zone_controller.composition_yaml import CompositionYaml +from powertrain_build.build_proj_config import BuildProjConfig +from powertrain_build.core import ZCCore +from powertrain_build.dids import ZCDIDs +from powertrain_build.unit_configs import UnitConfigs +from powertrain_build.zone_controller.composition_yaml import CompositionYaml from test_data.zone_controller.test_composition_yaml import ( composition_yaml_setup, composition_yaml, diff --git a/tox.ini b/tox.ini index 1655aeb..b31934f 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ deps = -rtest-requirements.txt [testenv:flake8] -commands = flake8 pybuild tests +commands = flake8 powertrain_build tests [testenv:pytest] commands = python -m pytest tests