random.cdisc.data icon indicating copy to clipboard operation
random.cdisc.data copied to clipboard

Making updates of the cache as an exported function

Open Melkiades opened this issue 2 years ago • 0 comments

There are few cravats for this being a vignette:

  • (unless specified by a dedicated flag) building vignettes is part of R CMD BUILD and build step is part of installing from sources, e.g. installing from GH. I am a little afraid of installation performance here.
  • Vignettes are exposed to the users. Do we really expect that users will read it? Having said that, I don't think that vignette is a good idea. Please correct me if I am missing something. To me, data files are integral part of the package. ~Script~ Functionality that creates them should be considered as an utility. Alternative way would be to introduce something like refresh() / snapshot() / create_new_datasets() function in the package namespace but do we really expect package users to trigger this procedure? I feel it's more on package maintainers. Moreover, this could make it a little bit more difficult to keep test coverage high - you would have to do the mocking or other clever tricks to be able to test that.

Originally posted by @pawelru in https://github.com/insightsengineering/random.cdisc.data/issues/290#issuecomment-1700639016

I would keep the vignette with eval = FALSE so to keep some connection with the past (and keep some guidance for updating the cache, which is good for a vignette). For tests and examples, we will see. I think anyway, if there are no updates on the diff with origin/main it should not do anything, so tests should go fine, but we need to be sure for branches etc..

Melkiades avatar Aug 31 '23 11:08 Melkiades