Skip to content

Feature/sof 7843#135

Merged
VsevolodX merged 27 commits intomainfrom
feature/SOF-7843
Mar 6, 2026
Merged

Feature/sof 7843#135
VsevolodX merged 27 commits intomainfrom
feature/SOF-7843

Conversation

@VsevolodX
Copy link
Copy Markdown
Member

No description provided.

Comment thread src/js/units/execution.js Outdated
flavor: Utils.specific.removeTimestampableKeysFromConfig(this.flavor.toJSON()),
application: Utils.specific.removeTimestampableKeysFromConfig(this.prop("application")),
executable: Utils.specific.removeTimestampableKeysFromConfig(this.prop("executable")),
flavor: Utils.specific.removeTimestampableKeysFromConfig(this.prop("flavor")),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need to change JS code

Comment thread src/py/mat3ra/wode/units/unit.py Outdated
"type": self.type,
}
if self.type == "execution":
application = getattr(self, "application", None) or {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in ExecutionUnit

Comment thread src/js/units/execution.js Outdated
build: application.build,
}),
executable: Utils.specific.removeTimestampableKeysFromConfig({ name: executable.name }),
flavor: Utils.specific.removeTimestampableKeysFromConfig({ name: flavor.name }),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only name is not enough

Comment thread src/js/workflows/workflow.js Outdated
return Utils.hash.calculateHashFromObject(meaningfulFields);
}

calculateHash() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def method_data(self):
return self.model.method.data

def calculate_hash(self) -> str:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can override get_hash_object only

Comment thread src/py/mat3ra/wode/units/unit.py Outdated

@staticmethod
def _pick(obj: Dict[str, Any], *keys: str) -> Dict[str, Any]:
return Unit._compact_dict({k: obj.get(k) for k in keys})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the above should be in this class, should be in utils, if needed

Comment thread src/py/mat3ra/wode/units/unit.py Outdated
return Unit._compact_dict({k: obj.get(k) for k in keys})

@staticmethod
def _hash_input_content(input_items: Any) -> str:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_input_items_for_hash

Comment thread src/py/mat3ra/wode/units/unit.py Outdated
"type": self.type,
}

def calculate_hash(self) -> str:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can go to mixin in code

@VsevolodX VsevolodX merged commit b16ce7d into main Mar 6, 2026
9 checks passed
@VsevolodX VsevolodX deleted the feature/SOF-7843 branch March 6, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants