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

feat: Add add_custom_diagrams serializer #134

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ewuerger
Copy link
Member

@ewuerger ewuerger commented Nov 21, 2024

This PR adds the new add_custom_diagrams serializer. This serializer is configured like that:

    serializer:
        add_custom_diagrams:
          - capella_attr: realization_view
            polarion_id: realization_view
            title: Realization View Diagram

and therefore multiple custom diagrams can be added as custom fields to a work item. Also there is control about the capella_attr and polarion_id now.

@ewuerger ewuerger added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 21, 2024
@ewuerger ewuerger self-assigned this Nov 21, 2024
@ewuerger ewuerger requested a review from micha91 November 22, 2024 09:16
capella2polarion/converters/element_converter.py Outdated Show resolved Hide resolved
capella2polarion/converters/element_converter.py Outdated Show resolved Hide resolved
capella2polarion/converters/converter_config.py Outdated Show resolved Hide resolved
Comment on lines +121 to +124
input_str = ";".join(
remove_width_and_height(eit).model_dump_json()
for eit in elk_input
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be necessary and does not really look clean to me. You could argue that mocking the elk_input instead is fine as it should be tested in context_diagrams, but I would prefer to work with real input here to ensure that we know, if an update of context diagrams changes the rendering of diagrams

Copy link
Member Author

Choose a reason for hiding this comment

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

The width and height calculations depend from the used platform (MacOS, Linux or Windows). They are not important for identifying if the context-diagram changed, the collected input elements are reliable and give developers the freedom of choice for their used platform without broken tests.

@ewuerger ewuerger requested a review from micha91 December 13, 2024 17:22
@ewuerger ewuerger force-pushed the add-realization-view branch from 87b1dbf to d9191c9 Compare December 13, 2024 17:34
@ewuerger ewuerger changed the title feat: Add realization view and cable tree serializers feat: Add add_custom_diagrams serializer Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants