paradox
paradox copied to clipboard
Value Change Callback
See tests for how exactly this could work. The idea is to have a $callbacks
slot of functions that get called whenever $values
changes; the functions get called in turn and return a possibly modified version of the values to be set. This would close #231.
Codecov Report
Merging #237 into master will increase coverage by
0.05%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #237 +/- ##
==========================================
+ Coverage 94.55% 94.61% +0.05%
==========================================
Files 20 20
Lines 496 501 +5
==========================================
+ Hits 469 474 +5
Misses 27 27
Impacted Files | Coverage Δ | |
---|---|---|
R/ParamSetCollection.R | 95.77% <100%> (ø) |
:arrow_up: |
R/ParamSet.R | 97.24% <100%> (+0.09%) |
:arrow_up: |
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 7f4c9fb...8daebd9. Read the comment docs.
Codecov Report
Merging #237 into master will increase coverage by
0.82%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #237 +/- ##
==========================================
+ Coverage 94.55% 95.37% +0.82%
==========================================
Files 20 20
Lines 496 584 +88
==========================================
+ Hits 469 557 +88
Misses 27 27
Impacted Files | Coverage Δ | |
---|---|---|
R/ParamSetCollection.R | 95.77% <100%> (ø) |
:arrow_up: |
R/ParamSet.R | 98.24% <100%> (+1.1%) |
:arrow_up: |
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 7f4c9fb...139c1fb. Read the comment docs.
Essentially a forced trafo?
It allows for side-effects from changin parameter values. My use-case is changing one ParamSet member of a ParamSetCollection
according to a parameter value (see the "callbacks on ParamSetCollection" test at the end of test_ParamSet.R in the PR).
lets at least discuss this in toulouse, i am unsure wether this is a good thing