BaseModulePlugin, BaseYamlPlugin, and eventually BaseTextPlugin do not inherit from some BasePlugin class. We believe it would be beneficial to add this as a Parent class to base.py to abstract some code to a higher level. This class would also implement __repr__ and __str__ functions so that every plugin could be printed / represented in an understandable manner. For child classes, we could override __repr__ and __str__ if they needed additional information or a different implementation to expose pertinent information.
Background and Motivation
This topic came out of a conversation from our monthly issue curation meeting (5/2/24). We should discuss what these __repr__ and __str__ functions should look like, what BasePlugin should look like as a whole. Hopefully this will clean up some things.
Code to demonstrate issue
Will be added to geoips.interfaces.base
Checklist for Completion
[ ] Create BasePlugin class
[ ] Add __repr__ and __str__ functions to that class
[ ] Override __repr__ and __str__ functions where necessary in child classes.
Requested Update
Description
BaseModulePlugin
,BaseYamlPlugin
, and eventuallyBaseTextPlugin
do not inherit from someBasePlugin
class. We believe it would be beneficial to add this as a Parent class to base.py to abstract some code to a higher level. This class would also implement__repr__
and__str__
functions so that every plugin could be printed / represented in an understandable manner. For child classes, we could override__repr__
and__str__
if they needed additional information or a different implementation to expose pertinent information.Background and Motivation
This topic came out of a conversation from our monthly issue curation meeting (5/2/24). We should discuss what these
__repr__
and__str__
functions should look like, whatBasePlugin
should look like as a whole. Hopefully this will clean up some things.Code to demonstrate issue
Will be added to
geoips.interfaces.base
Checklist for Completion
BasePlugin
class__repr__
and__str__
functions to that class__repr__
and__str__
functions where necessary in child classes.