epiverse-trace / episoap

[Not published - under active development] A Store of Outbreak Analytics Pipelines Provided as Rmarkdown Report Templates
https://epiverse-trace.github.io/episoap/
Other
4 stars 2 forks source link

Update {epiparameter} usage #100

Closed CarmenTamayo closed 4 months ago

CarmenTamayo commented 7 months ago

Changes in epiparameter usage to update template contents to the latest version of the package:

Bisaloo commented 7 months ago

Please also update the epiparameter version number for renv:

https://github.com/epiverse-trace/episoap/blob/724ce0dcff70e8a8b9305499b84ff94a06e2e8a7/inst/rmarkdown/templates/transmissibility/skeleton/skeleton.Rmd#L79

You can find the value to use by running sessioninfo::package_info("epiparameter"), which will tell you which version is installed on your local computer.

CarmenTamayo commented 7 months ago

Could you also update epiparameter usage in the EpiNow2 child document? yes, that's on my to-do list, to update the usage also on the rmd chunks

CarmenTamayo commented 4 months ago

@joshwlambert @Bisaloo hi both, do you think we could merge this PR? the only issue I've not been able to resolve is issue #127 , where I'm unsure how {epiparameter} could be used to update what's now being done by epitrix/distcrete Other than that, this could be merged after being reviewed

joshwlambert commented 4 months ago

@CarmenTamayo I will review this afternoon and get back to you by EOD.

joshwlambert commented 4 months ago

Given the number of commits to number of files changed I think this PR would be a good candidate for a squash merge.

Bisaloo commented 4 months ago

Please also add yourself as a package author (role = "aut") in the DESCRIPTION before we merge this @CarmenTamayo :pray:

https://github.com/epiverse-trace/episoap/blob/0b7406ffc2a2d5a5dd9b82cc000b3e312c3d9220/DESCRIPTION#L4-L9

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.07%. Comparing base (e21a7c8) to head (f5dd10b).

:exclamation: Current head f5dd10b differs from pull request most recent head 916e8e3. Consider uploading reports for the commit 916e8e3 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #100 +/- ## ======================================= Coverage 73.07% 73.07% ======================================= Files 4 4 Lines 26 26 ======================================= Hits 19 19 Misses 7 7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

CarmenTamayo commented 4 months ago

Please also add yourself as a package author (role = "aut") in the DESCRIPTION before we merge this @CarmenTamayo 🙏

https://github.com/epiverse-trace/episoap/blob/0b7406ffc2a2d5a5dd9b82cc000b3e312c3d9220/DESCRIPTION#L4-L9

Done here https://github.com/epiverse-trace/episoap/pull/100/commits/013a44d695b58298d97349c0e624076b0be808a6

joshwlambert commented 4 months ago

Not sure why the test-reports workflow is failing, looking at the setup-r-dependencies@v2 output from sessionInfo() neither {episoap} or it's dependencies for the templates are being installed, even though they were on previous actions runs when the workflow passed. Could use the setup-renv@2 workflow (https://github.com/r-lib/actions/tree/v2-branch/setup-renv) to ensure the packages required to build the reports are installed with their correct versions. @Bisaloo & @chartgerink let me know if you think this is a suitable fix?

chartgerink commented 4 months ago

@joshwlambert - are we confident that's the underlying problem, really? If the workflow worked before and has not changed, it feels like something else must be causing this. I just re-ran the workflow and it seems like there is a different problem that requires some debugging to make the action

Quitting from lines 215-230 [unnamed-chunk-2] (skeleton.Rmd)
Error in `value[[3L]]()`:
! Package 'ggplot2' version 3.5.0 cannot be unloaded:
 Error in unloadNamespace(package) : namespace 'ggplot2' is imported by 'episoap' so cannot be unloaded
Backtrace:

To fix the workflow, I would see what changed since the last time the workflow succeeded and find the root cause.

joshwlambert commented 4 months ago

@chartgerink I think the misunderstanding is because I was looking at the first test report workflow to fail. It seems the error in recent workflow failures is different.

The packages being installed by setup-r-dependencies are the most recent versions, or at least newer than specified in the skeleton.Rmd lock file. The error seems to be that the action cannot unload the newer version. This would presumably be resolved by just installing the versions specified in the lock file in the first place, but I'm unsure how to do this without pulling the lock file into a renv.lock file and using the setup-renv workflow mentioned above.

What's the best approach?