Closed james-strauss-uwa closed 2 weeks ago
This PR modifies how EAGLE handles graph configurations during translation by moving the responsibility of applying graph configurations from EAGLE to the DALiuGE translator. The implementation changes focus on modifying the JSON output format for translation and fixing a graph cloning issue.
sequenceDiagram
participant EAGLE
participant LogicalGraph
participant DALiuGE Translator
EAGLE->>LogicalGraph: Request JSON for translation
LogicalGraph->>LogicalGraph: Check if active graph config exists
alt Active graph config exists
LogicalGraph->>LogicalGraph: Include active graph config in JSON
else No active graph config
LogicalGraph->>LogicalGraph: Include empty graph config in JSON
end
LogicalGraph->>EAGLE: Return JSON
EAGLE->>DALiuGE Translator: Send JSON for translation
classDiagram
class LogicalGraph {
+toOJSJsonString(graph: LogicalGraph, forTranslation: boolean) : string
+clone() : LogicalGraph
-activeGraphConfig() : GraphConfig
}
class GraphConfig {
+getId() : String
+clone() : GraphConfig
+toJson(config: GraphConfig) : Json
}
LogicalGraph --> GraphConfig : uses
note for LogicalGraph "Now only includes active graph config in JSON for translation"
classDiagram
class Translator {
-eagle: Eagle
+translate() : void
}
class LogicalGraph {
+clone() : LogicalGraph
}
Translator --> LogicalGraph : uses
note for Translator "Removed application of graph config to logical graph"
Change | Details | Files |
---|---|---|
Modified JSON output format for translation mode |
|
src/LogicalGraph.ts |
Removed premature graph configuration application |
|
src/Translator.ts |
Fixed graph cloning bug |
|
src/LogicalGraph.ts |
should probably coordinate the merge with Ryan when the translator side of the updates are ready
On this - don't worry too much about that; it can make things easier to test when EAGLE is a bit ahead of DALiuGE!
At the moment, EAGLE applies the active graph configuration to the logical graph before translation. That is, it replaces values of node parameters with the values specified in the active graph configuration.
This PR removes that functionality, which will now be performed by the translator.
EAGLE now sends a slightly modified version of the LogicalGraph JSON to the DALiuGE translator. This version contains only the "active" graph configuration, or an empty dict, if no active graph configuration exists.
This PR also fixes a bug where cloning a LogicalGraph would NOT clone the state of the activeGraphConfiguration attribute.
Summary by Sourcery
Remove the functionality of applying the active graph configuration to the logical graph before translation, delegating this task to the translator. Update the LogicalGraph to send only the active graph configuration to the DALiuGE translator. Fix a bug related to cloning the LogicalGraph's activeGraphConfiguration state.
Bug Fixes:
Enhancements: