pharmaR / riskassessment

Risk Assessment Demo App: https://rinpharma.shinyapps.io/riskassessment
https://pharmar.github.io/riskassessment/
Other
98 stars 25 forks source link

Allow `No Decision` for if-then decision rule statements #687

Open AARON-CLARK opened 8 months ago

AARON-CLARK commented 8 months ago

Since we don't allow use of operators like & / AND and | / OR to define a single the decision automation rules, users can't define stuff like this:

if code coverage > 80% AND r-cmd-check is clean, then mark the package as "Low Risk"

However, we can kind accomplish the same end result since we use the | / OR operator between rules and we offer an else option:

if code coverage < 80% then "High Risk"
if r-cmd-check is not clean then "High Risk"
else "Low Risk"

Unfortunately, the example above does force the user to mark a package as "High Risk" in order to achieve their goal. Thus, perhaps it would make sense to allow "No Decision" for the if-then statements.

if code coverage < 80% then "No Decision"
if r-cmd-check is not clean then "No Decision"
else "Low Risk"

Thoughts?

Jeff-Thompson12 commented 8 months ago

I'm not a huge fan of "No Decision" because I think it might be confusing to the end user. I could see something like "Next" or even "Next Rule". I think we may even be able to find some way to indent the next rule so that you can visually see it is a sub-step.

It does appear that my implementation of the rules may not be the best because all of these changes won't be the easiest to add.