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:
allow these internal consistencies to be picked-up (and then investigated) during development and checking
be a part of the 'pull request' protocol to guarantee this for all modules in master.
Each item in each of the following places must map perfectly 1:1
The declaration of 'PARAMETERS' in a module
The dict used in the module, 'self.parameters'
The list of parameter values that are provided in the resource file [If the 'load_parameters_from_dataframe' method is used]
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).
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).