TOSIT-IO / tdp-lib

Python library to configure, manage and deploy TDP
Apache License 2.0
4 stars 8 forks source link

Introduce new operation entities #635

Closed PaulFarault closed 2 days ago

PaulFarault commented 2 days ago

Which issue(s) this PR fixes

Fixes None

Additional comments

Transform the Operation class to an abstract class that is declined in several implementations:

The instanciation of the above classes is now ONLY done by the Collections class initialization, nowhere else.

The Collections class now only exposes a single dict with all available operations, all other previous operations properties are removed (e.g. dag_operations, other_operations, etc.). Specific operation types can now be obtained using the new Operations implementation (available at Collections.operations) which define a get_by_class method. For example, to retrieve a list of all operation from the DAG that are not forged during the Collections initialization:

collections.operations.get_by_class(include=DagOperation, exclude=ForgedOperation)

Collections and Operation usage in the code have been refactored to match those new definitions, without affecting the existing logic.

Agreements