-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Label
documentation, docstring, enhancement, gempyor
Priority Label
medium priority
Is your feature request related to a problem? Please describe.
The modifiers code is currently located under the gempyor.NPI submodule for legacy reasons and contains duplicated code that is under tested and under documented. This makes working with the functionality contained here challenging, it's difficult to know if changes break existing behavior or has already been implemented elsewhere as well as makes it difficult to share code without creating circular dependency issues.
Is your feature request related to a new application, scenario round, pathogen? Please describe.
No response
Describe the solution you'd like
Ultimately move gempyor.NPI and all of its contents into a consolidated, tested, and documented gempyor.modifiers module. The current setup with an ABC that modifiers extend is good, the refactored Modifier ABC needs to have:
- An
__init__method that could build the modifiers from the properties of the class so subclasses don't have to have their own__init__methods. (Including determination of relevant subpops, see Mergeemcee_batchIntodev#404 (comment)) - Have
get_reductionabstract method that subclasses have to implement. get_reduction_dfthat is a thin wrapper aroundget_reduction(unclear ifget_reductioncan just cover this or not).
A first step before making these larger end goal changes though would be to document and unit test the existing functionality. This will make migrating/refactoring much easier and safer to do.