[Feature request]: Refactor gempyor.NPI
Into gempyor.modifiers
#409
Labels
docstring
Relating to in-code documentation.
documentation
Relating to ReadMEs / gitbook / vignettes / etc.
enhancement
Request for improvement or addition of new feature(s).
gempyor
Concerns the Python core.
medium priority
Medium priority.
Milestone
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 documentedgempyor.modifiers
module. The current setup with an ABC that modifiers extend is good, the refactoredModifier
ABC needs to have:__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_batch
Intodev
#404 (comment))get_reduction
abstract method that subclasses have to implement.get_reduction_df
that is a thin wrapper aroundget_reduction
(unclear ifget_reduction
can 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.
The text was updated successfully, but these errors were encountered: