Skip to content

Conversation

@VsevolodX
Copy link
Member

No description provided.

It provides common methods for managing units in both Workflow and Subworkflow classes.
"""

units: List["Unit"]
Copy link
Member

Choose a reason for hiding this comment

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

Why is it in quotes?

from mat3ra.ade.application import Application
from mat3ra.mode.method import Method
from mat3ra.mode.model import Model
from mat3ra.standata.workflows import WorkflowStandata
Copy link
Member

Choose a reason for hiding this comment

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

Flowchart units managers should be tested

assert data["head"] is True


def test_add_context_to_relaxation_unit():
Copy link
Member

Choose a reason for hiding this comment

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

Too complex of a test

@timurbazhirov timurbazhirov changed the base branch from feature/SOF-7766-2-min to main December 12, 2025 05:00
@VsevolodX VsevolodX changed the base branch from main to feature/SOF-7766-2-min December 12, 2025 05:01
@timurbazhirov timurbazhirov changed the base branch from feature/SOF-7766-2-min to main December 14, 2025 23:26
self._add_to_list(self.units, unit, head, index)
self.set_units(self.set_next_links(self.set_units_head(self.units)))

# TODO: Consider removing setNextLinks and setUnitsHead calls when flowchart designer implemented.
Copy link
Member

Choose a reason for hiding this comment

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

Remove

- `add_target(target)` - Add target
- `remove_target(target)` - Remove target
- `has_feature(feature)` - Check feature exists
- `has_target(target)` - Check target exists
Copy link
Member

Choose a reason for hiding this comment

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

Remove the functions that we don't have

@@ -0,0 +1,87 @@
# TODO: We need periodic_table.js equivalent in Python
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

This meant to be changed in the task for Context Providers. This is just a comment to implement that

then: str = Field(default="")
else_: str = Field(default="", alias="else")
input: list = Field(default_factory=list)
maxOccurrences: int = Field(default=1)
Copy link
Member

Choose a reason for hiding this comment

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

We should get the default values from schema



class DataFrameIOUnit(IOUnit):
subtype: str = Subtype.dataFrame
Copy link
Member

Choose a reason for hiding this comment

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

Remove

from mat3ra.utils.uuid import get_uuid


def generate_uuid() -> str:
Copy link
Member

Choose a reason for hiding this comment

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

Remove

return get_uuid()


def find_by_name_or_regex(
Copy link
Member

Choose a reason for hiding this comment

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

Should be elsewhere

Copy link
Member

Choose a reason for hiding this comment

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

And tested


@classmethod
def from_subworkflow(cls, subworkflow: Subworkflow) -> "Workflow":
raise NotImplementedError
Copy link
Member

Choose a reason for hiding this comment

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

Let's create a separate branch without all NotImplementedError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants