HEPCloud / decisionengine

HEPCloud Decision Engine framework
Apache License 2.0
6 stars 26 forks source link

Unconditionally execute publishers with default configured logic engine #514

Closed knoepfel closed 3 years ago

knoepfel commented 3 years ago

To simplify user configurations, this PR enables the unconditional execution of publishers whenever no logicengines block has been specified. The following configuration:

{
  sources: {...},
  transforms: {...},
  logicengines: {
    logicengine1: {
      module: "decisionengine.framework.logicengine.LogicEngine",
      parameters: {
        facts: {}
        rules: {
          r1: {
            expression: "True",
            actions: ["pub1", "pub2"]
          }
        }
      }
    }
  },
  publishers: {
    pub1: {...},
    pub2: {...}
  }
}

can be replaced with:

{
  sources: {...},
  transforms: {...},
  publishers: {
    pub1: {...},
    pub2: {...}
  }
}
codecov[bot] commented 3 years ago

Codecov Report

Merging #514 (677f68b) into master (a6a81ce) will decrease coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #514      +/-   ##
==========================================
- Coverage   93.86%   93.84%   -0.02%     
==========================================
  Files          44       44              
  Lines        2754     2764      +10     
  Branches      391      394       +3     
==========================================
+ Hits         2585     2594       +9     
  Misses        129      129              
- Partials       40       41       +1     
Flag Coverage Δ
python-3.6 93.28% <100.00%> (+0.02%) :arrow_up:
python-3.9 93.37% <100.00%> (+0.06%) :arrow_up:
python-pypy-3.7 93.46% <100.00%> (-0.02%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ionengine/framework/config/ChannelConfigHandler.py 95.94% <100.00%> (ø)
...ecisionengine/framework/logicengine/LogicEngine.py 96.66% <100.00%> (+0.23%) :arrow_up:
...ecisionengine/framework/taskmanager/TaskManager.py 96.51% <100.00%> (+0.08%) :arrow_up:
src/decisionengine/framework/dataspace/maintain.py 98.11% <0.00%> (-0.95%) :arrow_down:

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 a6a81ce...677f68b. Read the comment docs.

pep8speaks commented 3 years ago

Hello @knoepfel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-09-17 19:36:09 UTC