Introduced data value object
Created by: stefanoborini
Replaced previous system of Result and Parameter objects for MCO, DataSource and KPICalculator with a set of DataValue objects that contain all the relevant information for a specific entity created by the MCO/DS/KPI
Merge request reports
Activity
Created by: codecov-io
Codecov Report
Merging #68 into master will increase coverage by
3.48%
. The diff coverage is91.17%
.@@ Coverage Diff @@ ## master #68 +/- ## ========================================== + Coverage 90.88% 94.36% +3.48% ========================================== Files 48 46 -2 Lines 658 639 -19 Branches 40 45 +5 ========================================== + Hits 598 603 +5 + Misses 53 33 -20 + Partials 7 3 -4
Impacted Files Coverage Δ force_bdss/data_sources/base_data_source.py 100% <ø> (ø)
force_bdss/mco/base_mco_communicator.py 100% <ø> (ø)
force_bdss/kpi/base_kpi_calculator.py 100% <ø> (ø)
force_bdss/api.py 100% <100%> (ø)
force_bdss/core/data_value.py 100% <100%> (ø)
...re_plugins/dummy/kpi_adder/kpi_adder_calculator.py 100% <100%> (+61.53%)
force_bdss/core_evaluation_driver.py 90% <100%> (ø)
...dummy/dummy_kpi_calculator/dummy_kpi_calculator.py 100% <100%> (+33.33%)
..._plugins/dummy/dummy_dakota/dakota_communicator.py 100% <100%> (+15.38%)
...ugins/dummy/dummy_data_source/dummy_data_source.py 75% <50%> (+15%)
... and 4 more
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update be9184f...72da5a0. Read the comment docs.34 parameters = mco_communicator.receive_from_mco(mco_model) 34 mco_data_values = mco_communicator.receive_from_mco(mco_model) 35 35 36 36 ds_results = [] 37 37 for ds_model in workflow.data_sources: 38 38 ds_bundle = ds_model.bundle 39 39 data_source = ds_bundle.create_data_source() 40 ds_results.append(data_source.run(ds_model, parameters)) 40 ds_results.extend(data_source.run(ds_model, mco_data_values)) 41 41 42 42 kpi_results = [] 43 43 for kpic_model in workflow.kpi_calculators: 44 44 kpic_bundle = kpic_model.bundle 45 45 kpi_calculator = kpic_bundle.create_kpi_calculator() 46 kpi_results.append(kpi_calculator.run(kpic_model, ds_results)) 46 kpi_results.extend(kpi_calculator.run(kpic_model, ds_results)) 1 from traits.api import HasStrictTraits, Any, String, Enum 2 3 4 class DataValue(HasStrictTraits): Created by: stefanoborini
I thought about it, we used to have originator, but I start to believe it's not useful. we can reintroduce it at a later stage with no fuss, because the setting will be done by the core anyway, so plugin authors don't have to do that manually, and nothing will change for them.
34 parameters = mco_communicator.receive_from_mco(mco_model) 34 mco_data_values = mco_communicator.receive_from_mco(mco_model) 35 35 36 36 ds_results = [] 37 37 for ds_model in workflow.data_sources: 38 38 ds_bundle = ds_model.bundle 39 39 data_source = ds_bundle.create_data_source() 40 ds_results.append(data_source.run(ds_model, parameters)) 40 ds_results.extend(data_source.run(ds_model, mco_data_values)) 41 41 42 42 kpi_results = [] 43 43 for kpic_model in workflow.kpi_calculators: 44 44 kpic_bundle = kpic_model.bundle 45 45 kpi_calculator = kpic_bundle.create_kpi_calculator() 46 kpi_results.append(kpi_calculator.run(kpic_model, ds_results)) 46 kpi_results.extend(kpi_calculator.run(kpic_model, ds_results)) 1 from traits.api import HasStrictTraits, Any, String, Enum 2 3 4 class DataValue(HasStrictTraits): 1 from traits.api import HasStrictTraits, Any, String, Enum 2 3 4 class DataValue(HasStrictTraits):