mrc-ide / priority-pathogens

https://mrc-ide.github.io/priority-pathogens/
Creative Commons Zero v1.0 Universal
4 stars 0 forks source link

Automated checks for data consistency #36

Open sangeetabhatia03 opened 2 weeks ago

sangeetabhatia03 commented 2 weeks ago

ATM, when I refactor code, I ask pathogen leads to check if the outputs of the refactored code are consistent with previous versions. Can we automate this process? It would be good to have an orderly plugin that allows comparison of new packets against old packets and output a user-friendly diff?

plietar commented 1 week ago

I've implemented support for this in orderly, now under review: https://github.com/mrc-ide/orderly2/pull/147

You can see in https://github.com/mrc-ide/orderly2/blob/9be0906bf3f8d9229152e4c24562045e7cf5e448/tests/testthat/_snaps/compare.md the kind of outputs it produces. I would be curious to get some feedback, and also trying it on larger/real-world files.

By default the diff is going to include changes that are made to the report's R script. You can pass what = "artefacts" to compare the outputs only.