force-h2020 / force-bdss

Business Decision System general interface
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

DEV: Refactor propagation of BaseDriverEvents #269

Closed flongford closed 4 years ago

flongford commented 4 years ago

This PR approaches #247 and closes #239

Summary

Instead of just listening to BaseDriverEvent types propagated through BaseMCO subclasses, the OptimizationOperation now also listens to events propagated through the Workflow class. In doing so, we include new event attributes and notify methods on the BaseModel, ExecutionLayer Workflow classes.

We aim to remove the ability for events to propagate through the BaseMCO class in the future, but to ensure backwards compatibility for now, a deprecation warnings is raised if the BaseMCO.verify method is called.

This PR also includes refactoring to the broadcasting of MCO*Event classes, introduced in #270

codecov-io commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@c9a39e2). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #269   +/-   ##
=========================================
  Coverage          ?   96.95%           
=========================================
  Files             ?       54           
  Lines             ?     1511           
  Branches          ?      144           
=========================================
  Hits              ?     1465           
  Misses            ?       42           
  Partials          ?        4
Impacted Files Coverage Δ
force_bdss/core/execution_layer.py 100% <ø> (ø)
force_bdss/mco/base_mco_model.py 100% <100%> (ø)
force_bdss/core/workflow.py 100% <100%> (ø)
force_bdss/app/optimize_operation.py 100% <100%> (ø)
force_bdss/mco/base_mco.py 100% <100%> (ø)

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 c9a39e2...36f3539. Read the comment docs.