182 introduce @verified slot in teal_data class - #188
Conversation
There is no way to prevent it if someone is persistent enough.
You have to specify a method for the |
Code Coverage SummaryDiff against mainResults for commit: 1735ea8 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Now it makes total sense |
|
I wonder if raising an error is the way to go here. The function has to be called with reassignment anyway since the valid object has to be passed to But that would be coupling the two packages. On the other hand Then again, |
…ghtsengineering/teal.data into 182_validate_teal_data@main
Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
…ghtsengineering/teal.data into 182_validate_teal_data@main
|
@chlebowa about your last comment - for sure this is something we can consider and discuss. I think I need a bit more time to come up with my opinion on that, but will keep this in mind.
|
|
Lastly, vignettes fail (preprocessing-delayed-data.Rmd) becuase Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘get_code’ for signature ‘"CDISCTealDatasetConnector"’library(teal.data)
library(magrittr)
adsl <- cdisc_dataset_connector(
dataname = "ADSL",
pull_callable = adsl_cf,
keys = get_cdisc_keys("ADSL")
) %>%
mutate_dataset("ADSL$SEX <- as.factor(ADSL$SEX)")
get_code(adsl) |
Please remove |
chlebowa
left a comment
There was a problem hiding this comment.
Some more polish, almost there.
Fix failing min verdepcheck test: ``` * checking tests ... Running ‘testthat.R’ ERROR Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output: ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error (test-datanames.R:23:3): only names of existing variables are accepted ── Error: 'expect_no_error' is not an exported object from 'namespace:testthat' ── Error (test-datanames.R:30:3): datanames supports qenv.error class ────────── Error: 'expect_no_error' is not an exported object from 'namespace:testthat' ── Error (test-teal_data.R:88:3): teal_data accepts any data provided as named list ── Error: 'expect_no_error' is not an exported object from 'namespace:testthat' ── Error (test-teal_data.R:92:3): teal_data accepts code as character ────────── Error: 'expect_no_error' is not an exported object from 'namespace:testthat' ── Error (test-teal_data.R:101:3): teal_data accepts code as language ────────── Error: 'expect_no_error' is not an exported object from 'namespace:testthat' [ FAIL 5 | WARN 0 | SKIP 1 | PASS 1132 ] Error: Test failures Execution halted ``` Signed-off-by: Pawel Rucki <12943682+pawelru@users.noreply.github.com>
…ghtsengineering/teal.data into 182_validate_teal_data@main
…ghtsengineering/teal.data into 182_validate_teal_data@main
Signed-off-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
Will be introduced in `teal.data` directly insightsengineering/teal.data#188 for `teal_data` class
Close #168 Needed for insightsengineering/teal.data#188 and potential other future methods that will have more parameters than current default S4 generic of `get_code`. --------- Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com> Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
Close #182
Feature description
@verifiedslot toteal_dataclass.dataandcodethenverifiedis equal toTRUE.dataorcodeare not-empty thenverifiedis set toFALSE.verifyteal_dataandqenv.errorclasses.teal_data@envwithteal_data@code.teal_data@verifiedto TRUE if you can.qenv.errorthrowns an error withobject@messageinformation.get_codeS4 generic forteal_dataobjectdatanamesparameter allows to useget_code_dependency(code, names)to get the code for specific objects.get_code_dependencywas moved fromteal.code193 bringget_code_dependencyfromteal.code#194show,teal_data-methodteal_data@verified = FALSEsaying object is not verifiedteal_data@verified = TRUEsaying object is verifiedNot included
I did not provide a mechanism to block manual change of
@validslot, as we do not have this for@code/@envanyway.TODO
get_code.teal_data()S3 methodis_reproducibletoS4 generic with method for teal_data and for qenv.error.is_reproducibleName for the check field and process for `teal_data` object #189teal.data::get_codeS4 forteal_dataobjectget_code_dependencyfromteal.codetoteal.data193 bringget_code_dependencyfromteal.code#194@env