UCL / TLOmodel

Epidemiology modelling framework for the Thanzi la Onse project
https://www.tlomodel.org/
MIT License
11 stars 5 forks source link

Tests on the consistency of self.parameters and PARAMETERS and the resourcefile #109

Open tbhallett opened 4 years ago

tbhallett commented 4 years ago

In checking disease modules, I am noticing that it is easy for there to be discrepancies regarding parameters and this can be symptomatic of a deeper issue with the code (e.g. typos and changes that come from multiple revision of the code leading to deprecation of some features etc)

It would be good to have a check as follows that would:

Each item in each of the following places must map perfectly 1:1

And .... that each of those parameters must be used somewhere (either in the module itself or referred to from another place)

I can see how the internal consistency can be established between PARAMETERS, self.parameters and the resourceful. However, checking for 'use' of the parameters would require a "cold read" of the files and a recognition of actual usage (as opposed to a comment or the initial declaration).

tbhallett commented 4 years ago

Similar to an earlier issue: https://github.com/UCL/TLOmodel/issues/39

Such an internal check on the usage of and HSI that are defined would also help pick up issues quickly