Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4865bf6
Part-way through the fixes for typescript strict mode
james-strauss-uwa Nov 24, 2025
065b891
Part-way through the fixes for typescript strict mode
james-strauss-uwa Nov 28, 2025
270b1b7
Part-way through the fixes for typescript strict mode
james-strauss-uwa Nov 28, 2025
59bd8a0
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 2, 2025
8d5460d
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 3, 2025
ad34bff
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 3, 2025
9335d73
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 3, 2025
fcd4843
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 3, 2025
181c891
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 3, 2025
2a9bf67
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 4, 2025
1b3b7cc
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 4, 2025
4936f83
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 4, 2025
082df29
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 5, 2025
cb32906
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 5, 2025
3f4dc61
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 5, 2025
e752cf1
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 10, 2025
0983a2b
Part-way through the fixes for typescript strict mode
james-strauss-uwa Dec 12, 2025
bb40253
First time the code compiles with typescript strict mode
james-strauss-uwa Dec 12, 2025
8bc1036
Improvements to Setting.findValue()
james-strauss-uwa Dec 12, 2025
436f9b0
First time that EAGLE actually runs since typescript strict mode
james-strauss-uwa Dec 12, 2025
de44760
Fixed bug with edge loading
james-strauss-uwa Dec 15, 2025
f154694
Minor cleanup
james-strauss-uwa Dec 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export namespace Category {
canHaveApplicationArguments: boolean,
canHaveConstructParameters: boolean,
icon: string,
color: string
color: string,
radius: number,
};

// TODO: add to CategoryData somehow? use in Node.isData() etc?
Expand Down
84 changes: 43 additions & 41 deletions src/CategoryData.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/ComponentUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ComponentUpdater {
}

static updateNode(palettes: Palette[], node: Node, errorsWarnings: Errors.ErrorsWarnings): Node | null {
let newVersion : Node = null;
let newVersion : Node | null = null;

for (const palette of palettes){
for (const paletteNode of palette.getNodes()){
Expand All @@ -48,15 +48,15 @@ export class ComponentUpdater {
static _replaceNode(dest: Node, src: Node){
for (const srcField of src.getFields()){
// try to find a field with the same name in the destination
let destField: Field = dest.getFieldById(srcField.getId());
let destField: Field | undefined = dest.getFieldById(srcField.getId());

// if dest field not found, try to find something that matches by displayText
if (typeof destField === 'undefined'){
destField = dest.findFieldByDisplayText(srcField.getDisplayText());
}

// if dest field could not be found, then go ahead and add a NEW field to the dest node
if (destField === null){
if (typeof destField === 'undefined'){
destField = srcField.clone();
dest.addField(destField);
}
Expand Down
41 changes: 21 additions & 20 deletions src/Daliuge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,32 +167,33 @@ export namespace Daliuge {
Unknown = "Unknown"
}

// These are the canonical example definition of each field
export const groupStartField = new Field(null, FieldName.GROUP_START, "true", "true", "Is this node the start of a group?", false, DataType.Boolean, false, [], false, FieldType.Component, FieldUsage.NoPort);
export const groupEndField = new Field(null, FieldName.GROUP_END, "true", "true", "Is this node the end of a group?", false, DataType.Boolean, false, [], false, FieldType.Component, FieldUsage.NoPort);

export const branchYesField = new Field(null, FieldName.TRUE, "", "", "The affirmative output from a branch node", false, DataType.Object, false, [], false, FieldType.Component, FieldUsage.OutputPort);
export const branchNoField = new Field(null, FieldName.FALSE, "", "", "he negative output from a branch node", false, DataType.Object, false, [], false, FieldType.Component, FieldUsage.OutputPort);
// dummy node for use in field definitions
const dummyNode = new Node("", "", "", Category.Unknown);

export const dropClassField = new Field(null, FieldName.DROP_CLASS, "", "", "", false, DataType.String, false, [], false, FieldType.Component, FieldUsage.NoPort);
// These are the canonical example definition of each field
export const groupStartField = new Field(dummyNode, FieldName.GROUP_START as FieldId, FieldName.GROUP_START, "true", "true", "Is this node the start of a group?", false, DataType.Boolean, false, [], false, FieldType.Component, FieldUsage.NoPort);
export const groupEndField = new Field(dummyNode, FieldName.GROUP_END as FieldId, FieldName.GROUP_END, "true", "true", "Is this node the end of a group?", false, DataType.Boolean, false, [], false, FieldType.Component, FieldUsage.NoPort);

export const executionTimeField = new Field(null, FieldName.EXECUTION_TIME, "5", "5", "", false, DataType.Float, false, [], false, FieldType.Constraint, FieldUsage.NoPort);
export const numCpusField = new Field(null, FieldName.NUM_OF_CPUS, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Constraint, FieldUsage.NoPort);
export const dataVolumeField = new Field(null, FieldName.DATA_VOLUME, "5", "5", "", false, DataType.Float, false, [], false, FieldType.Constraint, FieldUsage.NoPort);
export const branchYesField = new Field(dummyNode, FieldName.TRUE as FieldId, FieldName.TRUE, "", "", "The affirmative output from a branch node", false, DataType.Object, false, [], false, FieldType.Component, FieldUsage.OutputPort);
export const branchNoField = new Field(dummyNode, FieldName.FALSE as FieldId, FieldName.FALSE, "", "", "he negative output from a branch node", false, DataType.Object, false, [], false, FieldType.Component, FieldUsage.OutputPort);
export const dropClassField = new Field(dummyNode, FieldName.DROP_CLASS as FieldId, FieldName.DROP_CLASS, "", "", "", false, DataType.String, false, [], false, FieldType.Component, FieldUsage.NoPort);

export const kField = new Field(null, FieldName.K, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Construct, FieldUsage.NoPort);
export const numCopiesField = new Field(null, FieldName.NUM_OF_COPIES, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Construct, FieldUsage.NoPort);
export const numInputsField = new Field(null, FieldName.NUM_OF_INPUTS, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Construct, FieldUsage.NoPort);
export const numIterationsField = new Field(null, FieldName.NUM_OF_ITERATIONS, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Construct, FieldUsage.NoPort);
export const executionTimeField = new Field(dummyNode, FieldName.EXECUTION_TIME as FieldId, FieldName.EXECUTION_TIME, "5", "5", "", false, DataType.Float, false, [], false, FieldType.Constraint, FieldUsage.NoPort);
export const numCpusField = new Field(dummyNode, FieldName.NUM_OF_CPUS as FieldId, FieldName.NUM_OF_CPUS, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Constraint, FieldUsage.NoPort);
export const dataVolumeField = new Field(dummyNode, FieldName.DATA_VOLUME as FieldId, FieldName.DATA_VOLUME, "5", "5", "", false, DataType.Float, false, [], false, FieldType.Constraint, FieldUsage.NoPort);

export const baseNameField = new Field(null, FieldName.BASE_NAME, "", "", "The base name of the class of this Member function", false, DataType.String, false, [], false, FieldType.Component, FieldUsage.NoPort);
export const selfField = new Field(null, FieldName.SELF, "", "", "", false, DataType.Object, false, [], false, FieldType.Component, FieldUsage.InputOutput);
export const kField = new Field(dummyNode, FieldName.K as FieldId, FieldName.K, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Construct, FieldUsage.NoPort);
export const numCopiesField = new Field(dummyNode, FieldName.NUM_OF_COPIES as FieldId, FieldName.NUM_OF_COPIES, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Construct, FieldUsage.NoPort);
export const numInputsField = new Field(dummyNode, FieldName.NUM_OF_INPUTS as FieldId, FieldName.NUM_OF_INPUTS, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Construct, FieldUsage.NoPort);
export const numIterationsField = new Field(dummyNode, FieldName.NUM_OF_ITERATIONS as FieldId, FieldName.NUM_OF_ITERATIONS, "1", "1", "", false, DataType.Integer, false, [], false, FieldType.Construct, FieldUsage.NoPort);

export const funcCodeField = new Field(null, FieldName.FUNC_CODE, "", "def func_name(args): return args", "Python function code", false, Daliuge.DataType.Python, false, [], false, Daliuge.FieldType.Component, FieldUsage.NoPort);
export const funcNameField = new Field(null, FieldName.FUNC_NAME, "", "func_name", "Python function name", false, Daliuge.DataType.Python, false, [], false, Daliuge.FieldType.Component, FieldUsage.NoPort);
export const baseNameField = new Field(dummyNode, FieldName.BASE_NAME as FieldId, FieldName.BASE_NAME, "", "", "The base name of the class of this Member function", false, DataType.String, false, [], false, FieldType.Component, FieldUsage.NoPort);
export const selfField = new Field(dummyNode, FieldName.SELF as FieldId, FieldName.SELF, "", "", "", false, DataType.Object, false, [], false, FieldType.Component, FieldUsage.InputOutput);
export const funcCodeField = new Field(dummyNode, FieldName.FUNC_CODE as FieldId, FieldName.FUNC_CODE, "", "def func_name(args): return args", "Python function code", false, Daliuge.DataType.Python, false, [], false, Daliuge.FieldType.Component, FieldUsage.NoPort);
export const funcNameField = new Field(dummyNode, FieldName.FUNC_NAME as FieldId, FieldName.FUNC_NAME, "", "func_name", "Python function name", false, Daliuge.DataType.Python, false, [], false, Daliuge.FieldType.Component, FieldUsage.NoPort);

export const persistField = new Field(null, FieldName.PERSIST, "false", "false", "Specifies whether this data component contains data that should not be deleted after execution", false, Daliuge.DataType.Boolean, false, [], false, Daliuge.FieldType.Component, Daliuge.FieldUsage.NoPort);
export const streamingField = new Field(null, FieldName.STREAMING, "false", "false", "Specifies whether this data component streams input and output data", false, Daliuge.DataType.Boolean, false, [], false, Daliuge.FieldType.Component, Daliuge.FieldUsage.NoPort);
export const persistField = new Field(dummyNode, FieldName.PERSIST as FieldId, FieldName.PERSIST, "false", "false", "Specifies whether this data component contains data that should not be deleted after execution", false, Daliuge.DataType.Boolean, false, [], false, Daliuge.FieldType.Component, Daliuge.FieldUsage.NoPort);
export const streamingField = new Field(dummyNode, FieldName.STREAMING as FieldId, FieldName.STREAMING, "false", "false", "Specifies whether this data component streams input and output data", false, Daliuge.DataType.Boolean, false, [], false, Daliuge.FieldType.Component, Daliuge.FieldUsage.NoPort);

// This list defines the fields required for ALL nodes belonging to a given Category.Type
export const categoryTypeFieldsRequired = [
Expand Down
8 changes: 4 additions & 4 deletions src/DockerHubBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class DockerHubBrowser {
isValid: ko.Observable<boolean>; // true iff a valid selection has been made in the docker hub browser UI

constructor(){
this.username = ko.observable(Setting.findValue(Setting.DOCKER_HUB_USERNAME));
this.username = ko.observable(Setting.findValue<string>(Setting.DOCKER_HUB_USERNAME, ""));
this.images = ko.observableArray([]);
this.tags = ko.observableArray([]);
this.digests = ko.observableArray([]);
Expand All @@ -63,7 +63,7 @@ export class DockerHubBrowser {
}

clear = () : void => {
this.username(Setting.findValue(Setting.DOCKER_HUB_USERNAME));
this.username(Setting.findValue<string>(Setting.DOCKER_HUB_USERNAME, ""));
this.images([]);
this.tags([]);
this.digests([]);
Expand All @@ -86,7 +86,7 @@ export class DockerHubBrowser {
this.fetchImages(image, tag);
}

fetchImages = async (selectedImage: string, selectedTag: string): Promise<void> => {
fetchImages = async (selectedImage: string | null, selectedTag: string | null): Promise<void> => {
// if already fetched, abort
if (this.hasFetchedImages()){
console.warn("Already fetched images");
Expand Down Expand Up @@ -135,7 +135,7 @@ export class DockerHubBrowser {
this.fetchTags(selectedTag);
}

fetchTags = async (selectedTag: string): Promise<void> => {
fetchTags = async (selectedTag: string | null): Promise<void> => {
// if already fetched, abort
if (this.hasFetchedTags()){
console.warn("Already fetched tags");
Expand Down
Loading