capella2polarion package¶
The capella2polarion package.
Subpackages¶
- capella2polarion.connectors package
- Submodules
- capella2polarion.connectors.polarion_repo module
DocumentRepository
PolarionDataRepository
PolarionDataRepository.get_capella_uuid()
PolarionDataRepository.get_work_item_by_capella_uuid()
PolarionDataRepository.get_work_item_by_polarion_id()
PolarionDataRepository.get_work_item_id()
PolarionDataRepository.items()
PolarionDataRepository.remove_work_items_by_capella_uuid()
PolarionDataRepository.update_work_items()
check_work_items()
- capella2polarion.connectors.polarion_worker module
CapellaPolarionWorker
CapellaPolarionWorker.check_client()
CapellaPolarionWorker.compare_and_update_work_item()
CapellaPolarionWorker.compare_and_update_work_items()
CapellaPolarionWorker.create_documents()
CapellaPolarionWorker.create_missing_work_items()
CapellaPolarionWorker.delete_orphaned_work_items()
CapellaPolarionWorker.get_document()
CapellaPolarionWorker.get_missing_link_ids()
CapellaPolarionWorker.load_polarion_documents()
CapellaPolarionWorker.load_polarion_work_item_map()
CapellaPolarionWorker.update_attachments()
CapellaPolarionWorker.update_documents()
PolarionWorkerParams
WORK_ITEMS_IN_DOCUMENT_QUERY
- capella2polarion.data_model package
- Submodules
- capella2polarion.data_model.document_data module
- capella2polarion.data_model.work_item_attachments module
- capella2polarion.data_model.work_items module
- capella2polarion.documents package
- Submodules
- capella2polarion.documents.document_config module
BaseDocumentRenderingConfig
BaseDocumentRenderingConfig.heading_numbering
BaseDocumentRenderingConfig.instances
BaseDocumentRenderingConfig.model_config
BaseDocumentRenderingConfig.project_id
BaseDocumentRenderingConfig.status_allow_list
BaseDocumentRenderingConfig.template_directory
BaseDocumentRenderingConfig.text_work_item_id_field
BaseDocumentRenderingConfig.text_work_item_type
BaseDocumentRenderingConfig.work_item_layouts
DocumentConfigs
DocumentRenderingInstance
FullAuthorityDocumentRenderingConfig
MixedAuthorityDocumentRenderingConfig
SectionBasedDocumentRenderingInstance
WorkItemLayout
generate_work_item_layouts()
read_config_file()
- capella2polarion.documents.document_renderer module
- capella2polarion.documents.mass_document_renderer module
- capella2polarion.documents.text_work_item_provider module
- capella2polarion.elements package
- Submodules
- capella2polarion.elements.capella_object_renderer module
- capella2polarion.elements.converter_config module
- capella2polarion.elements.data_session module
- capella2polarion.elements.element_converter module
- capella2polarion.elements.link_converter module
- capella2polarion.elements.model_converter module
- capella2polarion.plugins package
load_plugins()
- Submodules
- capella2polarion.plugins.plugin_config module
- capella2polarion.plugins.plugin_interfaces module
AdditionalAttributes
AdditionalAttributes.document_rendering_config
AdditionalAttributes.force_update
AdditionalAttributes.generate_figure_captions
AdditionalAttributes.grouped_links_custom_fields
AdditionalAttributes.overwrite_layouts
AdditionalAttributes.overwrite_numbering
AdditionalAttributes.role_prefix
AdditionalAttributes.synchronize_config
AdditionalAttributes.type_prefix
PluginInterface
Submodules¶
capella2polarion.cli module¶
Tool for CLI work.
- class capella2polarion.cli.Capella2PolarionCli(debug: bool, polarion_project_id: str, polarion_url: str, polarion_pat: str, polarion_delete_work_items: bool, capella_model: MelodyModel | None, force_update: bool = False)¶
Bases:
object
Call Level Interface.
capella2polarion.polarion_html_helper module¶
Functions for polarion specific HTMl elements.
- class capella2polarion.polarion_html_helper.JinjaRendererMixin¶
Bases:
object
A MixIn for converters which should render jinja frequently.
- capella2polarion.polarion_html_helper.add_attachment_to_workitem(work_item: WorkItem, attachment: Capella2PolarionAttachment) None ¶
Add the attachment to the workitem and add a PNG version if needed.
- capella2polarion.polarion_html_helper.camel_case_to_words(camel_case_str: str) str ¶
Split camel or dromedary case and return it as a space separated str.
Handle prefixed underscores as well.
Examples
>>> camel_case_to_words("camelCase") 'Camel Case' >>> camel_case_to_words("_Prefix_camelCaseWithPrefix") 'Camel Case With Prefix (Prefix)'
- capella2polarion.polarion_html_helper.ensure_fragments(html_content: str | list[HtmlElement | str]) list[HtmlElement | str] ¶
Convert string to html elements.
- capella2polarion.polarion_html_helper.extract_headings(html_content: str | list[HtmlElement | str]) list[str] ¶
Return a list of work item IDs for all headings in the given content.
- capella2polarion.polarion_html_helper.extract_work_items(html_content: str | list[HtmlElement | str], tag_regex: Pattern | None = None) list[str] ¶
Return a list of work item IDs for work items in the given content.
- capella2polarion.polarion_html_helper.generate_image_html(title: str, attachment_id: str, max_width: int, cls: str, caption: tuple[str, str] | None = None) str ¶
Generate an image as HTMl with the given source.
- capella2polarion.polarion_html_helper.get_layout_index(default_layouter: str, rendering_layouts: list[RenderingLayout], work_item_type: str) int ¶
Return the index of the layout of the requested workitem.
If there is no rendering config yet, it will be created.
- capella2polarion.polarion_html_helper.remove_table_ids(html_content: str | list[HtmlElement | str]) list[HtmlElement | str] ¶
Remove the ID field from all tables.
This is necessary due to a bug in Polarion where Polarion does not ensure that the tables added in the UI have unique IDs. At the same time the REST-API does not allow posting or patching a document with multiple tables having the same ID.