Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature/OPT-1029] to dev #333

Merged
merged 3 commits into from
Oct 24, 2023
Merged

[feature/OPT-1029] to dev #333

merged 3 commits into from
Oct 24, 2023

Conversation

smaneroiriusrisk
Copy link
Contributor

No description provided.

@smaneroiriusrisk smaneroiriusrisk changed the title feature/OPT-1029 [feature/OPT-1029] to dev Oct 23, 2023
Copy link
Contributor

@jmgarcia-iriusrisk jmgarcia-iriusrisk left a comment

Choose a reason for hiding this comment

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

@smaneroiriusrisk nice work! Great idea how uniting components and trustzone in the same list works!
I wrote a couple of comments I'd like to discuss before approving this PR.

from slp_drawio.slp_drawio.parse.tranformers.parent_calculator_transformer import ParentCalculatorTransformer


class TestParentCalculatorTransformer:
Copy link
Contributor

Choose a reason for hiding this comment

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

This class lacks tests to set the parent for:

  1. Component has a TrustZone as parent
  2. Trustzone has a Component as a parent
  3. Trustzone has another TZ as a parent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think these use cases are out of scope of the MVP, but I have done it anyway. I had to modify the DiagramTrustzone class.

return PARENT_TYPES[element.__class__]


class ParentCalculatorTransformer(Transformer):
Copy link
Contributor

Choose a reason for hiding this comment

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

Parent calculator should be used at DrawioParser.build_otm bellow the line # TODO Implement and call Transformers here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this is the right task to do that, but also done anyway

@jmgarcia-iriusrisk jmgarcia-iriusrisk dismissed stale reviews from dantolin-iriusrisk and themself via 48b24b4 October 24, 2023 14:17
@jmgarcia-iriusrisk jmgarcia-iriusrisk merged commit edc1d63 into dev Oct 24, 2023
11 checks passed
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.

3 participants