verbal-autopsy-software / InterVA5

R package for InterVA-5 software
GNU General Public License v3.0
2 stars 6 forks source link

Enhancement: Merging InterVA4 & InterVA5 #2

Closed mboyas-mitre closed 5 years ago

mboyas-mitre commented 5 years ago

The InterVA codebase is substantively the same between versions 4 and 5; the algorithmic functionality operates in essentially the same way. Differences between the codes seem to largely be in the construction of the data checking sections, combined with relatively minor differences elsewhere, as well as the use if a different probbase file. To preserve the consistency of code functionality, we recommend merging InterVA4 and InterVA5 into a single codebase that pulls in the requisite differences (e.g., different priors, etc.) where appropriate based on user argument. Making this change would allow for easy updating both packages at the same time, and make the user experience more seamless. Maintaining multiple code bases with substantial common code increases the time required to maintain the code in addition to increasing the likelihood that changes or bugfixes are not consistently applied.

For example, the code that reads in and checks probbase, as well as the code to run the algorithm itself (see below for rough locations) are essentially duplicated between the two packages.  We can see a situation where something might be changed in one package, and having then to replicate that change in the second package becomes an administrative headache that opens the possibility to unintentional errors.

https://github.com/verbal-autopsy-software/InterVA5/blob/d4f1779dad5c47ac39c8b7b914450d3b49e366e2/InterVA5_1.0/R/InterVA5.R#L144

https://github.com/verbal-autopsy-software/InterVA5/blob/d4f1779dad5c47ac39c8b7b914450d3b49e366e2/InterVA5_1.0/R/InterVA5.R#L297

richardli commented 5 years ago

Thanks. For now we do not have explicit plans to merge the two packages. I'll keep this as a potential future improvements.