Ideally whenever flow is modified, or any subproperty all the way down the nested objects is modifed. We would automatically call dataflow.update() so the user doesn't have to remember to call it.
The following code might be helpful from the config code paths. We have leveraged getters and setters to do validation on properties. We could possibly take a similar with flow, we might have to ensure each object within flow has a reference to the dataflow it's within. If an object was instantiated as above, we might be able to detect it from the parent it was added to, going all the way up to the flow object, and add down a reference to the dataflow, so the object can call update, as well as then calling update due to that addition of a property.
Pain Point
Currently when a use modifies
dataflow.flowthe dataflow is not updated unlessdataflow.update()is called.For example:
dffml/examples/io/io_usage.py
Lines 11 to 49 in 8c87efa
Proposed Solution
Ideally whenever
flowis modified, or any subproperty all the way down the nested objects is modifed. We would automatically calldataflow.update()so the user doesn't have to remember to call it.The following code might be helpful from the config code paths. We have leveraged getters and setters to do validation on properties. We could possibly take a similar with
flow, we might have to ensure each object within flow has a reference to the dataflow it's within. If an object was instantiated as above, we might be able to detect it from the parent it was added to, going all the way up to theflowobject, and add down a reference to the dataflow, so the object can call update, as well as then calling update due to that addition of a property.dffml/dffml/base.py
Lines 366 to 451 in 8c87efa
The text was updated successfully, but these errors were encountered: