├── sostrades_core ├── tests │ ├── __init__.py │ ├── core │ │ └── __init__.py │ ├── data │ │ ├── __init__.py │ │ ├── test_92_datasets_db_v1_test.json │ │ ├── local_datasets_db │ │ │ ├── dataset_all_types │ │ │ │ ├── d.csv │ │ │ │ ├── y_array.csv │ │ │ │ └── descriptor.json │ │ │ ├── dataset_nested_types │ │ │ │ ├── non_serializable.pkl │ │ │ │ └── descriptor.json │ │ │ ├── dataset_df_bq │ │ │ │ └── descriptor.json │ │ │ └── dataset_fail_descriptor_error │ │ │ │ └── descriptor.json │ │ ├── b_vec.pkl │ │ ├── a_mat_sparse.npz │ │ ├── test_92_mapping_wildcard_repository.json │ │ ├── test_92_23_datasets_mapping_v1.json │ │ ├── test_92_datasets_mapping_v1.json │ │ ├── test_92_24_repository_datasets_mapping_v1.json │ │ ├── test_92_export_mapping_repository.json │ │ ├── test_92_23_datasets_mapping_v0.json │ │ ├── test_92_example_mapping.json │ │ ├── test_92_example_mapping_error_format.json │ │ ├── public_key.pem │ │ ├── test_92_mapping_repository.json │ │ ├── test_92_24_repository_datasets_mapping_mix_v0v1.json │ │ ├── test_92_mapping_parameters_level_repository.json │ │ ├── test_92_export_mapping_param_level.json │ │ ├── test_96_statistics.csv │ │ └── test_92_export_mapping_disc1_disc2.json │ ├── dm_df_pandas1 │ │ └── dm.pkl │ ├── jacobian_pkls │ │ ├── jacobian_sellar_1.pkl │ │ ├── jacobian_sellar_2.pkl │ │ ├── jacobian_sellar_problem.pkl │ │ ├── jacobian_design_var_bspline.pkl │ │ ├── jacobian_Test_default_dataframe_fill.pkl │ │ ├── jacobian_obj_vs_design_var_sellar_test_02.pkl │ │ ├── jacobian_obj_vs_design_var_sellar_test_03.pkl │ │ ├── jacobian_obj_vs_design_var_sellar_test_04.pkl │ │ ├── jacobian_obj_vs_design_var_sellar_test_05.pkl │ │ ├── jacobian_obj_vs_design_var_sellar_test_06.pkl │ │ ├── jacobian_obj_vs_design_var_sellar_test_07.pkl │ │ ├── jacobian_obj_vs_design_var_sellar_test_08.pkl │ │ ├── jacobian_obj_vs_design_var_sellar_test_11.pkl │ │ ├── jacobian_Test_dataframe_fill_one_column_for_key.pkl │ │ ├── jacobian_Test_dataframe_fill_one_column_for_key_1element_deactivated.pkl │ │ └── jacobian_Test_dataframe_fill_one_column_for_key_2element_deactivated.pkl │ ├── l1s_test_all_usecases.py │ └── l0_test_48_bspline.py ├── tools │ ├── __init__.py │ ├── rw │ │ └── __init__.py │ ├── tree │ │ └── __init__.py │ ├── archi_node │ │ └── __init__.py │ ├── bspline │ │ ├── __init__.py │ │ └── bspline_methods.py │ ├── dashboard │ │ └── __init__.py │ ├── scenario │ │ ├── __init__.py │ │ ├── scenario.py │ │ └── scenario_manager.py │ ├── base_functions │ │ ├── __init__.py │ │ └── compute_size.py │ ├── builder_info │ │ └── __init__.py │ ├── controllers │ │ └── __init__.py │ ├── grad_solvers │ │ ├── __init__.py │ │ ├── solvers │ │ │ └── __init__.py │ │ └── validgrad │ │ │ └── __init__.py │ ├── import_tool │ │ └── __init__.py │ ├── post_processing │ │ ├── __init__.py │ │ ├── charts │ │ │ └── __init__.py │ │ ├── tables │ │ │ └── __init__.py │ │ ├── pie_charts │ │ │ └── __init__.py │ │ ├── spider_charts │ │ │ └── __init__.py │ │ ├── plotly_native_charts │ │ │ ├── __init__.py │ │ │ └── templates │ │ │ │ └── __init__.py │ │ ├── parallel_coordinates_charts │ │ │ └── __init__.py │ │ ├── pareto_front_optimal_charts │ │ │ └── __init__.py │ │ └── indicator_charts │ │ │ └── __init__.py │ ├── proc_builder │ │ └── __init__.py │ ├── time_logger │ │ └── __init__.py │ ├── check_data_integrity │ │ └── __init__.py │ ├── control_functions │ │ └── __init__.py │ ├── refactoring │ │ ├── eev4 │ │ │ ├── current │ │ │ │ ├── sos_classes.puml │ │ │ │ └── sequence_sos_build.puml │ │ │ └── proposal │ │ │ │ ├── sequence_sos_build.puml │ │ │ │ ├── sos_classes.puml │ │ │ │ └── sequence_sos_build_update.puml │ │ └── db_connector │ │ │ ├── class_diag_1.puml │ │ │ ├── seq_as_is.puml │ │ │ └── seq_proposal.puml │ ├── filter │ │ └── __init__.py │ ├── gather │ │ └── __init__.py │ ├── metaclasses │ │ ├── __init__.py │ │ ├── no_instance.py │ │ └── singleton.py │ ├── conversion │ │ ├── __init__.py │ │ └── unit_conversion.py │ ├── sumdfdict │ │ └── __init__.py │ ├── design_space │ │ └── __init__.py │ ├── pkl_converter │ │ ├── __init__.py │ │ └── pkl_tools.py │ ├── eval_possible_values │ │ └── __init__.py │ ├── ontology_variables │ │ ├── __init__.py │ │ └── ontology_variable_key.py │ ├── ontology_from_glossary │ │ └── __init__.py │ └── check_process_gradients │ │ └── __init__.py ├── datasets │ ├── __init__.py │ ├── dataset_info │ │ ├── __init__.py │ │ └── dataset_info_versions.py │ ├── datasets_serializers │ │ └── __init__.py │ └── datasets_connectors │ │ ├── json_datasets_connector │ │ └── __init__.py │ │ ├── sample_connectors.json │ │ └── local_filesystem_datasets_connector │ │ └── __init__.py ├── execution_engine │ ├── __init__.py │ ├── builder_tools │ │ └── __init__.py │ ├── gemseo_addon │ │ ├── __init__.py │ │ ├── grammars │ │ │ ├── __init__.py │ │ │ └── sos_simple_grammar.py │ │ ├── data_converters │ │ │ └── __init__.py │ │ └── linear_solvers │ │ │ ├── __init__.py │ │ │ └── settings │ │ │ └── __init__.py │ ├── sample_generators │ │ └── __init__.py │ ├── disciplines_wrappers │ │ └── __init__.py │ ├── sos_discipline_driver.py │ └── optim_manager_disc.py ├── sos_wrapping │ ├── __init__.py │ ├── test_discs │ │ ├── __init__.py │ │ ├── FakeCarModel │ │ │ └── __init__.py │ │ ├── documentation │ │ │ ├── test_doc_image.PNG │ │ │ └── disc10_dynamic.markdown │ │ ├── test_sellar_uq │ │ │ └── __init__.py │ │ ├── disc_all_types_inherited.py │ │ ├── simple_disc.py │ │ └── disc_self_coupled.py │ ├── analysis_discs │ │ ├── __init__.py │ │ ├── value_analysis │ │ │ ├── __init__.py │ │ │ └── requirements_value_analysis.txt │ │ └── documentation │ │ │ ├── SA_input.PNG │ │ │ ├── SA_output.PNG │ │ │ ├── tornado_chart.png │ │ │ └── evaluated_inputs.png │ └── fake_valueblock_discipline.py ├── study_manager │ └── __init__.py ├── sos_processes │ ├── test │ │ ├── __init__.py │ │ ├── sellar │ │ │ ├── __init__.py │ │ │ ├── test_sellar_coupling │ │ │ │ ├── __init__.py │ │ │ │ ├── anonymized_dict_sellar_coupling_usecase.csv │ │ │ │ └── usecase_dataset_sellar_coupling.json │ │ │ └── test_sellar_list │ │ │ │ ├── __init__.py │ │ │ │ ├── anonymized_dict_sellar_list_usecase.csv │ │ │ │ └── usecase_dataset_sellar_list.json │ │ ├── disc1_disc3 │ │ │ ├── __init__.py │ │ │ ├── test_disc1_disc3_coupling │ │ │ │ ├── __init__.py │ │ │ │ ├── anonymized_dis1_disc3_usecase1.csv │ │ │ │ └── anonymized_dis1_disc3_usecase2.csv │ │ │ └── test_disc1_disc3_list │ │ │ │ ├── __init__.py │ │ │ │ ├── anonymized_dis1_disc3_usecase1.csv │ │ │ │ └── anonymized_dis1_disc3_usecase2.csv │ │ ├── test_disc1 │ │ │ ├── __init__.py │ │ │ ├── process.py │ │ │ └── usecase.py │ │ ├── test_csv_data │ │ │ ├── __init__.py │ │ │ └── process.py │ │ ├── tests_driver_eval │ │ │ ├── __init__.py │ │ │ ├── mono │ │ │ │ ├── __init__.py │ │ │ │ ├── test_mono_driver_sellar │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_mono_driver_simple │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_with_uq │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_mono_driver_grid_search │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── eval_inputs_selection.csv │ │ │ │ │ ├── eval_outputs_selection.csv │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_grid_search_sellar │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_mono_driver_sellar_simple_disc │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_mono_driver_with_sample_option │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_sample_generator_simple │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_with_sample_option_sellar │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_mono_driver_sample_generator_sellar_coupling │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_sample_generator_sellar_list │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_mono_driver_sample_generator_subprocess_1_3 │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_sample_generato_coupling_dataframes │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_sample_generator_sellar_disc1_disc2 │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_mono_driver_sample_generator_tornado_analysis │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_sample_generator_sellar_coupling_new_types │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_mono_driver_sample_generator_tornado_analysis_sellar │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ └── test_mono_driver_sample_generator_tornado_analysis_df_outputs │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ ├── multi │ │ │ │ ├── __init__.py │ │ │ │ ├── test_multi_driver │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_multi_driver_group │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_multi_driver_sellar │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_multi_driver_simple │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_multi_driver_with_map │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_multi_driver_archibuilder │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_multi_driver_hide_coupling │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_multi_driver_of_multi_driver │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_multi_driver_subprocess_1_3 │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_multi_driver_sample_generator_simple │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_multi_driver_with_sample_option_sellar │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_multi_driver_of_multi_driver_archibuilder │ │ │ │ │ └── __init__.py │ │ │ │ ├── test_multi_driver_sample_generator_sellar_simple │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ ├── test_multi_driver_sample_generator_sellar_coupling │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ │ └── test_multi_driver_sample_generator_subprocess_1_3 │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── process.py │ │ │ └── monte_carlo │ │ │ │ ├── __init__.py │ │ │ │ ├── test_sellar │ │ │ │ └── __init__.py │ │ │ │ └── test_sellar_with_post │ │ │ │ └── __init__.py │ │ ├── test_disc10_dynamic │ │ │ ├── __init__.py │ │ │ ├── documentation │ │ │ │ ├── __init__.py │ │ │ │ └── process.markdown │ │ │ └── process.py │ │ ├── test_disc1_all_types │ │ │ ├── __init__.py │ │ │ ├── usecase_local_dataset_copy_test.json │ │ │ ├── usecase_dataset.json │ │ │ ├── usecase_local_dataset.json │ │ │ ├── usecase_local_dataset_error.json │ │ │ ├── process.py │ │ │ └── usecase.py │ │ ├── test_disc1_scenario │ │ │ ├── __init__.py │ │ │ ├── documentation │ │ │ │ ├── __init__.py │ │ │ │ └── process.markdown │ │ │ ├── usecase.py │ │ │ └── process.py │ │ ├── test_disc_all_types │ │ │ ├── __init__.py │ │ │ └── process.py │ │ ├── test_same_discipline │ │ │ ├── __init__.py │ │ │ └── usecase.py │ │ ├── test_sample_generator │ │ │ ├── __init__.py │ │ │ ├── design_space_doe_x_z.csv │ │ │ ├── eval_inputs_doe_x_z.csv │ │ │ ├── eval_inputs_cp_x_z.csv │ │ │ ├── eval_inputs_cp_x_y_1_z.csv │ │ │ └── process.py │ │ ├── test_script_gemseo │ │ │ ├── __init__.py │ │ │ └── usecase.py │ │ ├── test_script_gemseo_mda │ │ │ ├── __init__.py │ │ │ └── usecase.py │ │ ├── test_sellar_coupling │ │ │ ├── __init__.py │ │ │ └── anonymized_dict_sellar_coupling_usecase.csv │ │ ├── test_sellar_coupling13 │ │ │ └── __init__.py │ │ ├── test_architecture_standard │ │ │ └── __init__.py │ │ ├── test_disc1_custom_driver │ │ │ ├── __init__.py │ │ │ └── process.py │ │ ├── test_disc1_disc2_coupling │ │ │ ├── __init__.py │ │ │ └── documentation │ │ │ │ ├── __init__.py │ │ │ │ └── process.markdown │ │ ├── test_disc1_disc3_coupling │ │ │ ├── __init__.py │ │ │ ├── anonymized_dis1_disc3_usecase1.csv │ │ │ └── anonymized_dis1_disc3_usecase2.csv │ │ ├── test_disc1_nested_types │ │ │ ├── __init__.py │ │ │ ├── usecase_local_dataset_V1.json │ │ │ ├── usecase_local_dataset_copy_test.json │ │ │ ├── usecase_local_dataset.json │ │ │ └── process.py │ │ ├── test_sellar_opt_discopt │ │ │ └── __init__.py │ │ ├── test_architecture_with_scatter │ │ │ └── __init__.py │ │ ├── test_disc1_disc2_couplingdefault │ │ │ ├── __init__.py │ │ │ └── process.py │ │ ├── test_disc1_disc2_float_coupling │ │ │ ├── __init__.py │ │ │ ├── documentation │ │ │ │ ├── __init__.py │ │ │ │ └── process.markdown │ │ │ ├── process.py │ │ │ └── usecase_coupling_2_disc_test.py │ │ ├── test_disc1_disc2_samenamespace │ │ │ ├── __init__.py │ │ │ ├── documentation │ │ │ │ ├── __init__.py │ │ │ │ └── process.markdown │ │ │ └── usecase_coupling_samenamespace.py │ │ ├── test_problem_coupling_dataframes │ │ │ └── __init__.py │ │ ├── test_sellar_coupling_new_types │ │ │ └── __init__.py │ │ ├── test_disc1_disc2_coupling_of_coupling │ │ │ └── __init__.py │ │ ├── test_same_sub_process_inside_a_process │ │ │ └── __init__.py │ │ ├── test_same_two_scatter_inside_a_process │ │ │ └── __init__.py │ │ ├── test_uncertainty_quantification_analysis │ │ │ └── __init__.py │ │ ├── test_disclog │ │ │ ├── __init__.py │ │ │ ├── process.py │ │ │ └── usecase.py │ │ ├── test_disc_charts │ │ │ ├── __init__.py │ │ │ └── process.py │ │ ├── test_sellar_uq │ │ │ ├── __init__.py │ │ │ ├── sellar_doe │ │ │ │ └── __init__.py │ │ │ ├── sellar_mdo │ │ │ │ └── __init__.py │ │ │ └── sellar_uq │ │ │ │ └── __init__.py │ │ ├── test_ValueAnalysis_DoE │ │ │ └── __init__.py │ │ ├── test_disc1_two_ns_db │ │ │ ├── __init__.py │ │ │ └── usecase.py │ │ ├── test_generic_process │ │ │ ├── __init__.py │ │ │ ├── process.py │ │ │ └── _usecase.py │ │ ├── test_residual_variables │ │ │ ├── __init__.py │ │ │ ├── process.py │ │ │ └── usecase_test_residual_variables.py │ │ ├── test_disc1_disc2_dataset │ │ │ ├── __init__.py │ │ │ ├── usecase_3datasets.json │ │ │ ├── usecase_2datasets.json │ │ │ ├── usecase_dataset.json │ │ │ └── usecase_5datasets.json │ │ ├── test_uncertainty_analysis │ │ │ ├── __init__.py │ │ │ └── process.py │ │ └── test_uncertainty_quantification_with_arrays │ │ │ ├── __init__.py │ │ │ └── process.py │ └── __init__.py ├── datasets_database │ ├── datasets │ │ └── dataset_all_types │ │ │ ├── d.csv │ │ │ ├── y_array.csv │ │ │ └── descriptor.json │ └── mappings │ │ ├── mapping_test_disc1_v1_all_study.json │ │ ├── mapping_test_disc1_all_types.json │ │ └── mapping_test_disc1_import_mix_v0v1.json ├── __init__.py └── auto_complete_headers.py ├── MANIFEST.in ├── LICENSES ├── EPL-v2.0.txt ├── headers │ └── Apachev2.0.txt ├── MIT.txt ├── BSD-2-Clause.txt └── BSD-3-Clause.txt ├── pytest.ini ├── .gitignore ├── NOTICE ├── .coveragerc ├── strategy.py ├── headers_ignore_config.json ├── requirements.txt ├── README.md ├── ruff.toml ├── pyproject.toml └── .pre-commit-config.yaml /sostrades_core/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tests/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/rw/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/tree/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/study_manager/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/archi_node/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/bspline/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/dashboard/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/scenario/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/datasets/dataset_info/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/base_functions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/builder_info/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/controllers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/grad_solvers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/import_tool/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/proc_builder/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/time_logger/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/sellar/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/test_discs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/check_data_integrity/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/control_functions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/grad_solvers/solvers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/datasets/datasets_serializers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/builder_tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/gemseo_addon/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/disc1_disc3/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/analysis_discs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/grad_solvers/validgrad/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/charts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/tables/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/sample_generators/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_csv_data/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/test_discs/FakeCarModel/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_datasets_db_v1_test.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/pie_charts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/spider_charts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/disciplines_wrappers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/gemseo_addon/grammars/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc10_dynamic/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_all_types/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_scenario/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc_all_types/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_same_discipline/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sample_generator/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_script_gemseo/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_script_gemseo_mda/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_coupling13/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include NOTICE 3 | include README.md 4 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/gemseo_addon/data_converters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/sellar/test_sellar_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/sellar/test_sellar_list/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_architecture_standard/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_custom_driver/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc3_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_nested_types/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_opt_discopt/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/analysis_discs/value_analysis/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/plotly_native_charts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_architecture_with_scatter/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_couplingdefault/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_float_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_samenamespace/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_problem_coupling_dataframes/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_coupling_new_types/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/parallel_coordinates_charts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/pareto_front_optimal_charts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/datasets/datasets_connectors/json_datasets_connector/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/datasets/datasets_connectors/sample_connectors.json: -------------------------------------------------------------------------------- 1 | [ 2 | 3 | ] 4 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/disc1_disc3/test_disc1_disc3_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/disc1_disc3/test_disc1_disc3_list/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc10_dynamic/documentation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_coupling_of_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_scenario/documentation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_coupling/documentation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_same_sub_process_inside_a_process/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_same_two_scatter_inside_a_process/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_uncertainty_quantification_analysis/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/datasets/datasets_connectors/local_filesystem_datasets_connector/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_float_coupling/documentation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_samenamespace/documentation/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sellar/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_simple/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_with_uq/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_group/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_grid_search/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sellar/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_simple/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_with_map/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LICENSES/EPL-v2.0.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/LICENSES/EPL-v2.0.txt -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_archibuilder/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_hide_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_of_multi_driver/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_subprocess_1_3/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/datasets_database/datasets/dataset_all_types/d.csv: -------------------------------------------------------------------------------- 1 | years,x 2 | 2023,1.0 3 | 2024,10.0 4 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_grid_search_sellar/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sellar_simple_disc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_with_sample_option/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/local_datasets_db/dataset_all_types/d.csv: -------------------------------------------------------------------------------- 1 | years,x 2 | 2023,1.0 3 | 2024,10.0 4 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_simple/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_with_sample_option_sellar/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sample_generator_simple/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_with_sample_option_sellar/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_sellar_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_sellar_list/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_subprocess_1_3/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_of_multi_driver_archibuilder/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sample_generator_sellar_simple/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generato_coupling_dataframes/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_sellar_disc1_disc2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_tornado_analysis/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sample_generator_sellar_coupling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sample_generator_subprocess_1_3/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/gemseo_addon/linear_solvers/__init__.py: -------------------------------------------------------------------------------- 1 | """This package contains the PETSc linear solver.""" 2 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_coupling/documentation/process.markdown: -------------------------------------------------------------------------------- 1 | # Test disc 1 disc 2 coupling 2 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_sellar_coupling_new_types/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_tornado_analysis_sellar/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | python_files = l0*.py 3 | testpaths = 4 | sostrades_core/tests 5 | addopts = --numprocesses=auto 6 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_samenamespace/documentation/process.markdown: -------------------------------------------------------------------------------- 1 | # Test disc 1 disc 2 coupling 2 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_tornado_analysis_df_outputs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/b_vec.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/data/b_vec.pkl -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_float_coupling/documentation/process.markdown: -------------------------------------------------------------------------------- 1 | # Test disc 1 disc 2 float coupling 2 | -------------------------------------------------------------------------------- /sostrades_core/tests/dm_df_pandas1/dm.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/dm_df_pandas1/dm.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/data/a_mat_sparse.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/data/a_mat_sparse.npz -------------------------------------------------------------------------------- /sostrades_core/datasets_database/datasets/dataset_all_types/y_array.csv: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 2 | 2.000000000000000000e+00 3 | 3.000000000000000000e+00 4 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/local_datasets_db/dataset_all_types/y_array.csv: -------------------------------------------------------------------------------- 1 | 1.000000000000000000e+00 2 | 2.000000000000000000e+00 3 | 3.000000000000000000e+00 4 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sample_generator/design_space_doe_x_z.csv: -------------------------------------------------------------------------------- 1 | variable,lower_bnd,upper_bnd 2 | x,[0.0],[10.0] 3 | z,"[-10.0, 0.0]","[10.0, 10.0]" 4 | -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_sellar_1.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_sellar_1.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_sellar_2.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_sellar_2.pkl -------------------------------------------------------------------------------- /sostrades_core/sos_processes/__init__.py: -------------------------------------------------------------------------------- 1 | label = 'SoSTrades Code Repository' 2 | description = 'Contains processes for SoSTrades Code with Execution Engine v4, mainly test processes' 3 | -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_sellar_problem.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_sellar_problem.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_design_var_bspline.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_design_var_bspline.pkl -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/analysis_discs/documentation/SA_input.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/sos_wrapping/analysis_discs/documentation/SA_input.PNG -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/analysis_discs/documentation/SA_output.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/sos_wrapping/analysis_discs/documentation/SA_output.PNG -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/test_discs/documentation/test_doc_image.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/sos_wrapping/test_discs/documentation/test_doc_image.PNG -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sample_generator/eval_inputs_doe_x_z.csv: -------------------------------------------------------------------------------- 1 | selected_input,full_name 2 | False,Eval.subprocess.Sellar_Problem.local_dv 3 | True,x 4 | False,y_1 5 | False,y_2 6 | True,z 7 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/analysis_discs/documentation/tornado_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/sos_wrapping/analysis_discs/documentation/tornado_chart.png -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_Test_default_dataframe_fill.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_Test_default_dataframe_fill.pkl -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/analysis_discs/documentation/evaluated_inputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/sos_wrapping/analysis_discs/documentation/evaluated_inputs.png -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_02.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_02.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_03.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_03.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_04.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_04.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_05.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_05.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_06.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_06.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_07.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_07.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_08.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_08.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_11.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_obj_vs_design_var_sellar_test_11.pkl -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_grid_search/eval_inputs_selection.csv: -------------------------------------------------------------------------------- 1 | selected_input,full_name 2 | True,GridSearch.Disc1.a 3 | False,GridSearch.Disc1.b 4 | True,GridSearch.Disc1.x 5 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/local_datasets_db/dataset_nested_types/non_serializable.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/data/local_datasets_db/dataset_nested_types/non_serializable.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_Test_dataframe_fill_one_column_for_key.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_Test_dataframe_fill_one_column_for_key.pkl -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_scenario/documentation/process.markdown: -------------------------------------------------------------------------------- 1 | # Test Disc1 Scenario 2 | This "Test Disc1 Scenario" specify an example of a Disc1 process. 3 | It uses the 1 wrapped discipline : disc1_scenario.Disc1 4 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_grid_search/eval_outputs_selection.csv: -------------------------------------------------------------------------------- 1 | selected_output,full_name 2 | False,GridSearch.Disc1.indicator 3 | True,GridSearch.Disc1.y 4 | False,GridSearch.Disc1.y_dict 5 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/sellar/test_sellar_list/anonymized_dict_sellar_list_usecase.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .x,[11.] 3 | .y_1,[1.] 4 | .y_2,[1.] 5 | .z,"[1.,1.]" 6 | .Sellar_Problem.local_dv,10.0 7 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/disc1_disc3/test_disc1_disc3_list/anonymized_dis1_disc3_usecase1.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .a,3.0 3 | .x,2.0 4 | .z,12.0 5 | .Disc1.b,8.0 6 | .Disc3.constant,3.0 7 | .Disc3.power,2 8 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/disc1_disc3/test_disc1_disc3_list/anonymized_dis1_disc3_usecase2.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .a,3.0 3 | .x,3.0 4 | .z,1.2 5 | .Disc1.b,4.0 6 | .Disc3.constant,3.0 7 | .Disc3.power,2 8 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc3_coupling/anonymized_dis1_disc3_usecase1.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .a, 3.0 3 | .x, 3.0 4 | .Disc1.b, 4.0 5 | .Disc3.constant, 3.0 6 | .Disc3.power, 2 7 | .Disc3.z, 1.2 8 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc3_coupling/anonymized_dis1_disc3_usecase2.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .a, 6.0 3 | .x, 4.0 4 | .Disc1.b, 2.0 5 | .Disc3.constant, 3.0 6 | .Disc3.power, 2 7 | .Disc3.z, 1.2 8 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_mapping_wildcard_repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0|*|*": [ 5 | "repos:sostrades_core|*|*" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_Test_dataframe_fill_one_column_for_key_1element_deactivated.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_Test_dataframe_fill_one_column_for_key_1element_deactivated.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/jacobian_pkls/jacobian_Test_dataframe_fill_one_column_for_key_2element_deactivated.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/os-climate/sostrades-core/HEAD/sostrades_core/tests/jacobian_pkls/jacobian_Test_dataframe_fill_one_column_for_key_2element_deactivated.pkl -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_23_datasets_mapping_v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v1|*|*": [ 5 | "v1|v0v1_connector|dataset_all_types|*|*" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_datasets_mapping_v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v1|*|*": [ 5 | "v1|json_v1_connector|dataset_all_types|*|*" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sample_generator/eval_inputs_cp_x_z.csv: -------------------------------------------------------------------------------- 1 | selected_input,full_name,list_of_values 2 | False,DoEEval.subprocess.Sellar_Problem.local_dv,[] 3 | True,x,"[0.0, 3.0, 4.0, 5.0, 7.0]" 4 | False,y_1,[] 5 | False,y_2,[] 6 | True,z,"[[-10.0, 0.0], [-5.0, 4.0], [10, 10]]" 7 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/local_datasets_db/dataset_df_bq/descriptor.json: -------------------------------------------------------------------------------- 1 | { 2 | "WITNESS_gdp": { 3 | "value": "@dataframe@WITNESS_gdp.csv" 4 | }, 5 | "dict_strange_keys": { 6 | "value": { 7 | "key1 (?)": "whatever", 8 | "key2 #^/": "whatever" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_nested_types/usecase_local_dataset_V1.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_nested_types", 3 | "namespace_datasets_mapping": { 4 | "v0|*|*": [ 5 | "V1|local_datasets_V1|nested_type|*|*" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sample_generator/eval_inputs_cp_x_y_1_z.csv: -------------------------------------------------------------------------------- 1 | selected_input,full_name,list_of_values 2 | false,DoEEval.subprocess.Sellar_Problem.local_dv,[] 3 | true,x,"[0.0, 3.0, 4.0, 5.0, 7.0]" 4 | true,y_1,"[1.0,2.0]" 5 | false,y_2,[] 6 | true,z,"[[-10.0, 0.0], [-5.0, 4.0], [10, 10]]" 7 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_24_repository_datasets_mapping_v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v1|*|*": [ 5 | "v1|repos:sostrades_core|test_dataset_all_types_v1_all_study__tmp|*|*" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_export_mapping_repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0|.Disc1|*": [ 5 | "MVP0_local_datasets_connector_export_test|dataset_disc1|*" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | .project 3 | .pydevproject 4 | .settings/ 5 | .python-version 6 | uv.lock 7 | coverage.xml 8 | nosetests.xml 9 | .coverage 10 | xdsm.html 11 | build/ 12 | dist/ 13 | sos_trades_core.egg-info/ 14 | sostrades_core.egg-info/ 15 | /.pytest_cache/ 16 | .vscode 17 | .ruff.toml 18 | -------------------------------------------------------------------------------- /sostrades_core/datasets_database/mappings/mapping_test_disc1_v1_all_study.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v1|*|*": [ 5 | "v1|repos:sostrades_core|test_dataset_all_types_v1_all_study|*|*" 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/sellar/test_sellar_coupling/anonymized_dict_sellar_coupling_usecase.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .SellarCoupling.x,11. 3 | .SellarCoupling.y_1,1. 4 | .SellarCoupling.y_2,1. 5 | .SellarCoupling.z,"[1.,1.]" 6 | .SellarCoupling.Sellar_Problem.local_dv,10.0 7 | -------------------------------------------------------------------------------- /sostrades_core/tools/refactoring/eev4/current/sos_classes.puml: -------------------------------------------------------------------------------- 1 | 2 | @startuml 3 | class SOSCoupling 4 | SoSDisciplineBuilder <|- SOSCoupling 5 | MDAChain <|- SOSCoupling 6 | SoSDiscipline <|- SoSDisciplineBuilder 7 | 8 | Discipline <|- SoSDiscipline 9 | 10 | SoSDisciplineBuilder <|- SoSDisciplineScatter 11 | @enduml 12 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/disc1_disc3/test_disc1_disc3_coupling/anonymized_dis1_disc3_usecase1.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .D1_D3_Coupling.a,3.0 3 | .D1_D3_Coupling.x,3.0 4 | .D1_D3_Coupling.z,1.2 5 | .D1_D3_Coupling.Disc1.b,4.0 6 | .Disc3.constant,3.0 7 | .D1_D3_Coupling.Disc3.power,2 8 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/disc1_disc3/test_disc1_disc3_coupling/anonymized_dis1_disc3_usecase2.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .D1_D3_Coupling.a,6.0 3 | .D1_D3_Coupling.x,4.0 4 | .D1_D3_Coupling.z,1.2 5 | .D1_D3_Coupling.Disc1.b,2.0 6 | .D1_D3_Coupling.Disc3.constant,3.0 7 | .D1_D3_Coupling.Disc3.power,2 8 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache sostrades_core 2 | Copyright 2022 The Apache Software Foundation. 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | This software contains code originally developed 8 | at Airbus SAS. (https://www.airbus.com/) 9 | Copyright 2020 - 2021 Airbus SAS. All Rights Reserved. 10 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_23_datasets_mapping_v0.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "v0|v0v1_connector|root|*" 6 | ], 7 | "v0|.Disc1|*": [ 8 | "v0|v0v1_connector|Disc1|*" 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_example_mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "mock.process.path", 3 | "namespace_datasets_mapping": { 4 | "v0|namespace1|*": [ 5 | "<1connector_id>|<1dataset_id>|*" 6 | ], 7 | "v0|namespace2|*": [ 8 | "<1connector_id>|<1dataset_id>|*", 9 | "<2connector_id>|<2dataset_id>|*" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_example_mapping_error_format.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "mock.process.path", 3 | "namespace_datasets_mapping": { 4 | "v0|namespace1|*": [ 5 | "<1dataset_id>|*" 6 | ], 7 | "v0|namespace2|*": [ 8 | "<1connector_id>|<1dataset_id>|*", 9 | "<2connector_id>|<2dataset_id>|*" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc10_dynamic/documentation/process.markdown: -------------------------------------------------------------------------------- 1 | # Test Disc10 setup_sos_discipline 2 | This "Test Process: Disc10 dynamic " specifies an example of a Disc process to instantiate the Disc10 Discipline with dynamic setting between 3 models. 3 | 4 | It uses the wrapped discipline (or model) : sostrades-core.sostrades_core.sos_wrapping.test_discs.disc10_dynamic.Disc10 5 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_coupling/anonymized_dict_sellar_coupling_usecase.csv: -------------------------------------------------------------------------------- 1 | variable,value 2 | .SellarCoupling.x,11. 3 | .SellarCoupling.y_1,1. 4 | .SellarCoupling.y_2,1. 5 | .SellarCoupling.z,"[1.,1.]" 6 | .SellarCoupling.Sellar_Problem.local_dv,10.0 7 | .SellarCoupling.max_mda_iter,100 8 | .SellarCoupling.tolerance',1e-12 9 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/public_key.pem: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCofPUt2Lw3FQcdsee1aZ68OztoAQSDLjgTHqK2ySPzYxVPWLEp/g+G5+yTv2pPgj+tJJJ2pKk0pgHqCvSl6mA7IRso/RgNqO2VtewA7swA5HlbgIi5VwypycoUgvdx/Z0PR5Ojuhpnp19o0m4iDo23wFi9oILzx+5/HCtHNxjurLeT4iiO1655MW6cXIAEUi6GkYZYSeQIXbu3bt1NuXgt03omsmDvSoKA2J79Z8v8bK3z+WrA/Tj8w6ijA8A8QBLDJG2j3YtngBg2sDACFHqcGqb5KyHSpbMwlDyYIPkIfaIJFRYMCkArjbFuWFgMuT+0sMYRzj8z69wJobw41gJb NG871FD@TOLX302087234 2 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | relative_files = True 3 | branch = True 4 | omit = 5 | */tests/* 6 | */__init__.py 7 | docs/ 8 | 9 | # [report] 10 | # show_#issing = True 11 | # omit = sos_trades_core/sos_processes/*,sos_trades_core/tools/yaml/*,sos_trades_core/tools/controllers/*,sos_trades_core/tools/cst_manager/*,sos_trades_core/tools/time_logger/* 12 | # exclude_lines = 13 | # raise NotImplementedError 14 | # if __name__ == .__main__.: 15 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/local_datasets_db/dataset_fail_descriptor_error/descriptor.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": {"value": 1}, 3 | "b": {"value": 2}, 4 | "b_bool": {"value": false}, 5 | "name": {"value": "A1"}, 6 | "x": {"value": 4.0}, 7 | "x_dict": {"value": {"test1":1,"test2":2}}, 8 | "y_array": {"value": "@array@y_array.csv"}, 9 | "z_list": {"value": [1.0,2.0,3.0]},c 10 | "d": {"value": "@dataframe@d.csv"} 11 | } 12 | -------------------------------------------------------------------------------- /sostrades_core/tools/refactoring/eev4/current/sequence_sos_build.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | User -> ExecEngine: configure 3 | ExecEngine -> Factory: build 4 | 5 | Factory -> SoSDisciplineScatter: build 6 | SoSDisciplineScatter -> Builder: build 7 | Builder -> Discipline: __init__ 8 | 9 | User -> DataManager: set_values_from_dict 10 | User -> ExecEngine : execute 11 | ExecEngine -> SOSCoupling: execute 12 | SOSCoupling -> Discipline: execute 13 | @enduml 14 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_all_types/usecase_local_dataset_copy_test.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_local_datasets_connector_copy_test|dataset_all_types|*" 6 | ], 7 | "v0|.Disc1|*": [ 8 | "MVP0_local_datasets_connector_copy_test|dataset_all_types|*" 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sostrades_core/tools/refactoring/db_connector/class_diag_1.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | class ExecutionEngine 3 | class Proxydiscipline 4 | class DBConnectorManager 5 | class AbstractDataConnector 6 | class TrinoDataConnector 7 | 8 | WIP 9 | 10 | ExecutionEngine *-- Proxydiscipline 11 | DisciplineProxy *-- DisciplineWrapp 12 | DisciplineProxy --* SoSDisciplineBuilder 13 | 14 | Configuration -> MDOCouplingStructure 15 | 16 | ExecutionEngine -> DisciplineProxy 17 | @enduml 18 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_nested_types/usecase_local_dataset_copy_test.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_nested_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_local_datasets_connector_copy_test_nested|dataset_nested_types|*" 6 | ], 7 | "v0|.Disc1|*": [ 8 | "MVP0_local_datasets_connector_copy_test_nested|dataset_nested_types|*" 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_mapping_repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "repos:sostrades_core|default_numerical_parameters|*", 6 | "repos:sostrades_core|dataset_all_types|*" 7 | ], 8 | "v0|.Disc1|*": [ 9 | "repos:sostrades_core|default_numerical_parameters|*", 10 | "repos:sostrades_core|dataset_all_types|*" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/test_discs/documentation/disc10_dynamic.markdown: -------------------------------------------------------------------------------- 1 | # The Disc10 discipline is a dynamic discipline that switches between 3 models. 2 | 3 | If Model_Type== 'Linear': 4 | 5 | y = Disc10(a,x) = a * x 6 | 7 | elif Model_Type== 'Affine': 8 | 9 | y = Disc10(a,x,b) = a * x + b 10 | 11 | elif Model_Type== 'Polynomial': 12 | 13 | y = Disc10(a,x,b,power) = a * x**power + b 14 | 15 | Default value of 'Model_Type' is 'Linear'. 16 | 17 | Default value of 'a' is 1. 18 | 19 | Default value of 'power' is 2. 20 | -------------------------------------------------------------------------------- /sostrades_core/datasets_database/mappings/mapping_test_disc1_all_types.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "repos:sostrades_core|default_numerical_parameters|*", 6 | "repos:sostrades_core|dataset_all_types|*" 7 | ], 8 | "v0|.Disc1|*": [ 9 | "repos:sostrades_core|default_numerical_parameters|*", 10 | "repos:sostrades_core|dataset_all_types|*" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/sellar/test_sellar_coupling/usecase_dataset_sellar_coupling.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.sellar.test_sellar_coupling", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_datasets_connector|default_numerical_parameters|*" 6 | ] 7 | }, 8 | "sub_process_datasets_mapping": { 9 | "v0|.SellarCoupling|*": "./sostrades_core/sos_processes/test/sellar/test_sellar_list/usecase_dataset_sellar_list.json" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_all_types/usecase_dataset.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_datasets_connector|default_numerical_parameters|*", 6 | "MVP0_datasets_connector|dataset_all_types|*" 7 | ], 8 | "v0|.Disc1|*": [ 9 | "MVP0_datasets_connector|default_numerical_parameters|*", 10 | "MVP0_datasets_connector|dataset_all_types|*" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sostrades_core/datasets_database/mappings/mapping_test_disc1_import_mix_v0v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v1||*": [ 5 | "v1|repos:sostrades_core|test_dataset_all_types_v1_all_study|*|*" 6 | ], 7 | "v0|.Disc1|*": [ 8 | "v0|repos:sostrades_core|dataset_all_types|*" 9 | ], 10 | "v1|.Disc1|y_array": [ 11 | "v1|repos:sostrades_core|test_dataset_all_types_v1_all_study|*|y_array" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /sostrades_core/tools/refactoring/db_connector/seq_as_is.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | Participant User 3 | Participant ExecEngine 4 | Participant ConnectorFactory 5 | Participant Connector 6 | User -> ExecEngine: execute 7 | 8 | loop 9 | note over ExecEngine 10 | For each variable in the DM 11 | end note 12 | ExecEngine -> ConnectorFactory: use_data_connector 13 | ConnectorFactory --> Connector: <> 14 | ConnectorFactory -> Connector: load_data 15 | end loop 16 | ExecEngine -> ExecEngine: update_from_dm 17 | ExecEngine -> ExecEngine: prepare_exec / exec 18 | @enduml 19 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_all_types/usecase_local_dataset.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_local_datasets_connector|default_numerical_parameters|*", 6 | "MVP0_local_datasets_connector|dataset_all_types|*" 7 | ], 8 | "v0|.Disc1|*": [ 9 | "MVP0_local_datasets_connector|default_numerical_parameters|*", 10 | "MVP0_local_datasets_connector|dataset_all_types|*" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/analysis_discs/value_analysis/requirements_value_analysis.txt: -------------------------------------------------------------------------------- 1 | # Additional requirements for Value Analysis discipline 2 | # Install with: pip install -r requirements_value_analysis.txt 3 | 4 | # Core MCDA library 5 | pyDecision>=3.14.7 6 | 7 | # Plotting libraries (if not already installed) 8 | plotly>=5.0.0 9 | 10 | # Scientific computing (usually already available in SoSTrades environment) 11 | scikit-learn>=1.0.0 12 | pandas>=1.3.0 13 | numpy>=1.20.0 14 | 15 | # Optional: For advanced visualizations 16 | seaborn>=0.11.0 17 | matplotlib>=3.3.0 18 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_24_repository_datasets_mapping_mix_v0v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v1||*": [ 5 | "v1|repos:sostrades_core|test_dataset_all_types_v1_all_study__tmp|*|*" 6 | ], 7 | "v0|.Disc1|*": [ 8 | "v0|repos:sostrades_core|dataset_all_types|*" 9 | ], 10 | "v1|.Disc1|y_array": [ 11 | "v1|repos:sostrades_core|test_dataset_all_types_v1_all_study__tmp|*|y_array" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_nested_types/usecase_local_dataset.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_nested_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_local_datasets_connector|default_numerical_parameters|*", 6 | "MVP0_local_datasets_connector|dataset_nested_types|*" 7 | ], 8 | "v0|.Disc1|*": [ 9 | "MVP0_local_datasets_connector|default_numerical_parameters|*", 10 | "MVP0_local_datasets_connector|dataset_nested_types|*" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_all_types/usecase_local_dataset_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_local_datasets_connector|default_numerical_parameters|*", 6 | "MVP0_local_datasets_connector|dataset_fail_descriptor_error|*" 7 | ], 8 | "v0|.Disc1|*": [ 9 | "MVP0_local_datasets_connector|default_numerical_parameters|*", 10 | "MVP0_local_datasets_connector|dataset_all_types|*" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_mapping_parameters_level_repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0|*|*": [ 5 | "repos:sostrades_core|default_numerical_parameters|*" 6 | ], 7 | "v0|.Disc1|a": [ 8 | "repos:sostrades_core|dataset_all_types|b" 9 | ], 10 | "v0|.Disc1|x": [ 11 | "repos:sostrades_core|dataset_all_types|*" 12 | ], 13 | "v0|.Disc1|*": [ 14 | "repos:sostrades_core|dataset_all_types|d" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/local_datasets_db/dataset_nested_types/descriptor.json: -------------------------------------------------------------------------------- 1 | { 2 | "X_dict_df": { 3 | "value": "@object@X_dict_df" 4 | }, 5 | "X_dict_dict_df": { 6 | "value": "@object@X_dict_dict_df" 7 | }, 8 | "X_dict_dict_float": { 9 | "value": "@object@X_dict_dict_float" 10 | }, 11 | "X_array_string": { 12 | "value": "@object@X_array_string" 13 | }, 14 | "X_array_df": { 15 | "value": "@object@X_array_df" 16 | }, 17 | "X_dspace_lists": { 18 | "value": "@object@X_dspace_lists" 19 | }, 20 | "X_dspace_array": { 21 | "value": "@object@X_dspace_array" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /LICENSES/headers/Apachev2.0.txt: -------------------------------------------------------------------------------- 1 | Copyright 2023 Capgemini 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_export_mapping_param_level.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0|*|a": [ 5 | "MVP0_local_export_test_param|default_numerical_parameters|a" 6 | ], 7 | "v0|.Disc1|a": [ 8 | "MVP0_local_export_test_param|dataset_all_types|b" 9 | ], 10 | "v0|.Disc1|x": [ 11 | "MVP0_local_export_test_param|dataset_all_types|*" 12 | ], 13 | "v0|.Disc1|*": [ 14 | "MVP0_local_export_test_param|dataset_all_types|d" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sostrades_core/datasets_database/datasets/dataset_all_types/descriptor.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": { 3 | "value": 1 4 | }, 5 | "b": { 6 | "value": 2 7 | }, 8 | "b_bool": { 9 | "value": false 10 | }, 11 | "name": { 12 | "value": "A1" 13 | }, 14 | "x": { 15 | "value": 4.0 16 | }, 17 | "x_dict": { 18 | "value": { 19 | "test1": 1, 20 | "test2": 2 21 | } 22 | }, 23 | "y_array": { 24 | "value": "@array@y_array.csv" 25 | }, 26 | "z_list": { 27 | "value": [ 28 | 1.0, 29 | 2.0, 30 | 3.0 31 | ] 32 | }, 33 | "d": { 34 | "value": "@dataframe@d.csv" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/local_datasets_db/dataset_all_types/descriptor.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": { 3 | "value": 1 4 | }, 5 | "b": { 6 | "value": 2 7 | }, 8 | "b_bool": { 9 | "value": false 10 | }, 11 | "name": { 12 | "value": "A1" 13 | }, 14 | "x": { 15 | "value": 4.0 16 | }, 17 | "x_dict": { 18 | "value": { 19 | "test1": 1, 20 | "test2": 2 21 | } 22 | }, 23 | "y_array": { 24 | "value": "@array@y_array.csv" 25 | }, 26 | "z_list": { 27 | "value": [ 28 | 1.0, 29 | 2.0, 30 | 3.0 31 | ] 32 | }, 33 | "d": { 34 | "value": "@dataframe@d.csv" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /sostrades_core/tools/filter/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/gather/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/metaclasses/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | ''' 15 | -------------------------------------------------------------------------------- /sostrades_core/tools/conversion/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/sumdfdict/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/design_space/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/pkl_converter/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/eval_possible_values/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/ontology_variables/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disclog/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/ontology_from_glossary/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc_charts/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_uq/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_ValueAnalysis_DoE/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_two_ns_db/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_generic_process/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_residual_variables/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/indicator_charts/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_dataset/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_uq/sellar_doe/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_uq/sellar_mdo/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_uncertainty_analysis/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/check_process_gradients/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/monte_carlo/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/post_processing/plotly_native_charts/templates/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_uncertainty_quantification_with_arrays/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/monte_carlo/test_sellar/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/monte_carlo/test_sellar_with_post/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | -------------------------------------------------------------------------------- /sostrades_core/tools/refactoring/db_connector/seq_proposal.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | Participant User 3 | Participant ExecEngine 4 | Participant DBConnectorManager 5 | Participant Connector 6 | User -> ExecEngine: configure() 7 | ExecEngine -> DBConnectorManager: add_db_connector() 8 | ExecEngine -> DBConnectorManager: is_db_already_registered() 9 | DBConnectorManager --> Connector: <> 10 | 11 | ExecEngine -> DBConnectorManager: get_all_ns() 12 | loop For each namespace, for each variable 13 | ExecEngine -> DBConnectorManager: load_data 14 | DBConnectorManager -> Connector: load_data 15 | end loop 16 | ExecEngine -> ExecEngine: update_from_dm 17 | ExecEngine -> ExecEngine: prepare_exec / exec 18 | @enduml 19 | -------------------------------------------------------------------------------- /sostrades_core/datasets/dataset_info/dataset_info_versions.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | 17 | VERSION_V0 = "V0" 18 | VERSION_V1 = "V1" 19 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/test_discs/test_sellar_uq/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | 17 | from __future__ import annotations 18 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/gemseo_addon/linear_solvers/settings/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | 17 | """Settings for the PETSC linear algebra solvers.""" 18 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_96_statistics.csv: -------------------------------------------------------------------------------- 1 | " ",usecase.Eval_MC.x,usecase.Eval_MC.c_1,usecase.Eval_MC.c_2,usecase.Eval_MC.obj,usecase.Eval_MC.y_1,usecase.Eval_MC.y_2 2 | mean,4.997519304221775,-2.950132692835964,-19.56306713935261,46.287827916578934,6.110132692835965,4.436932860647388 3 | median,4.978639496749555,-2.925273224661433,-19.53316917759335,41.88410680563835,6.085273224661433,4.466830822406651 4 | standard deviation,2.046839852080816,1.9644769580290222,0.41411462849421415,22.921310269476244,1.9644769580290222,0.414114628494214 5 | coefficient of variation,0.4095711747129618,-0.665894440205864,-0.021168185210650878,0.4951908806519415,0.3215113413710869,0.0933335350117944 6 | threshold,5.0,0.0,-19.5,45.0,5.0,4.0 7 | P[X > threshold],0.5,0.07,0.47,0.45,0.71,0.84 8 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/sellar/test_sellar_list/usecase_dataset_sellar_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.sellar.test_sellar_list", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_datasets_connector|default_numerical_parameters|*", 6 | "MVP0_datasets_connector|dataset_sellar|*" 7 | ], 8 | "v0|.Sellar_1|*": [ 9 | "MVP0_datasets_connector|default_numerical_parameters|*" 10 | ], 11 | "v0|.Sellar_2|*": [ 12 | "MVP0_datasets_connector|default_numerical_parameters|*" 13 | ], 14 | "v0|.Sellar_Problem|*": [ 15 | "MVP0_datasets_connector|default_numerical_parameters|*", 16 | "MVP0_datasets_connector|dataset_sellar|*" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /strategy.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.tests.strategy import test_strategy 17 | 18 | if __name__ == "__main__": 19 | test_strategy(main_folder_default_value="sostrades_core", processes_folder="sos_processes") 20 | -------------------------------------------------------------------------------- /sostrades_core/tools/refactoring/eev4/proposal/sequence_sos_build.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | User -> ExecEngine: configure 3 | ExecEngine -> DataManager: load_values(data) 4 | ExecEngine -> Factory: configure 5 | Factory -> Builder: configure 6 | Builder -> DisciplineProxy: configure 7 | DisciplineProxy -> Configuration: configure 8 | Configuration -> MultiScenarioBuilder: init 9 | MultiScenarioBuilder -> Builder: configure 10 | Builder -> MDOCouplingStructure: compute_reduced_graph 11 | Builder -> DisciplineProxy: configure 12 | 13 | User -> ExecEngine: prepare_exec 14 | Builder -> DisciplineProxy: prepare_exec 15 | DisciplineProxy -> DisciplineWrapp : prepare_exec 16 | ExecEngine -> MDAChain : init 17 | 18 | User -> ExecEngine: execute(data) 19 | ExecEngine -> DataManager: load_values(data) 20 | ExecEngine -> MDAChain: execute 21 | MDAChain -> Discipline : execute 22 | @enduml 23 | -------------------------------------------------------------------------------- /sostrades_core/tools/metaclasses/no_instance.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | ''' 15 | 16 | 17 | class NoInstanceMeta(type): 18 | """Metaclass for a class that should not be instanciated""" 19 | 20 | def __call__(cls, *args, **kwargs): 21 | raise TypeError(f"{cls.__name__} cannot be instantiated") 22 | -------------------------------------------------------------------------------- /headers_ignore_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extension_to_ignore": [ 3 | "pkl", 4 | "png", 5 | "jpg", 6 | "csv", 7 | "md", 8 | "markdown", 9 | "avif", 10 | "json", 11 | "in", 12 | "gitignore", 13 | "cfg", 14 | "puml", 15 | "pdf", 16 | "txt", 17 | "ipynb", 18 | "zip", 19 | "rst", 20 | "ini", 21 | "coveragerc", 22 | "toml", 23 | "xlsx" 24 | ], 25 | "files_to_ignore": [ 26 | "sostrades_core/sos_processes/test/test_script_gemseo_mda/plot_newtonraphson_sobieski.py", 27 | "sostrades_core/sos_processes/test/test_script_gemseo/plot_gemseo_in_10_minutes.py", 28 | ".readthedocs.yaml", 29 | "docs/LICENSE-DOC", 30 | "docs/make.bat", 31 | "docs/Makefile", 32 | ".pre-commit-config.yaml", 33 | "LICENSE", 34 | "NOTICE" 35 | ], 36 | "airbus_rev_commit": "11d7f9f" 37 | } 38 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_dataset/usecase_3datasets.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_disc2_dataset", 3 | "namespace_datasets_mapping": { 4 | "v0||*": ["MVP0_datasets_connector|default_numerical_parameters|*", "MVP0_datasets_connector|dataset_a|*"], 5 | "v0|.Disc1VirtualNode|*" : ["MVP0_datasets_connector|default_numerical_parameters|*","MVP0_datasets_connector|dataset_bcx_1|*"], 6 | "v0|.Disc2VirtualNode|*": ["MVP0_datasets_connector|default_numerical_parameters|*","MVP0_datasets_connector|dataset_bcx_2|*"], 7 | "v0|.Disc1|*": ["MVP0_datasets_connector|default_numerical_parameters|*","MVP0_datasets_connector|dataset_bcx_1|*"], 8 | "v0|.Disc2|*": ["MVP0_datasets_connector|default_numerical_parameters|*","MVP0_datasets_connector|dataset_bcx_2|*"] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # Project libraries 2 | # gemseo 3 | gemseo[all]==6.1.0 4 | # External libraries 5 | black==25.1.0 6 | chaospy==4.3.18 7 | cma==4.2.0 8 | cvxpy==1.6.6 9 | db-dtypes==1.2.0 10 | gitpython==3.1.44 11 | matplotlib==3.9.2 12 | numpy==1.26.4 13 | numpoly==1.2.14 # last version with wheel 14 | openturns==1.24 15 | pandas==2.2.2 16 | plotly==5.24.0 17 | pyarrow==20.0.0 18 | pycryptodome==3.23.0 19 | PyYAML==6.0.2 20 | scipy==1.13.0 21 | six==1.17.0 22 | sympy==1.13.2 23 | tqdm==4.66.5 24 | pyDecision==4.7.9 25 | seaborn==0.13.2 26 | scikit-learn==1.5.2 27 | # Development requirements 28 | # breaking change in 8.2.0 https://docs.pytest.org/en/stable/changelog.html#pytest-8-2-0-2024-04-27 29 | # Will be fixed in 8.3.0 https://github.com/pytest-dev/pytest/issues/12275#issuecomment-2108348204 30 | pytest==8.1.2 31 | pytest-cov==6.2.0 32 | pytest-xdist==3.7.0 33 | pytest-durations==1.5.2 34 | ruff==0.11.13 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /sostrades_core/tools/refactoring/eev4/proposal/sos_classes.puml: -------------------------------------------------------------------------------- 1 | 2 | @startuml 3 | class Configuration 4 | class SoSDisciplineBuilder{ 5 | status 6 | } 7 | 8 | class Discipline{ 9 | status 10 | execute() 11 | } 12 | 13 | class SOSDiscipline{ 14 | status 15 | DESC_IN 16 | DESC_OUT 17 | run() 18 | } 19 | 20 | class ExecutionEngine{ 21 | disciplines 22 | configure() 23 | build() 24 | execute() 25 | } 26 | 27 | class DisciplineProxy{ 28 | status 29 | input_data_names 30 | output_data_names 31 | } 32 | 33 | class SOSFactory{ 34 | disciplines_proxys 35 | } 36 | 37 | class MDOCouplingStructure 38 | class DisciplineWrapp 39 | 40 | 41 | DisciplineProxy *-- Configuration 42 | DisciplineProxy *-- DisciplineWrapp 43 | DisciplineProxy --* SoSDisciplineBuilder 44 | 45 | DisciplineWrapp "1" *-- "0..*" SOSDiscipline 46 | DisciplineWrapp "1" *-- "1" Discipline 47 | 48 | Configuration -> MDOCouplingStructure 49 | 50 | ExecutionEngine -> DisciplineProxy 51 | @enduml 52 | -------------------------------------------------------------------------------- /sostrades_core/tools/metaclasses/singleton.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | 17 | 18 | class SingletonMeta(type): 19 | """Metaclass for a singleton class""" 20 | 21 | _instances = {} 22 | 23 | def __call__(cls, *args, **kwargs): 24 | if cls not in cls._instances: 25 | cls._instances[cls] = super().__call__(*args, **kwargs) 26 | return cls._instances[cls] 27 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sellar_uq/sellar_uq/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | # Copyright (c) 2024 Capgemini Engineering 17 | # All rights reserved. 18 | # 19 | # Created on 30/07/2024, 11:24 20 | # Contributors: 21 | # INITIAL AUTHORS - initial API and implementation and/or initial documentation 22 | # :author: Vincent Drouet 23 | # OTHER AUTHORS - MACROSCOPIC CHANGES 24 | """Uncertainty quantification on the Sellar problem.""" 25 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_dataset/usecase_2datasets.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_disc2_dataset", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_datasets_connector|default_numerical_parameters|*", 6 | "MVP0_datasets_connector|dataset_ax|*" 7 | ], 8 | "v0|.Disc1VirtualNode|*": [ 9 | "MVP0_datasets_connector|default_numerical_parameters|*", 10 | "MVP0_datasets_connector|dataset_ax|*" 11 | ], 12 | "v0|.Disc2VirtualNode|*": [ 13 | "MVP0_datasets_connector|default_numerical_parameters|*", 14 | "MVP0_datasets_connector|dataset_ax|*" 15 | ], 16 | "v0|.Disc1|*": [ 17 | "MVP0_datasets_connector|default_numerical_parameters|*", 18 | "MVP0_datasets_connector|dataset_bc|*" 19 | ], 20 | "v0|.Disc2|*": [ 21 | "MVP0_datasets_connector|default_numerical_parameters|*", 22 | "MVP0_datasets_connector|dataset_bc|*" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_dataset/usecase_dataset.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_disc2_dataset", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_datasets_connector|default_numerical_parameters|*", 6 | "MVP0_datasets_connector|dataset_all_in_one|*" 7 | ], 8 | "v0|.Disc1VirtualNode|*": [ 9 | "MVP0_datasets_connector|default_numerical_parameters|*", 10 | "MVP0_datasets_connector|dataset_all_in_one|*" 11 | ], 12 | "v0|.Disc2VirtualNode|*": [ 13 | "MVP0_datasets_connector|default_numerical_parameters|*", 14 | "MVP0_datasets_connector|dataset_all_in_one|*" 15 | ], 16 | "v0|.Disc1|*": [ 17 | "MVP0_datasets_connector|default_numerical_parameters|*", 18 | "MVP0_datasets_connector|dataset_all_in_one|*" 19 | ], 20 | "v0|.Disc2|*": [ 21 | "MVP0_datasets_connector|default_numerical_parameters|*", 22 | "MVP0_datasets_connector|dataset_all_in_one|*" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /sostrades_core/tools/pkl_converter/pkl_tools.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | # -*- coding: utf-8 -*- 17 | 18 | import pickle 19 | from bz2 import BZ2File 20 | 21 | 22 | def dump_compressed_pickle(fname, data): 23 | '''Writes data as a compressed pickle file''' 24 | with BZ2File(fname, 'w') as f: 25 | pickle.dump(data, f) 26 | 27 | 28 | def load_compressed_pickle(fname): 29 | '''Decompress pickle and returns the data''' 30 | data = BZ2File(fname, 'rb') 31 | 32 | return pickle.load(data) 33 | -------------------------------------------------------------------------------- /sostrades_core/tools/bspline/bspline_methods.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/05/16 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | import numpy as np 18 | 19 | from sostrades_core.tools.bspline.bspline import BSpline 20 | 21 | 22 | def bspline_method(ctrl_pts, length): 23 | '''Method to use Bspline on a set of ctrl points over a length''' 24 | list_t = np.linspace(0.0, 1.0, length) 25 | 26 | bspline = BSpline(n_poles=len(ctrl_pts)) 27 | bspline.set_ctrl_pts(ctrl_pts) 28 | 29 | t_list = bspline.eval_list_t(list_t) 30 | 31 | return t_list 32 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_dataset/usecase_5datasets.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_disc2_dataset", 3 | "namespace_datasets_mapping": { 4 | "v0||*": [ 5 | "MVP0_datasets_connector|default_numerical_parameters|*", 6 | "MVP0_datasets_connector|dataset_ax|*" 7 | ], 8 | "v0|.Disc1VirtualNode|*": [ 9 | "MVP0_datasets_connector|default_numerical_parameters|*", 10 | "MVP0_datasets_connector|dataset_ax|*" 11 | ], 12 | "v0|.Disc2VirtualNode|*": [ 13 | "MVP0_datasets_connector|default_numerical_parameters|*", 14 | "MVP0_datasets_connector|dataset_ax|*" 15 | ], 16 | "v0|.Disc1|*": [ 17 | "MVP0_datasets_connector|default_numerical_parameters|*", 18 | "MVP0_datasets_connector|dataset_bw|*", 19 | "MVP0_datasets_connector|dataset_c_1|*" 20 | ], 21 | "v0|.Disc2|*": [ 22 | "MVP0_datasets_connector|default_numerical_parameters|*", 23 | "MVP0_datasets_connector|dataset_b|*", 24 | "MVP0_datasets_connector|dataset_c_2|*" 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_generic_process/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | # -- Generate test 1 process 17 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 18 | 19 | 20 | class ProcessBuilder(BaseProcessBuilder): 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'Generic Process', 24 | 'description': '', 25 | 'category': '', 26 | 'version': '', 27 | } 28 | 29 | def get_builders(self): 30 | builder = self.ee.factory.create_builder_selector_disc(self.ee.study_name) 31 | return builder 32 | -------------------------------------------------------------------------------- /sostrades_core/tools/ontology_variables/ontology_variable_key.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | 17 | 18 | def create_data_key(disc_model_name: str, io_type: str, variable_name: str) -> str: 19 | ''' 20 | Create ontology key to identify a variable 21 | :param disc_name: discipline model name full path in witch is the variable 22 | :param io_type: type in or out of the variable 23 | :param variable_name: name of the variable 24 | 25 | :return: the ontology key: {disc_model_name}_{io_type}put_{variable_name} 26 | ''' 27 | io_type = io_type.lower() 28 | return f'{disc_model_name}_{io_type}put_{variable_name}' 29 | -------------------------------------------------------------------------------- /sostrades_core/tests/data/test_92_export_mapping_disc1_disc2.json: -------------------------------------------------------------------------------- 1 | { 2 | "process_module_path": "sostrades_core.sos_processes.test.test_disc1_all_types", 3 | "namespace_datasets_mapping": { 4 | "v0||x": [ 5 | "MVP0_local_datasets_connector_export_test|test_dataset_disc1_disc2|x" 6 | ], 7 | "v0|.Disc1|a": [ 8 | "MVP0_local_datasets_connector_export_test|test_dataset_disc1_disc2|a" 9 | ], 10 | "v0|.Disc1|b": [ 11 | "MVP0_local_datasets_connector_export_test|test_dataset_disc1_disc2|b" 12 | ], 13 | "v0|.Disc1|indicator": [ 14 | "MVP0_local_datasets_connector_export_test|test_dataset_disc1_disc2|indicator" 15 | ], 16 | "v0||y": [ 17 | "MVP0_local_datasets_connector_export_test|test_dataset_disc1_disc2|y" 18 | ], 19 | "v0|.Disc2|constant": [ 20 | "MVP0_local_datasets_connector_export_test|test_dataset_disc1_disc2|constant" 21 | ], 22 | "v0|.Disc2|power": [ 23 | "MVP0_local_datasets_connector_export_test|test_dataset_disc1_disc2|power" 24 | ], 25 | "v0||z": [ 26 | "MVP0_local_datasets_connector_export_test|test_dataset_disc1_disc2|z" 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /sostrades_core/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/06/07-2023/11/03 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | 18 | import logging 19 | import os 20 | import re 21 | from os.path import dirname, join 22 | 23 | logging.basicConfig(level=logging.INFO) 24 | 25 | # set-up the folder where GEMSEO will look-up for new wrapps (solvers, grammars etc) 26 | # logging.getLogger('gemseo').setLevel('DEBUG') 27 | # Hotfix gemseo pathsep handling 28 | parent_dir = re.sub(r'.\:', '', dirname(__file__)) 29 | GEMSEO_ADDON_DIR = "gemseo_addon" 30 | EXEC_ENGINE = "execution_engine" 31 | 32 | os.environ["GEMSEO_PATH"] = join(parent_dir, EXEC_ENGINE, GEMSEO_ADDON_DIR) 33 | -------------------------------------------------------------------------------- /sostrades_core/tools/scenario/scenario.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 18/02/2025-2025/02/18 Copyright 2025 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | 18 | """ 19 | mode: python; py-indent-offset: 4; tab-width: 4; coding: utf-8 20 | """ 21 | 22 | 23 | class Scenario: 24 | """Class to represent scenario object""" 25 | 26 | def __init__(self, name, scenario_manager=None) -> None: 27 | """Constructor for scenario class""" 28 | self.name = name 29 | self.scenario_manager = scenario_manager 30 | self.parameters = [] 31 | 32 | def get_scenario_parameters(self): 33 | return self.parameters 34 | -------------------------------------------------------------------------------- /sostrades_core/tools/conversion/unit_conversion.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/06/28 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | ''' 18 | from cmath import pi 19 | 20 | 21 | class UnitConversion: 22 | 23 | # conversion unit constant 24 | nm_to_km = 1.85 # nautical mile to kilometer 25 | m_to_ft = 3.28 # meter to feet 26 | lb_to_kg = 0.45 # pounds to kilograms 27 | b_to_hpa = 1000 # bar to hectopascal 28 | ft_per_min_to_m_per_s = 0.00508 # feet per minute to meter per second 29 | m_per_s_to_km_per_h = 3.6 # meter per second to kilometer per hour 30 | deg_to_rad = pi / 180 31 | kts_to_ms = m_per_s_to_km_per_h / nm_to_km 32 | gravity = 9.81 33 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/sos_discipline_driver.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | 17 | import logging 18 | 19 | from sostrades_core.execution_engine.sos_discipline import SoSDiscipline 20 | 21 | ''' 22 | mode: python; py-indent-offset: 4; tab-width: 8; coding: utf-8 23 | ''' 24 | 25 | 26 | class SoSDriverException(Exception): 27 | pass 28 | 29 | 30 | class SoSDisciplineDriver(SoSDiscipline): 31 | def __init__(self, full_name, grammar_type, cache_type, sos_wrapp, reduced_dm, disciplines, 32 | logger: logging.Logger) -> None: 33 | super().__init__(full_name, grammar_type, cache_type, sos_wrapp, reduced_dm, logger=logger) 34 | self._disciplines = disciplines 35 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_script_gemseo_mda/usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | import time 17 | 18 | from sostrades_core.study_manager.study_manager import StudyManager 19 | 20 | 21 | class Study(StudyManager): 22 | 23 | def __init__(self, execution_engine=None) -> None: 24 | super().__init__(__file__, execution_engine=execution_engine) 25 | 26 | def setup_usecase(self): 27 | 28 | dict_values = { 29 | } 30 | return dict_values 31 | 32 | 33 | if '__main__' == __name__: 34 | start = time.time() 35 | uc_cls = Study() 36 | uc_cls.load_data() 37 | uc_cls.run(for_test=True) 38 | stop = time.time() 39 | print(stop - start) 40 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/test_discs/disc_all_types_inherited.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | ''' 15 | from sostrades_core.sos_wrapping.test_discs.disc_all_types import DiscAllTypes as DaT 16 | 17 | 18 | class DiscAllTypes2(DaT): 19 | # ontology information 20 | _ontology_data = { 21 | 'label': 'class ontology heritage', 22 | 'type': 'Research', 23 | 'source': 'SoSTrades Project', 24 | 'validated': '', 25 | 'validated_by': 'SoSTrades Project', 26 | 'last_modification_date': '', 27 | 'category': '', 28 | 'definition': 'discipline used to test ontology import fix', 29 | 'icon': 'fa-solid fa-circle-user', 30 | 'version': '', 31 | } 32 | -------------------------------------------------------------------------------- /LICENSES/BSD-2-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_script_gemseo/usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2025/02/14-2025/02/17 Copyright 2025 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | import time 18 | 19 | from sostrades_core.study_manager.study_manager import StudyManager 20 | 21 | 22 | class Study(StudyManager): 23 | 24 | def __init__(self, execution_engine=None) -> None: 25 | super().__init__(__file__, execution_engine=execution_engine) 26 | 27 | def setup_usecase(self): 28 | 29 | dict_values = { 30 | } 31 | return dict_values 32 | 33 | 34 | if '__main__' == __name__: 35 | start = time.time() 36 | uc_cls = Study() 37 | uc_cls.test() 38 | stop = time.time() 39 | print(stop - start) 40 | -------------------------------------------------------------------------------- /sostrades_core/tools/base_functions/compute_size.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | ''' 15 | 16 | from __future__ import annotations 17 | 18 | import sys 19 | from typing import Any 20 | 21 | 22 | def compute_data_size_in_Mo(data_value: Any) -> float: 23 | """ 24 | Compute the size of an object and convert it to megabytes. 25 | 26 | Args: 27 | data_value: Value of the data to be measured. 28 | 29 | Returns: 30 | Size in megabytes (MB). 31 | 32 | Note: 33 | Returns 0 if data_value is None. 34 | 35 | """ 36 | data_size = 0 37 | if data_value is not None: 38 | # test deep size of the object 39 | data_size = sys.getsizeof(data_value) 40 | return data_size / 1024 / 1024 41 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disclog/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | 'label': 'Core Test DiscLog Process', 23 | 'description': '', 24 | 'category': '', 25 | 'version': '', 26 | } 27 | 28 | def get_builders(self): 29 | mods_dict = { 30 | 'DiscLog': 'sostrades_core.sos_wrapping.test_discs.disc_log_generation.DiscLogGeneration'} 31 | builder_list = self.create_builder_list(mods_dict, ns_dict={'ns_ac': self.ee.study_name}) 32 | return builder_list 33 | -------------------------------------------------------------------------------- /sostrades_core/tools/refactoring/eev4/proposal/sequence_sos_build_update.puml: -------------------------------------------------------------------------------- 1 | @startuml 2 | User -> ExecEngine: configure 3 | ExecEngine -> DataManager: load_values(data) 4 | ExecEngine -> ExecEngine: configure_io 5 | ExecEngine -> Factory: build 6 | Factory -> Builder: build 7 | Factory -> ProxyCoupling: build 8 | ProxyCoupling -> ProxyDiscipline: build (recursive) 9 | ProxyCoupling -> MDOCouplingStructure: compute coupling structure 10 | ProxyDiscipline -> ProxyDiscipline: build 11 | ProxyDiscipline -> Factory: add_(proxy)_discipline 12 | /' Configuration -> MultiScenarioBuilder: init '/ 13 | /' MultiScenarioBuilder -> Builder: configure '/ 14 | /' Builder -> MDOCouplingStructure: compute_reduced_graph '/ 15 | /' Builder -> ProxyDiscipline: configure '/ 16 | 17 | ExecEngine -> ProxyCoupling: configure_io 18 | ProxyCoupling -> ProxyDiscipline: configure (recursive) 19 | ProxyDiscipline -> ProxyDiscipline: configure 20 | 21 | 22 | User -> ExecEngine: prepare_exec 23 | ExecEngine -> ProxyCoupling: prepare_exec 24 | ProxyCoupling -> ProxyDiscipline: prepare_exec 25 | ProxyDiscipline -> ProxyDiscipline : prepare_exec 26 | ProxyDiscipline -> Discipline : init 27 | 28 | User -> ExecEngine: execute(data) 29 | ExecEngine -> DataManager: load_values(data) 30 | ExecEngine -> MDAChain: execute 31 | MDAChain -> Discipline : execute 32 | @enduml 33 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_nested_types/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'Core Test Disc1 Nested Types Process', 24 | 'description': '', 25 | 'category': '', 26 | 'version': '', 27 | } 28 | 29 | def get_builders(self): 30 | mod_path = 'sostrades_core.sos_wrapping.test_discs.disc1_nested_types.Disc1' 31 | disc1_builder = self.ee.factory.get_builder_from_module( 32 | 'Disc1', mod_path) 33 | return disc1_builder 34 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disclog/usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | import time 17 | 18 | from sostrades_core.study_manager.study_manager import StudyManager 19 | 20 | 21 | class Study(StudyManager): 22 | 23 | def __init__(self, execution_engine=None) -> None: 24 | super().__init__(__file__, execution_engine=execution_engine) 25 | 26 | def setup_usecase(self): 27 | 28 | dict_values = { 29 | 'usecase.DiscLog.log_lines': 10, 30 | 'usecase.DiscLog.wait_time_s': 5, 31 | } 32 | return dict_values 33 | 34 | 35 | if '__main__' == __name__: 36 | start = time.time() 37 | uc_cls = Study() 38 | uc_cls.load_data() 39 | uc_cls.run(for_test=True) 40 | stop = time.time() 41 | print(stop - start) 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SoSTrades_CORE 2 | 3 | 4 | ## Description 5 | SoSTradesCore is the Python package containing the core of the execution engine of System of Systems Trades 6 | 7 | ## Packages installation 8 | pip install -r requirements.in --trusted-host pypi.org --trusted-host files.pythonhosted.org 9 | 10 | A dedicated version of GEMSEO is required, for now: 11 | https://gitlab.com/sostrades/gemseo branch sos_develop 12 | 13 | 14 | ## Overview 15 | This package is divided into 6 parts: 16 | 17 | - execution_engine: contains all the methods and wrapped class of gemseo tools necessary to implement processes and studies in SoSTrades 18 | - sos_processes: contains test processes built with disciplines from sos_wrapping 19 | - sos_wrapping: contains test disciplines covering execution engine functionalities 20 | - study_manager: contains generic class to implement studies 21 | - tests: contains tests on execution_engine functionalities, based on sos_processes and sos_wrapping 22 | - tools: contains generic tools of execution_engine 23 | 24 | ## License 25 | The sostrades-core source code is distributed under the Apache License Version 2.0. 26 | A copy of it can be found in the LICENSE file. 27 | 28 | The sostrades-core product depends on other software which have various licenses. 29 | The list of dependencies with their licenses is given in the CREDITS.rst file. 30 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_all_types/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2025/14/02 Copyright 2025 Capgemini 4 | 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | ''' 18 | # -- Generate test 1 process 19 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 20 | 21 | 22 | class ProcessBuilder(BaseProcessBuilder): 23 | 24 | # ontology information 25 | _ontology_data = { 26 | 'label': 'Core Test Disc1 Process', 27 | 'description': '', 28 | 'category': '', 29 | 'version': '', 30 | } 31 | 32 | def get_builders(self): 33 | mod_path = 'sostrades_core.sos_wrapping.test_discs.disc1_all_types.Disc1' 34 | disc1_builder = self.ee.factory.get_builder_from_module( 35 | 'Disc1', mod_path) 36 | return disc1_builder 37 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2025/14/02 Copyright 2025 Capgemini 4 | 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | ''' 18 | # -- Generate test 1 process 19 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 20 | 21 | 22 | class ProcessBuilder(BaseProcessBuilder): 23 | 24 | # ontology information 25 | _ontology_data = { 26 | 'label': 'Core Test Disc1 Process', 27 | 'description': '', 28 | 'category': '', 29 | 'version': '', 30 | } 31 | 32 | def get_builders(self): 33 | mods_dict = { 34 | 'Disc1': 'sostrades_core.sos_wrapping.test_discs.disc1.Disc1'} 35 | builder_list = self.create_builder_list(mods_dict, ns_dict={'ns_ac': self.ee.study_name}) 36 | return builder_list 37 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_generic_process/_usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.study_manager.study_manager import StudyManager 17 | 18 | 19 | class Study(StudyManager): 20 | 21 | def __init__(self, execution_engine=None) -> None: 22 | super().__init__(__file__, execution_engine=execution_engine) 23 | 24 | def setup_usecase(self): 25 | dict_values = { 26 | f'{self.study_name}.repository': 'sostrades_core', 27 | f'{self.study_name}.discipline': 'Disc1', 28 | f'{self.study_name}.x': 3, 29 | f'{self.study_name}.Disc.a': 1, 30 | f'{self.study_name}.Disc.b': 5, 31 | } 32 | return dict_values 33 | 34 | 35 | if '__main__' == __name__: 36 | uc_cls = Study() 37 | uc_cls.load_data() 38 | uc_cls.run(for_test=True) 39 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_all_types/usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 29/01/2024 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | from sostrades_core.study_manager.study_manager import StudyManager 18 | 19 | 20 | class Study(StudyManager): 21 | 22 | def __init__(self, execution_engine=None) -> None: 23 | super().__init__(__file__, execution_engine=execution_engine) 24 | 25 | def setup_usecase(self): 26 | 27 | dict_values = { 28 | f'{self.study_name}.Disc1.x': 3, 29 | f'{self.study_name}.Disc1.a': 1, 30 | f'{self.study_name}.Disc1.b': 5, 31 | f'{self.study_name}.Disc1.name': 'A1' 32 | } 33 | return dict_values 34 | 35 | 36 | if '__main__' == __name__: 37 | uc_cls = Study() 38 | uc_cls.load_data() 39 | uc_cls.run(for_test=True) 40 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_csv_data/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2025/14/02 Copyright 2025 Capgemini 4 | 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | ''' 18 | # -- Generate test DiscCsvData process 19 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 20 | 21 | 22 | class ProcessBuilder(BaseProcessBuilder): 23 | 24 | # ontology information 25 | _ontology_data = { 26 | 'label': 'Core Test CSV Data Process', 27 | 'description': '', 28 | 'category': '', 29 | 'version': '', 30 | } 31 | 32 | def get_builders(self): 33 | mods_dict = { 34 | 'DiscCsvData': 'sostrades_core.sos_wrapping.test_discs.disc_csv_data.DiscCsvData'} 35 | builder_list = self.create_builder_list( 36 | mods_dict, ns_dict={'ns_test': self.ee.study_name}) 37 | return builder_list 38 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1/usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/05/16 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | import time 18 | 19 | from sostrades_core.study_manager.study_manager import StudyManager 20 | 21 | 22 | class Study(StudyManager): 23 | 24 | def __init__(self, execution_engine=None) -> None: 25 | super().__init__(__file__, execution_engine=execution_engine) 26 | 27 | def setup_usecase(self): 28 | 29 | dict_values = { 30 | 'usecase.x': 3, 31 | 'usecase.Disc1.a': 1, 32 | 'usecase.Disc1.b': 5, 33 | } 34 | return dict_values 35 | 36 | 37 | if '__main__' == __name__: 38 | start = time.time() 39 | uc_cls = Study() 40 | uc_cls.load_data() 41 | uc_cls.run(for_test=True) 42 | stop = time.time() 43 | print(stop - start) 44 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_scenario/usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2025/14/02 Copyright 2025 Capgemini 4 | 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | ''' 18 | from sostrades_core.study_manager.study_manager import StudyManager 19 | 20 | 21 | class Study(StudyManager): 22 | 23 | def __init__(self, execution_engine=None) -> None: 24 | super().__init__(__file__, execution_engine=execution_engine) 25 | 26 | def setup_usecase(self): 27 | 28 | x = 2 29 | a = 3 30 | b = 4 31 | dict_values = {} 32 | dict_values[self.study_name + '.a'] = a 33 | dict_values[self.study_name + '.x'] = x 34 | dict_values[self.study_name + '.Disc1.b'] = b 35 | 36 | return [dict_values] 37 | 38 | 39 | if '__main__' == __name__: 40 | uc_cls = Study() 41 | uc_cls.load_data() 42 | uc_cls.run(for_test=True) 43 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc_all_types/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | # -- Generate test 1 process 17 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 18 | 19 | 20 | class ProcessBuilder(BaseProcessBuilder): 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'Core Test DiscAllTypes Process', 24 | 'description': '', 25 | 'category': '', 26 | 'version': '', 27 | } 28 | 29 | def get_builders(self): 30 | mod_path = 'sostrades_core.sos_wrapping.test_discs.disc_all_types.DiscAllTypes' 31 | disc_name = 'DiscAllTypes' 32 | builder_list = self.create_builder_list({disc_name: mod_path}, 33 | ns_dict={'ns_test': f'{self.ee.study_name}.{disc_name}'}) 34 | 35 | return builder_list 36 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_residual_variables/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | 'label': 'Core Test Residual Variable Coupling Process', 23 | 'description': '', 24 | 'category': '', 25 | 'version': '', 26 | } 27 | 28 | def get_builders(self): 29 | disc_dir = 'sostrades_core.sos_wrapping.test_discs.disc_mda_residuals.' 30 | mods_dict = {'Disc1Residuals': disc_dir + 'Disc1Residuals', 31 | 'Disc2Residuals': disc_dir + 'Disc2Residuals', } 32 | builder_list = self.create_builder_list(mods_dict, ns_dict={'ns_coupling': self.ee.study_name}) 33 | 34 | return builder_list 35 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_float_coupling/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'Core Test Disc1 Disc2 float Coupling Process', 24 | 'description': '', 25 | 'category': '', 26 | 'version': '', 27 | } 28 | 29 | def get_builders(self): 30 | disc_dir = 'sostrades_core.sos_wrapping.test_discs.' 31 | mods_dict = {'Disc1': disc_dir + 'disc1_disc2_float_coupled.Disc1', 32 | 'Disc2': disc_dir + 'disc1_disc2_float_coupled.Disc2', } 33 | builder_list = self.create_builder_list(mods_dict, ns_dict={'ns_ac': self.ee.study_name}) 34 | 35 | return builder_list 36 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_scenario/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/07/24 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | # -- Generate test 1 process 18 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 19 | 20 | 21 | class ProcessBuilder(BaseProcessBuilder): 22 | 23 | # ontology information 24 | _ontology_data = { 25 | 'label': 'Core Test Disc1 Scenario Process', 26 | 'description': '', 27 | 'category': '', 28 | 'version': '', 29 | } 30 | 31 | def get_builders(self): 32 | mods_dict = { 33 | 'Disc1': 'sostrades_core.sos_wrapping.test_discs.disc1_scenario.Disc1'} 34 | builder_list = self.create_builder_list( 35 | mods_dict, ns_dict={'ns_ac': self.ee.study_name, 'ns_data_ac': self.ee.study_name}) 36 | return builder_list 37 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_tornado_analysis_sellar/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | "label": "Core Test Disc1 Tornado Chart", 23 | "description": "", 24 | "category": "", 25 | "version": "", 26 | } 27 | 28 | def get_builders(self): 29 | repo = 'sostrades_core.sos_processes.test' 30 | sub_proc = 'test_sellar_coupling' 31 | sellar_coupling = self.ee.factory.get_builder_from_process( 32 | repo=repo, mod_id=sub_proc) 33 | eval_builder = self.ee.factory.create_mono_instance_driver("Eval", sellar_coupling) 34 | 35 | return eval_builder 36 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sample_generator_sellar_simple/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | 'label': 'Core Test Sellar Multi instance Driver Subprocess With Sample Generator', 23 | 'description': '', 24 | 'category': '', 25 | 'version': '', 26 | } 27 | 28 | def get_builders(self): 29 | '''Default initialisation test''' 30 | repo = 'sostrades_core.sos_processes.test.tests_driver_eval.multi' 31 | sub_proc = 'test_multi_driver_sellar' 32 | eval_driver = self.ee.factory.get_builder_from_process( 33 | repo=repo, mod_id=sub_proc) 34 | 35 | return eval_driver 36 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_two_ns_db/usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2025/02/18-2025/02/18 Copyright 2025 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | import time 18 | 19 | from sostrades_core.study_manager.study_manager import StudyManager 20 | 21 | 22 | class Study(StudyManager): 23 | 24 | def __init__(self, execution_engine=None) -> None: 25 | super().__init__(__file__, execution_engine=execution_engine) 26 | 27 | def setup_usecase(self): 28 | 29 | dict_values = { 30 | 'usecase.x': 3, 31 | 'usecase.a': 1, 32 | 'usecase.Disc1.b': 5, 33 | } 34 | return dict_values 35 | 36 | 37 | if '__main__' == __name__: 38 | start = time.time() 39 | uc_cls = Study() 40 | uc_cls.load_data() 41 | uc_cls.run(for_test=True) 42 | stop = time.time() 43 | print(stop - start) 44 | -------------------------------------------------------------------------------- /LICENSES/BSD-3-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | -------------------------------------------------------------------------------- /ruff.toml: -------------------------------------------------------------------------------- 1 | line-length = 120 2 | extend-exclude = [ 3 | "sostrades_core/sos_processes/test/test_script_gemseo/plot_gemseo_in_10_minutes.py", 4 | "sostrades_core/sos_processes/test/test_script_gemseo_mda/plot_newtonraphson_sobieski.py"] 5 | 6 | 7 | [lint] 8 | select = ["I", "TCH", "PLC", "PLE", "F", "E", "W", "PERF", "PLW", "D", "FA"] 9 | # extend-select = ["ALL"] 10 | 11 | ignore = [ 12 | # Exceptions 13 | "E501", # Line too long 14 | "E722", # Do not use bare `except` 15 | "F841", # F841 Local variable `xxx` is assigned to but never used 16 | "D104", # Missing docstring in public package 17 | "D105", # Missing docstring in magic method 18 | "D205", # 1 blank line required between summary line and description 19 | "D212", # [*] Multi-line docstring summary should start at the first line 20 | "D300", # [*] Use triple double quotes `"""` 21 | "D400", # First line should end with a period 22 | "D401", # First line of docstring should be in imperative mood: 23 | "D404", # First word of the docstring should not be "This" 24 | "D415", # First line should end with a period, question mark, or exclamation point 25 | "PERF203", # `try`-`except` within a loop incurs performance overhead 26 | "PLC0206", # Ignore dict iteration without .items() 27 | # WIP rules. To remove at some point 28 | "D101", # Missing docstring in public class 29 | "D102", # Missing docstring in public method 30 | "D107", # Missing docstring in `__init__` 31 | ] 32 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_couplingdefault/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/07/24 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | # -- Generate test 2 process 18 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 19 | 20 | 21 | class ProcessBuilder(BaseProcessBuilder): 22 | 23 | # ontology information 24 | _ontology_data = { 25 | 'label': 'Core Test Disc1 Disc2 Coupling Default Process', 26 | 'description': '', 27 | 'category': '', 28 | 'version': '', 29 | } 30 | 31 | def get_builders(self): 32 | disc_dir = 'sostrades_core.sos_wrapping.test_discs.' 33 | mods_dict = {'Disc2': disc_dir + 'disc2.Disc2', 34 | 'Disc1': disc_dir + 'disc1default.Disc1'} 35 | builder_list = self.create_builder_list( 36 | mods_dict, ns_dict={'ns_ac': self.ee.study_name}) 37 | return builder_list 38 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc_charts/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | # -- Generate test disc charts process 17 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 18 | 19 | 20 | class ProcessBuilder(BaseProcessBuilder): 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'Core Test Disc Charts Process', 24 | 'description': 'Process for testing map-based post-processing capabilities in SOSTrades core', 25 | 'category': 'Test', 26 | 'version': '1.0', 27 | } 28 | 29 | def get_builders(self): 30 | mod_path = 'sostrades_core.sos_wrapping.test_discs.disc_map_charts.DiscMapCharts' 31 | disc_name = 'DiscMapCharts' 32 | builder_list = self.create_builder_list({disc_name: mod_path}, 33 | ns_dict={'ns_test': f'{self.ee.study_name}.{disc_name}'}) 34 | 35 | return builder_list 36 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/test_discs/simple_disc.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/05/16 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | from sostrades_core.execution_engine.sos_wrapp import SoSWrapp 18 | 19 | 20 | class SimpleDisc(SoSWrapp): 21 | """Discipline used in Driver coupling of simple discipline output with driver subprocess input.""" 22 | 23 | _maturity = 'Fake' 24 | DESC_IN = {'z_in': {'type': 'array', 'namespace': 'ns_z'}} 25 | 26 | DESC_OUT = {'z': {'type': 'array', 'namespace': 'ns_z'}} 27 | 28 | def run(self): 29 | """Discipline 1 execution""" 30 | z_in = self.get_sosdisc_inputs(['z_in']) 31 | z = self.compute_z(z_in) 32 | z_out = {'z': z} 33 | self.store_sos_outputs_values(z_out) 34 | 35 | @staticmethod 36 | def compute_z(z): 37 | """Computes the output of the simple discipline in array form""" 38 | out = z * pow(2, -1) 39 | return out 40 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "sostrades-core" 3 | version = "0.1.2" 4 | description = "Add your description here" 5 | readme = "README.md" 6 | license-files = ["LICENSE"] 7 | authors = [ 8 | { name = "Airbus, Capgemini", email = "" } 9 | ] 10 | requires-python = ">=3.12" 11 | dependencies = [ 12 | "black==25.1.0", 13 | "chaospy==4.3.18", 14 | "cma==4.2.0", 15 | "cvxpy==1.6.6", 16 | "db-dtypes==1.2.0", 17 | "gemseo[all]==6.1.0", 18 | "gitpython==3.1.44", 19 | "matplotlib==3.9.2", 20 | "numpoly==1.2.14", 21 | "numpy==1.26.4", 22 | "openturns==1.24", 23 | "pandas==2.2.2", 24 | "plotly==5.24.0", 25 | "pyarrow==20.0.0", 26 | "pycryptodome==3.23.0", 27 | "pytest==8.1.2", 28 | "pytest-cov==6.2.0", 29 | "pytest-durations==1.5.2", 30 | "pytest-xdist==3.7.0", 31 | "pyyaml==6.0.2", 32 | "ruff==0.11.13", 33 | "scipy==1.13.0", 34 | "six==1.17.0", 35 | "sympy==1.13.2", 36 | "tqdm==4.66.5", 37 | ] 38 | 39 | [build-system] 40 | requires = ["uv-build>=0.8.0,<0.9"] 41 | build-backend = "uv_build" 42 | 43 | [project.urls] 44 | Homepage = "https://github.com/os-climate/sostrades-core" 45 | 46 | [tool.uv.build-backend] 47 | module-name = "sostrades_core" 48 | module-root = "" 49 | 50 | [[tool.uv.index]] 51 | name = "testpypi" 52 | url = "https://test.pypi.org/simple/" 53 | publish-url = "https://test.pypi.org/legacy/" 54 | explicit = true 55 | 56 | [tool.uv] 57 | extra-index-url = ["https://test.pypi.org/simple/"] 58 | index-strategy = "unsafe-best-match" 59 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_float_coupling/usecase_coupling_2_disc_test.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.study_manager.study_manager import StudyManager 17 | 18 | 19 | class Study(StudyManager): 20 | 21 | def __init__(self, execution_engine=None) -> None: 22 | super().__init__(__file__, execution_engine=execution_engine) 23 | 24 | def setup_usecase(self): 25 | setup_data_list = [] 26 | # private values AC model 27 | private_values = { 28 | self.study_name + '.x': 10., 29 | self.study_name + '.a': 5, 30 | self.study_name + '.Disc1.b': 25., 31 | self.study_name + '.y': 25., 32 | self.study_name + '.Disc2.indicator': 12.} 33 | setup_data_list.append(private_values) 34 | return setup_data_list 35 | 36 | 37 | if '__main__' == __name__: 38 | uc_cls = Study() 39 | uc_cls.load_data() 40 | uc_cls.run() 41 | -------------------------------------------------------------------------------- /sostrades_core/tests/l1s_test_all_usecases.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/06/23-2024/05/16 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | import pprint 18 | import unittest 19 | 20 | from sostrades_core.sos_processes.script_test_all_usecases import _test_all_usecases 21 | 22 | 23 | class TestUseCases(unittest.TestCase): 24 | """Usecases test class""" 25 | 26 | def setUp(self): 27 | '''Initialize third data needed for testing''' 28 | self.pp = pprint.PrettyPrinter(indent=4, compact=True) 29 | self.processes_repo = 'sostrades_core.sos_processes' 30 | self.maxDiff = None 31 | 32 | def test_all_usecases(self): 33 | test_passed, output_error = _test_all_usecases(processes_repo=self.processes_repo) 34 | 35 | if not test_passed: 36 | raise Exception(f'{output_error}') 37 | 38 | 39 | if __name__ == '__main__': 40 | test = TestUseCases() 41 | test.setUp() 42 | test.test_all_usecases() 43 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/optim_manager_disc.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | import logging 17 | import warnings 18 | 19 | from sostrades_core.execution_engine.sos_wrapp import SoSWrapp 20 | 21 | warnings.simplefilter(action='ignore', category=FutureWarning) 22 | 23 | 24 | class OptimManagerDisc(SoSWrapp): 25 | """Constraints aggregation discipline""" 26 | 27 | # ontology information 28 | _ontology_data = { 29 | 'label': 'Optim Function Manager', 30 | 'type': 'Research', 31 | 'source': 'SoSTrades Project', 32 | 'validated': '', 33 | 'validated_by': 'SoSTrades Project', 34 | 'last_modification_date': '', 35 | 'category': '', 36 | 'definition': '', 37 | 'icon': 'fas fa-chart-line fa-fw', 38 | 'version': '', 39 | } 40 | 41 | def __init__(self, sos_name, logger: logging.Logger) -> None: 42 | '''Constructor''' 43 | super().__init__(sos_name=sos_name, logger=logger) 44 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/test_discs/disc_self_coupled.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.execution_engine.sos_wrapp import SoSWrapp 17 | 18 | 19 | class SelfCoupledDiscipline(SoSWrapp): 20 | 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'sostrades_core.sos_wrapping.test_discs.disc_self_coupled', 24 | 'type': '', 25 | 'source': '', 26 | 'validated': '', 27 | 'validated_by': '', 28 | 'last_modification_date': '', 29 | 'category': '', 30 | 'definition': '', 31 | 'icon': '', 32 | 'version': '', 33 | } 34 | _maturity = 'Fake' 35 | 36 | DESC_IN = { 37 | 'x': {'type': 'float', 'default': 1} 38 | } 39 | DESC_OUT = { 40 | 'x': {'type': 'float'} 41 | 42 | } 43 | 44 | def run(self): 45 | x = self.get_sosdisc_inputs('x') 46 | 47 | dict_values = {'x': x / 2} 48 | 49 | self.store_sos_outputs_values(dict_values) 50 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_uncertainty_quantification_with_arrays/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | # -- Generate test 1 process 17 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 18 | 19 | 20 | class ProcessBuilder(BaseProcessBuilder): 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'sos_trades_core.sos_processes.test.test_uncertainty_quantification', 24 | 'description': '', 25 | 'category': '', 26 | 'version': '', 27 | } 28 | 29 | def get_builders(self): 30 | uq_name = 'UncertaintyQuantification' 31 | ns_value = f'{self.ee.study_name}.{uq_name}' 32 | ns_dict = {'ns_sample_generator': ns_value, 33 | 'ns_evaluator': ns_value, 34 | 'ns_uncertainty_quantification': ns_value} 35 | self.ee.ns_manager.add_ns_def(ns_dict) 36 | 37 | builder = self.ee.factory.add_uq_builder(uq_name) 38 | 39 | return [builder] 40 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sample_generator_subprocess_1_3/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/10-2024/01/18 Copyright 2024 Capgemini 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | ''' 17 | # mode: python; py-indent-offset: 4; tab-width: 8; coding:utf-8 18 | # -- Generate test 1 process 19 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 20 | 21 | 22 | class ProcessBuilder(BaseProcessBuilder): 23 | # ontology information 24 | _ontology_data = { 25 | 'label': 'Test Disc1 Disc3 Multi Instance Driver With Sample Generator', 26 | 'description': '', 27 | 'category': '', 28 | 'version': '', 29 | } 30 | 31 | def get_builders(self): 32 | repo = 'sostrades_core.sos_processes.test.tests_driver_eval.multi' 33 | sub_proc = 'test_multi_driver_subprocess_1_3' 34 | eval_driver = self.ee.factory.get_builder_from_process( 35 | repo=repo, mod_id=sub_proc) 36 | 37 | return eval_driver 38 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_simple/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/10-2024/05/16 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 18 | 19 | 20 | class ProcessBuilder(BaseProcessBuilder): 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'Core Test Disc1 Mono instance Eval', 24 | 'description': '', 25 | 'category': '', 26 | 'version': '', 27 | } 28 | 29 | def get_builders(self): 30 | disc_dir = 'sostrades_core.sos_wrapping.test_discs.' 31 | mods_dict = {'Disc1': disc_dir + 'disc1.Disc1'} 32 | builder_list = self.create_builder_list( 33 | mods_dict, 34 | ns_dict={'ns_ac': self.ee.study_name} 35 | ) 36 | 37 | eval_builder = self.ee.factory.create_mono_instance_driver( 38 | 'Eval', builder_list 39 | ) 40 | 41 | return eval_builder 42 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sample_generator_sellar_coupling/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | 'label': 'Core Test Sellar Coupling Multi instance Driver With Sample Generator', 23 | 'description': '', 24 | 'category': '', 25 | 'version': '', 26 | } 27 | 28 | def get_builders(self): 29 | '''Default initialisation test''' 30 | # Select the nested subprocess 31 | repo = 'sostrades_core.sos_processes.test.sellar' 32 | sub_proc = 'test_sellar_coupling' 33 | coupling_builder = self.ee.factory.get_builder_from_process( 34 | repo=repo, mod_id=sub_proc) 35 | 36 | eval_driver = self.ee.factory.create_multi_instance_driver('Eval', coupling_builder) 37 | 38 | return eval_driver 39 | -------------------------------------------------------------------------------- /sostrades_core/auto_complete_headers.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | import json 17 | 18 | from sostrades_core.tools.check_headers import HeaderTools 19 | 20 | 21 | def main() -> None: 22 | """Main function to read the headers_ignore_config.json file and write headers if needed in the repository.""" 23 | try: 24 | with open("./headers_ignore_config.json", "r", encoding="utf-8") as f: 25 | headers_ignore_config = json.load(f) 26 | ht = HeaderTools() 27 | ht.set_verbose_mode(False) 28 | ht.write_headers_if_needed_in_repo( 29 | headers_ignore_config["extension_to_ignore"], 30 | headers_ignore_config["files_to_ignore"], 31 | headers_ignore_config["airbus_rev_commit"], 32 | ".", 33 | ) 34 | except FileNotFoundError as ex: 35 | print("headers_ignore_config.json must be available where this command is launched") 36 | raise ex 37 | 38 | 39 | if __name__ == "__main__": 40 | main() 41 | -------------------------------------------------------------------------------- /sostrades_core/tools/scenario/scenario_manager.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/05/16 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | 18 | from sostrades_core.tools.scenario.scenario import Scenario 19 | 20 | """ 21 | mode: python; py-indent-offset: 4; tab-width: 4; coding: utf-8 22 | """ 23 | 24 | 25 | class ScenarioManager: 26 | """Class to manage all scenarios""" 27 | 28 | def __init__(self, name) -> None: 29 | """Constructor""" 30 | self.name = name 31 | self.list_scenarios_ids = [] 32 | self.list_scenarios = [] 33 | 34 | def add_scenario(self, name): 35 | """Add new scenario""" 36 | new_scenario = Scenario(name, scenario_manager=self) 37 | self.list_scenarios.append(new_scenario) 38 | self.list_scenarios_ids.append(new_scenario.name) 39 | return new_scenario 40 | 41 | def get_scenario(self, name): 42 | """Get scenario from name""" 43 | index = self.list_scenarios_ids.index(name) 44 | return self.list_scenarios[index] 45 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_residual_variables/usecase_test_residual_variables.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.study_manager.study_manager import StudyManager 17 | 18 | 19 | class Study(StudyManager): 20 | 21 | def __init__(self, execution_engine=None) -> None: 22 | super().__init__(__file__, execution_engine=execution_engine) 23 | 24 | def setup_usecase(self): 25 | setup_data_list = [] 26 | # private values AC model 27 | private_values = { 28 | self.study_name + '.Disc1Residuals.residual_variables': {'r1': 'w1'}, 29 | self.study_name + '.Disc1Residuals.run_solves_residuals': True, 30 | self.study_name + '.Disc2Residuals.residual_variables': {'r2': 'w2'}, 31 | self.study_name + '.Disc2Residuals.run_solves_residuals': True} 32 | setup_data_list.append(private_values) 33 | return setup_data_list 34 | 35 | 36 | if '__main__' == __name__: 37 | uc_cls = Study() 38 | uc_cls.load_data() 39 | uc_cls.run() 40 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_uncertainty_analysis/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | 17 | from __future__ import annotations 18 | 19 | from typing import ClassVar 20 | 21 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 22 | 23 | 24 | class ProcessBuilder(BaseProcessBuilder): # noqa: D101 25 | # Ontology information 26 | _ontology_data: ClassVar[dict[str, str]] = { 27 | "label": "Core test Sellar Monte Carlo sampling.", 28 | "description": "", 29 | "category": "", 30 | "version": "", 31 | } 32 | 33 | def get_builders(self): # noqa: D102 34 | # Create the post-treatment discipline 35 | post_disc = "sostrades_core.sos_wrapping.analysis_discs.uncertainty_analysis.UncertaintyAnalysis" 36 | mods_dict = {"MC post": post_disc} 37 | return self.create_builder_list( 38 | mods_dict, 39 | ns_dict={ 40 | "ns_driver_MC": f"{self.ee.study_name}.Eval_MC", 41 | }, 42 | ) 43 | -------------------------------------------------------------------------------- /sostrades_core/execution_engine/gemseo_addon/grammars/sos_simple_grammar.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/05/12-2024/05/16 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | 18 | import logging 19 | from typing import ClassVar 20 | 21 | from gemseo.core.grammars.simpler_grammar import SimplerGrammar 22 | 23 | """Most basic grammar implementation.""" 24 | 25 | LOGGER = logging.getLogger("gemseo.addons.grammars.sos_simple_grammar") 26 | 27 | 28 | class SoSSimpleGrammar(SimplerGrammar): 29 | """ 30 | Store the names and types of the elements as Python lists. 31 | 32 | Attributes: 33 | data_names (List[str]): The names of the elements. 34 | data_types (List[type]): The types of the elements, 35 | stored in the same order as ``data_names``. 36 | 37 | """ 38 | 39 | DATA_CONVERTER_CLASS: ClassVar[str] = "SoSTradesDataConverter" 40 | 41 | def update_defaults(self, defaults: dict): 42 | self._defaults.update({ 43 | k: v for k, v in defaults.items() if k in self.names 44 | }) 45 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/b4pm-devops/sostrades-pre-commit.git 3 | rev: v1.1.2 4 | hooks: 5 | - id: update-headers 6 | - repo: https://github.com/astral-sh/ruff-pre-commit 7 | rev: v0.6.8 8 | hooks: 9 | - id: ruff 10 | args: [ 11 | --fix, 12 | --exit-non-zero-on-fix, 13 | --config=ruff.toml, 14 | ] 15 | - repo: https://github.com/pre-commit/pre-commit-hooks 16 | rev: v4.5.0 17 | hooks: 18 | - id: trailing-whitespace 19 | - id: end-of-file-fixer 20 | exclude: LICENSES/headers 21 | - id: check-yaml 22 | # !reference is specific to gitlab 23 | # !! prefix is specific to mkdocs 24 | exclude: \.gitlab-ci.yml|mkdocs.yml 25 | - id: check-added-large-files 26 | - id: check-json 27 | - id: pretty-format-json 28 | args: [ 29 | --autofix, 30 | --no-sort-keys, 31 | ] 32 | exclude: \.ipynb 33 | - id: check-toml 34 | - id: destroyed-symlinks 35 | - id: check-symlinks 36 | - repo: https://github.com/pre-commit/pygrep-hooks 37 | rev: v1.10.0 38 | hooks: 39 | - id: rst-backticks 40 | - id: rst-directive-colons 41 | - id: rst-inline-touching-normal 42 | - repo: https://github.com/kynan/nbstripout 43 | rev: 0.7.1 44 | hooks: 45 | - id: nbstripout 46 | - repo: https://github.com/igorshubovych/markdownlint-cli 47 | rev: v0.39.0 48 | hooks: 49 | - id: markdownlint 50 | args: [ 51 | --fix, 52 | --disable, 53 | MD024, 54 | ] 55 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_grid_search/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | # -- Generate test 1 process 17 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 18 | 19 | 20 | class ProcessBuilder(BaseProcessBuilder): 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'Core Test Mono Driver Eval Grid Search', 24 | 'description': '', 25 | 'category': '', 26 | 'version': '', 27 | } 28 | 29 | def get_builders(self): 30 | mod1_path = 'sostrades_core.sos_wrapping.test_discs.disc1_grid.Disc1' 31 | grid_search = 'GridSearch' 32 | 33 | disc1_builder = self.ee.factory.get_builder_from_module( 34 | 'Disc1', mod1_path) 35 | 36 | self.ee.ns_manager.add_ns('ns_test', f'{self.ee.study_name}.Eval.Disc1') 37 | 38 | # evaluator builder 39 | eval_builder = self.ee.factory.create_mono_instance_driver( 40 | 'Eval', [disc1_builder]) 41 | 42 | return eval_builder 43 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_sellar_coupling/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | 'label': 'Core Test Sellar Coupling Mono instance Eval with Sample Generator', 23 | 'description': '', 24 | 'category': '', 25 | 'version': '', 26 | } 27 | 28 | def get_builders(self): 29 | '''Default initialisation test''' 30 | # Select the nested subprocess 31 | repo = 'sostrades_core.sos_processes.test.sellar' 32 | sub_proc = 'test_sellar_coupling' 33 | coupling_builder = self.ee.factory.get_builder_from_process( 34 | repo=repo, mod_id=sub_proc) 35 | 36 | # driver builder 37 | eval_driver = self.ee.factory.create_mono_instance_driver( 38 | 'Eval', coupling_builder) 39 | 40 | return eval_driver 41 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/10-2023/11/03 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | # -- Generate test 2 process 18 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 19 | 20 | 21 | class ProcessBuilder(BaseProcessBuilder): 22 | 23 | # ontology information 24 | _ontology_data = { 25 | 'label': 'Core Test Multi Instance Driver Process Disc1 Disc2 Coupling', 26 | 'description': '', 27 | 'category': '', 28 | 'version': '', 29 | } 30 | 31 | def get_builders(self): 32 | 33 | # instantiate factory by getting builder from process 34 | cls_list = self.ee.factory.get_builder_from_process(repo='sostrades_core.sos_processes.test', 35 | mod_id='test_disc1_disc2_coupling') 36 | 37 | multi_scenarios = self.ee.factory.create_multi_instance_driver('multi_scenarios', cls_list) 38 | 39 | return multi_scenarios 40 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_sample_generator/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/13-2024/05/16 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | from sostrades_core.execution_engine.proxy_sample_generator import ProxySampleGenerator 18 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 19 | 20 | """ 21 | mode: python; py-indent-offset: 4; tab-width: 4; coding: utf-8 22 | Generate a doe scenario 23 | """ 24 | 25 | 26 | class ProcessBuilder(BaseProcessBuilder): 27 | # ontology information 28 | _ontology_data = { 29 | 'label': 'Core Test Sample Generator', 30 | 'description': '', 31 | 'category': '', 32 | 'version': '', 33 | } 34 | 35 | def get_builders(self): 36 | '''Default initialisation test''' 37 | builder = self.ee.factory.create_sample_generator('SampleGenerator') 38 | 39 | self.ee.ns_manager.add_ns_def( 40 | {ProxySampleGenerator.NS_SAMPLING: f'{self.ee.study_name}.SampleGenerator'}, 41 | ) 42 | 43 | return builder 44 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_subprocess_1_3/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | ''' 15 | # -- Generate test 1 process 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | 'label': 'Test Disc1 Disc3 Coupling Mono Instance Eval with Sample Generator', 23 | 'description': '', 24 | 'category': '', 25 | 'version': '', 26 | } 27 | 28 | def get_builders(self): 29 | # Select the nested subprocess 30 | repo = 'sostrades_core.sos_processes.test.disc1_disc3' 31 | sub_proc = 'test_disc1_disc3_coupling' 32 | coupling_builder = self.ee.factory.get_builder_from_process( 33 | repo=repo, mod_id=sub_proc) 34 | 35 | # driver builder 36 | eval_driver = self.ee.factory.create_mono_instance_driver( 37 | 'Eval', coupling_builder 38 | ) 39 | 40 | return eval_driver 41 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_with_sample_option/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/10-2024/05/16 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | 18 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 19 | 20 | 21 | class ProcessBuilder(BaseProcessBuilder): 22 | # ontology information 23 | _ontology_data = { 24 | 'label': 'Core test Disc1 Disc2 Mono Instance Eval with sample generator Option', 25 | 'description': '', 26 | 'category': '', 27 | 'version': '', 28 | } 29 | 30 | def get_builders(self): 31 | disc_dir = 'sostrades_core.sos_wrapping.test_discs.' 32 | mods_dict = {'Disc2': disc_dir + 'disc2.Disc2', 33 | 'Disc1': disc_dir + 'disc1_doe_eval.Disc1'} 34 | builder_list = self.create_builder_list(mods_dict, ns_dict={'ns_ac': self.ee.study_name}) 35 | 36 | doe_eval_builder = self.ee.factory.create_mono_instance_driver('Eval', builder_list) 37 | 38 | return doe_eval_builder 39 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generato_coupling_dataframes/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2025 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | 'label': 'Core Test random problem Coupling Mono instance Eval with Sample Generator', 23 | 'description': '', 24 | 'category': '', 25 | 'version': '', 26 | } 27 | 28 | def get_builders(self): 29 | '''Default initialisation test''' 30 | # Select the nested subprocess 31 | repo = 'sostrades_core.sos_processes.test' 32 | sub_proc = 'test_problem_coupling_dataframes' 33 | coupling_builder = self.ee.factory.get_builder_from_process( 34 | repo=repo, mod_id=sub_proc) 35 | 36 | # driver builder 37 | eval_driver = self.ee.factory.create_mono_instance_driver( 38 | 'Eval', coupling_builder) 39 | 40 | return eval_driver 41 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_sellar_coupling_new_types/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2023 Capgemini 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | 'label': 'Core Test Sellar Coupling Mono instance Eval with Sample Generator', 23 | 'description': '', 24 | 'category': '', 25 | 'version': '', 26 | } 27 | 28 | def get_builders(self): 29 | '''Default initialisation test''' 30 | # Select the nested subprocess 31 | repo = 'sostrades_core.sos_processes.test' 32 | sub_proc = 'test_sellar_coupling_new_types' 33 | coupling_builder = self.ee.factory.get_builder_from_process( 34 | repo=repo, mod_id=sub_proc) 35 | 36 | # driver builder 37 | eval_driver = self.ee.factory.create_mono_instance_driver( 38 | 'Eval', coupling_builder) 39 | 40 | return eval_driver 41 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_same_discipline/usecase.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/05/16 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | from numpy import array 18 | 19 | from sostrades_core.study_manager.study_manager import StudyManager 20 | 21 | 22 | class Study(StudyManager): 23 | 24 | def __init__(self, execution_engine=None) -> None: 25 | super().__init__(__file__, execution_engine=execution_engine) 26 | 27 | def setup_usecase(self): 28 | ns = f'{self.study_name}' 29 | 30 | disc_dict = {} 31 | # Disciplines inputs 32 | disc_dict[f'{ns}.Disc7.h'] = array([8., 9.]) 33 | disc_dict[f'{ns}.Disc72.h'] = array([82., 92.]) 34 | 35 | return [disc_dict] 36 | 37 | 38 | if '__main__' == __name__: 39 | uc_cls = Study() 40 | uc_cls.load_data() 41 | uc_cls.execution_engine.display_treeview_nodes() 42 | # uc_cls.execution_engine.display_treeview_nodes(display_variables=True) 43 | uc_cls.run() 44 | # uc_cls.execution_engine.root_process.coupling_structure.graph.write_full_graph("here.pdf") 45 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_simple/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/10-2024/05/16 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | # -- Generate test 2 process 18 | 19 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 20 | 21 | 22 | class ProcessBuilder(BaseProcessBuilder): 23 | # ontology information 24 | _ontology_data = { 25 | 'label': 'Core Test Disc1 Mono Instance Eval with Sample Generator', 26 | 'description': '', 27 | 'category': '', 28 | 'version': '', 29 | } 30 | 31 | def get_builders(self): 32 | disc_dir = 'sostrades_core.sos_wrapping.test_discs.' 33 | mods_dict = {'Disc1': disc_dir + 'disc1.Disc1'} 34 | builder_list_sellar = self.create_builder_list( 35 | mods_dict, 36 | ns_dict={'ns_ac': self.ee.study_name}, 37 | ) 38 | eval_builder = self.ee.factory.create_mono_instance_driver( 39 | 'Eval', builder_list_sellar 40 | ) 41 | 42 | return eval_builder 43 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_disc2_samenamespace/usecase_coupling_samenamespace.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | 17 | from sostrades_core.study_manager.study_manager import StudyManager 18 | 19 | 20 | class Study(StudyManager): 21 | 22 | def __init__(self, execution_engine=None) -> None: 23 | super().__init__(__file__, execution_engine=execution_engine) 24 | 25 | def setup_usecase(self): 26 | setup_data_list = [] 27 | self.display_name = 'DiscSameNamespace' 28 | # private values AC model 29 | private_values = { 30 | self.study_name + '.' + self.display_name + '.x': 10., 31 | self.study_name + '.Disc1.a': 5., 32 | self.study_name + '.Disc1.b': 25431., 33 | self.study_name + '.y': 4., 34 | self.study_name + '.Disc2.constant': 3.1416, 35 | self.study_name + '.Disc2.power': 2} 36 | setup_data_list.append(private_values) 37 | return setup_data_list 38 | 39 | 40 | if '__main__' == __name__: 41 | uc_cls = Study() 42 | uc_cls.load_data() 43 | uc_cls.run() 44 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_tornado_analysis/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | "label": "Core Test Disc1 Tornado Chart", 23 | "description": "", 24 | "category": "", 25 | "version": "", 26 | } 27 | 28 | def get_builders(self): 29 | disc_dir = "sostrades_core.sos_wrapping.test_discs." 30 | mods_dict = {"Disc1": disc_dir + "disc1_array_output.Disc1ArrayOutput"} 31 | builder_list = self.create_builder_list( 32 | mods_dict, 33 | ns_dict={"ns_ac": self.ee.study_name}, 34 | ) 35 | coupling_builder = self.ee.factory.create_builder_coupling("Coupling") 36 | coupling_builder.set_builder_info("cls_builder", builder_list) 37 | eval_builder = self.ee.factory.create_mono_instance_driver("Eval", coupling_builder) 38 | 39 | return eval_builder 40 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sample_generator_simple/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/10-2024/05/16 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 18 | 19 | 20 | class ProcessBuilder(BaseProcessBuilder): 21 | 22 | # ontology information 23 | _ontology_data = { 24 | 'label': 'Test Multi Instance With Sample Generator (DriverEvaluator)', 25 | 'description': '', 26 | 'category': '', 27 | 'version': '', 28 | } 29 | 30 | def get_builders(self): 31 | # simple 2-disc process NOT USING nested scatters coupled with a SampleGenerator 32 | 33 | # multi scenario driver builder 34 | repo_name = "sostrades_core.sos_processes.test.tests_driver_eval.multi" 35 | proc_name = "test_multi_driver_simple" 36 | multi_scenarios = self.ee.factory.get_builder_from_process(repo=repo_name, 37 | mod_id=proc_name) 38 | 39 | return multi_scenarios 40 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc1_custom_driver/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2025/14/02 Copyright 2025 Capgemini 4 | 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | ''' 18 | # -- Generate test 2 process 19 | 20 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 21 | 22 | 23 | class ProcessBuilder(BaseProcessBuilder): 24 | # ontology information 25 | _ontology_data = { 26 | 'label': 'sostrades_core.sos_processes.test.test_disc1_custom_driver', 27 | 'description': '', 28 | 'category': '', 29 | 'version': '', 30 | } 31 | 32 | def get_builders(self): 33 | disc_dir = 'sostrades_core.sos_wrapping.test_discs.' 34 | mods_dict = {'Disc1': disc_dir + 'disc1.Disc1'} 35 | builder_list = self.create_builder_list(mods_dict, ns_dict={'ns_ac': self.ee.study_name}) 36 | 37 | driver_wrapper_mod = 'sostrades_core.sos_wrapping.test_discs.simple_custom_driver.SimpleCustomDriver' 38 | 39 | driver_builder = self.ee.factory.create_custom_driver_builder( 40 | 'Driver1', builder_list, driver_wrapper_mod) 41 | return driver_builder 42 | -------------------------------------------------------------------------------- /sostrades_core/sos_wrapping/fake_valueblock_discipline.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2025/02/18-2025/02/18 Copyright 2025 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | from sostrades_core.sos_wrapping.valueblock_discipline import ValueBlockDiscipline 18 | 19 | 20 | class FakeValueBlockDiscipline(ValueBlockDiscipline): 21 | """Fake value block discipline to test architecture builder functionalities""" 22 | 23 | # ontology information 24 | _ontology_data = { 25 | 'label': 'Fake Value Block Discipline', 26 | 'type': 'Research', 27 | 'source': 'SoSTrades Project', 28 | 'validated': '', 29 | 'validated_by': 'SoSTrades Project', 30 | 'last_modification_date': '', 31 | 'category': '', 32 | 'definition': '', 33 | 'icon': '', 34 | 'version': '', 35 | } 36 | _maturity = 'Research' 37 | 38 | DESC_OUT = {'output': {'type': 'dict'}} 39 | 40 | def run(self): 41 | 42 | self.store_sos_outputs_values({'output': {'out': [0, 1, 2], 43 | 'out2': [2, 3, 4], }}) 44 | -------------------------------------------------------------------------------- /sostrades_core/tests/l0_test_48_bspline.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/05/16-2024/06/28 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | import unittest 18 | 19 | import numpy as np 20 | from scipy.interpolate import BSpline as bspline_sp 21 | 22 | from sostrades_core.execution_engine.execution_engine import ExecutionEngine 23 | from sostrades_core.tools.bspline.bspline import BSpline 24 | 25 | 26 | class TestBSpline(unittest.TestCase): 27 | """Class to test BSpline tools""" 28 | 29 | def setUp(self): 30 | 31 | self.name = 'Test' 32 | self.ee = ExecutionEngine(self.name) 33 | 34 | def test_01_execute(self): 35 | bsp = BSpline(degree=3, n_poles=8) 36 | ctrl = np.array([-0.1, -0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.7]) 37 | bsp.set_ctrl_pts(ctrl) 38 | x = np.linspace(0.0, 1.0, 80) 39 | 40 | eval1, _ = bsp.eval_list_t(x) 41 | 42 | bsp_scipy = bspline_sp(bsp.knots, ctrl, 3) 43 | result_scipy = [ 44 | float(bsp_scipy(elem)) 45 | for elem in x 46 | ] 47 | np.testing.assert_almost_equal(eval1.tolist(), result_scipy) 48 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/test_disc10_dynamic/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2024/07/24 Copyright 2024 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | # -- Generate test 1 process 18 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 19 | 20 | 21 | class ProcessBuilder(BaseProcessBuilder): 22 | 23 | # ontology information 24 | _ontology_data = { 25 | 'label': 'Process: Disc10 Discipline with dynamic inputs', 26 | 'description': 'Process to Instantiate a Disc10 Discipline with dynamic inputs', 27 | 'category': '', 28 | 'version': '', 29 | } 30 | 31 | def get_builders(self): 32 | mod_path = 'sostrades_core.sos_wrapping.test_discs.disc10_dynamic.Disc10' 33 | disc_name = 'Disc10' 34 | disc_builder = self.ee.factory.get_builder_from_module( 35 | disc_name, mod_path) 36 | builder_list = [disc_builder] 37 | ns_dict = { 38 | 'ns_ac': f'{self.ee.study_name}.Disc10', 39 | 'ns_b': f'{self.ee.study_name}.Disc10'} 40 | self.ee.ns_manager.add_ns_def(ns_dict) 41 | return builder_list 42 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_group/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/10-2023/11/03 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | # mode: python; py-indent-offset: 4; tab-width: 8; coding:utf-8 18 | # -- Generate test 2 process 19 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 20 | 21 | 22 | class ProcessBuilder(BaseProcessBuilder): 23 | # ontology information 24 | _ontology_data = { 25 | 'label': 'Core Test Multi Instance Driver Group Scenarios Under Discipline Option', 26 | 'description': '', 27 | 'category': '', 28 | 'version': '', 29 | } 30 | 31 | def get_builders(self): 32 | # instantiate factory by getting builder from process 33 | cls_list = self.ee.factory.get_builder_from_process(repo='sostrades_core.sos_processes.test', 34 | mod_id='test_disc1_disc2_coupling') 35 | 36 | multi_scenarios = self.ee.factory.create_multi_instance_driver( 37 | 'multi_actors', cls_list) 38 | 39 | return multi_scenarios 40 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/multi/test_multi_driver_sellar/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2022 Airbus SAS 3 | Modifications on 2023/10/10-2024/05/16 Copyright 2023 Capgemini 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | ''' 17 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 18 | 19 | 20 | class ProcessBuilder(BaseProcessBuilder): 21 | # ontology information 22 | _ontology_data = { 23 | 'label': 'Core Test Sellar Multi Instance Eval simple', 24 | 'description': '', 25 | 'category': '', 26 | 'version': '', 27 | } 28 | 29 | def get_builders(self): 30 | '''Default initialisation test''' 31 | # Select the nested subprocess 32 | repo = 'sostrades_core.sos_processes.test.sellar' 33 | sub_proc = 'test_sellar_list' 34 | coupling_builder = self.ee.factory.get_builder_from_process( 35 | repo=repo, mod_id=sub_proc) 36 | 37 | # driver builder 38 | eval_driver = self.ee.factory.create_multi_instance_driver('Eval', coupling_builder) 39 | 40 | # shift nested subprocess namespaces 41 | # no need to shift 42 | 43 | return eval_driver 44 | -------------------------------------------------------------------------------- /sostrades_core/sos_processes/test/tests_driver_eval/mono/test_mono_driver_sample_generator_tornado_analysis_df_outputs/process.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Copyright 2024 Capgemini 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | ''' 16 | from sostrades_core.sos_processes.base_process_builder import BaseProcessBuilder 17 | 18 | 19 | class ProcessBuilder(BaseProcessBuilder): 20 | # ontology information 21 | _ontology_data = { 22 | "label": "Core Test Disc1 Tornado Chart", 23 | "description": "", 24 | "category": "", 25 | "version": "", 26 | } 27 | 28 | def get_builders(self): 29 | disc_dir = "sostrades_core.sos_wrapping.test_discs." 30 | mods_dict = {"DiscAllTypes": disc_dir + "disc_all_types.DiscAllTypes"} 31 | builder_list = self.create_builder_list( 32 | mods_dict, 33 | ns_dict={"ns_test": f'{self.ee.study_name}.Coupling.DiscAllTypes'}, 34 | ) 35 | coupling_builder = self.ee.factory.create_builder_coupling("Coupling") 36 | coupling_builder.set_builder_info("cls_builder", builder_list) 37 | eval_builder = self.ee.factory.create_mono_instance_driver("Eval", coupling_builder) 38 | 39 | return eval_builder 40 | --------------------------------------------------------------------------------