capella2polarion package

The capella2polarion package.

Subpackages

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.

load_synchronize_config(synchronize_config_io: TextIO, type_prefix: str = '', role_prefix: str = '') None

Read the sync config into SynchronizeConfigContent.

  • example in /tests/data/model_elements/config.yaml

print_state() None

Print the State of the cli tool.

setup_logger() None

Set the logger in the right mood.

capella2polarion.data_models module

Module providing the CapellaWorkItem class.

class capella2polarion.data_models.CapellaWorkItem(id: str | None = None, title: str | None = None, description_type: str | None = None, description: str | None = None, type: str | None = None, status: str | None = None, additional_attributes: dict[str, Any] | None = None, linked_work_items: list[WorkItemLink] | None = None, attachments: list[WorkItemAttachment] | None = None, linked_work_items_truncated: bool = False, attachments_truncated: bool = False, **kwargs)

Bases: WorkItem

A WorkItem class with additional Capella related attributes.

class Condition

Bases: TypedDict

A class to describe a pre or post condition.

type: str
value: str
calculate_checksum() str

Calculate and return a checksum for this WorkItem.

In addition, the checksum will be written to self._checksum.

postCondition: Condition | None
preCondition: Condition | None
uuid_capella: str
class capella2polarion.data_models.DocumentData(document: Document, headings: list[WorkItem], text_work_item_provider: TextWorkItemProvider)

Bases: object

A class to store data related to a rendered document.

document: Document
headings: list[WorkItem]
text_work_item_provider: TextWorkItemProvider
class capella2polarion.data_models.DocumentInfo(project_id: str | None, module_folder: str, module_name: str, text_work_item_type: str, text_work_item_id_field: str)

Bases: object

Class for information regarding a document which should be created.

module_folder: str
module_name: str
project_id: str | None
text_work_item_id_field: str
text_work_item_type: str