-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
breaking changeIntroduction of an incompatible API changeIntroduction of an incompatible API changemethod APIRelating to the APIs for creating custom methodsRelating to the APIs for creating custom methodsunder considerationDev has not yet decided whether or how to implementDev has not yet decided whether or how to implement
Description
Idea: Require method implementations to be subclasses of base classes defined by versioningit, one base class per step. Instances of these classes will have step arguments provided as instance attributes (and thus additions to the arguments should not require updating any code), and they are executed via a run() or __call__() method.
-
Other possible instance attributes of method classes:
- the path to the project root
- the complete
versioningitconfiguration? (before or after processing byConfig.parse_*?) - a
Versioningitinstance? - a
dictin which plugins can store arbitrary data (keyed by plugin name) that is then passed to subsequent steps so that multiple plugins from the same package can share state
-
Possible ways to supply the user parameters:
- As a dict passed to the
run()method - As a dict attribute on instances
- A method class could then validate user parameters at construction (which happens while parsing the configuration, before execution) by overloading
__init__.
- A method class could then validate user parameters at construction (which happens while parsing the configuration, before execution) by overloading
- As a dict passed to the
-
Problem: This won't address the need to make breaking changes to
do_STEP()methods whenever a new argument is added.
Metadata
Metadata
Assignees
Labels
breaking changeIntroduction of an incompatible API changeIntroduction of an incompatible API changemethod APIRelating to the APIs for creating custom methodsRelating to the APIs for creating custom methodsunder considerationDev has not yet decided whether or how to implementDev has not yet decided whether or how to implement