SW-Requirements

pyTRLCConverter

This file contains the software requirements for the pyTRLCConverter tool.

PyTRLCConverter Tool Flow

PyTRLCConverter Tool Flow

Software Requirements

General

sw_req_cli

Attribute Name

Attribute Value

Description

The software shall be a command-line interface (CLI) application.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Every feature shall be accessible via the command line. Therefore its verified by the CLI tests.

sw_req_translation

Attribute Name

Attribute Value

Description

The software shall support the requirement type attribute name translation via a translation file in JSON format.

Valid Status

VALID_STATUS.valid

Note

Some attribute names may contain underscores or other special characters. These shall be translated to a humand readable names.

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files with a translation file.

sw_req_render_configuration

Attribute Name

Attribute Value

Description

The software shall support to specify the format of a string literal via a render configuration in JSON format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files with a render configuration file.

sw_req_prj_spec

Attribute Name

Attribute Value

Description

The software shall support project specific adaptions for the conversion.

Valid Status

VALID_STATUS.valid

Note

Every project might have different requirements how the converted output should look like.

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files with a project specific conversion file.

sw_req_version

Attribute Name

Attribute Value

Description

The software shall provide a version information in the format ‘<program-name> <major>.<minor>.<patch>’.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by requesting the version information and use the format ‘<program-name> <major>.<minor>.<patch>’.

sw_req_process_trlc_symbols

Attribute Name

Attribute Value

Description

The software shall process all TRLC symbols from the TRLC files.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify DumpConverter output against a known good reference.

sw_req_destination_format

Attribute Name

Attribute Value

Description

The software shall convert the TRLC files to the required destination format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting to one or more destination formats. Depended on the available formats.

sw_req_verbose_mode

Attribute Name

Attribute Value

Description

The software shall show additional conversion information in verbose mode.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files with the verbose mode enabled.

sw_req_error

Attribute Name

Attribute Value

Description

The software shall log any error message on stderr.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by calling the software with no or invalid arguments.

Project Specific Conversion

sw_req_prj_spec_file

Attribute Name

Attribute Value

Description

The project specific conversion file shall be a Python file.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

Verification Criteria

Verify by converting one or more TRLC files with a project specific conversion file.

sw_req_prj_spec_interface

Attribute Name

Attribute Value

Description

The project specific conversion interface shall be realized by an abstract interface.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files with a project specific conversion file.

Command Line Arguments

The following requirements describe the general command line arguments supported by the software. They are independent of the destination format.

sw_req_cli_help

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘-h’ and --help’ to show the help information.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by calling the software with the argument ‘--help’ and check if the help information is shown.

sw_req_cli_verbose

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘-v’ and ‘--verbose’ to enable verbose mode.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

Verification Criteria

Verify by calling the software with the argument ‘--verbose’ and check if the verbose output is shown.

sw_req_cli_version

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘--version’ to show the version information.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

Verification Criteria

Verify by calling the software with the argument ‘--version’ and check if the version information is shown.

sw_req_cli_source

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘-s’ and ‘--source’ multiple times to specify the source file(s) (*.rsl and *.trlc).

Valid Status

VALID_STATUS.valid

Note

Source files will be given to TRLC for conversion.

Derived

N/A

Verification Criteria

Verify by calling the software with the argument ‘--source’ and check if the source file(s) are used for conversion.

sw_req_cli_include

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘-i’ and ‘--include’ multiple times to specify the file(s) for automatic inclusion.

Valid Status

VALID_STATUS.valid

Note

Its equal to TRLC --include program argument.

Derived

N/A

Verification Criteria

Verify by calling the software with the argument ‘--include’ and check if the file(s) are included.

sw_req_cli_exclude

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘-ex’ and ‘--exclude’ multiple times to specify the file(s) for automatic exclusion.

Valid Status

VALID_STATUS.valid

Note

This is necessary in case an defined archtecture element traces to a requirement, but the requirement should not be included in the output.

Derived

N/A

Verification Criteria

Verify by calling the software with the argument ‘--exclude’ and check if the file(s) are excluded.

sw_req_no_prj_spec

Attribute Name

Attribute Value

Description

If no project specific conversion file is provided, the software shall use a default conversion.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files without a project specific conversion file.

sw_req_cli_out

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘-o’ and ‘--out’ to specify the output directory.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by calling the software with the argument ‘--out’ and check if the output is written to the specified directory.

sw_req_cli_translation

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘-tr’ and ‘--translation’ to specify the translation JSON file.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by calling the software with the argument ‘--translation’ and check if the output is written to the specified directory.

sw_req_cli_render_cfg

Attribute Name

Attribute Value

Description

The software shall support the command line argument ‘-rc’ and ‘--renderCfg’ to specify the render configuration JSON file.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by calling the software with the argument ‘--renderCfg’ and check if e.g. Markdown is rendered correctly for string literals.

Markdown

The following requirements describe the Markdown destination format supported by the software.

sw_req_markdown

Attribute Name

Attribute Value

Description

The software shall support the conversion into Markdown format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into Markdown format.

sw_req_markdown_section

Attribute Name

Attribute Value

Description

The Markdown converter shall convert a TRLC section into a Markdown heading by considering the depth level.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting a TRLC section into a Markdown heading.

sw_req_markdown_record

Attribute Name

Attribute Value

Description

The Markdown converter shall convert the attributes of a TRLC record into a Markdown table.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting consecutive TRLC records into a Markdown table.

sw_req_markdown_escape

Attribute Name

Attribute Value

Description

The software shall escape strings according the Markdown format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by using strings with characters, which needs escaping.

sw_req_markdown_string_format

Attribute Name

Attribute Value

Description

The software shall not escape strings that are already in Markdown format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by using strings in Markdown format, which needs no escaping.

sw_req_markdown_heading

Attribute Name

Attribute Value

Description

The Markdown converter shall provide a function to create a Markdown heading.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a Markdown heading.

sw_req_markdown_table

Attribute Name

Attribute Value

Description

The Markdown converter shall provide the functionality to create a Markdown table.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a Markdown table.

sw_req_markdown_list

Attribute Name

Attribute Value

Description

The Markdown converter shall provide a function to create a Markdown list, as well as a HTML list.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a Markdown list.

sw_req_markdown_image

Attribute Name

Attribute Value

Description

The Markdown converter shall provide a function to create a Markdown image to embed images.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a Markdown image.

sw_req_markdown_text_color

Attribute Name

Attribute Value

Description

The Markdown converter shall provide a function to create colored text in Markdown format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating colored text in Markdown format.

sw_req_markdown_soft_return

Attribute Name

Attribute Value

Description

The Markdown converter shall provide a function to convert a line feed to Markdown soft return.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a text with one and more line feeds.

sw_req_markdown_out_folder

Attribute Name

Attribute Value

Description

The Markdown converter shall create the converted files in the specified output folder.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by specifing an output folder, that doesn’t exist. It must exist after the conversion.

Multiple Documents Mode

sw_req_markdown_multiple_doc_mode

Attribute Name

Attribute Value

Description

The software shall create a Markdown file for each TRLC file by default.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into Markdown format and check if a Markdown file is created for each TRLC file.

sw_req_markdown_md_top_level

Attribute Name

Attribute Value

Description

The software shall add a top level heading to the Markdown file if there is no top level section.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify the top level heading in the Markdown file in multiple doc mode.

Single Document Mode

sw_req_markdown_single_doc_mode

Attribute Name

Attribute Value

Description

The software shall create a single Markdown file which combines all TRLC files if requested by command line arguments.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into Markdown format and check if a single Markdown file is created.

sw_req_markdown_out_file_name_default

Attribute Name

Attribute Value

Description

The output file name shall be ‘output.md’ by default.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into Markdown format and check if the output file name is ‘output.md’.

sw_req_markdown_out_file_name_custom

Attribute Name

Attribute Value

Description

The output file name shall be customizable by command line arguments.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into Markdown format and check if the output file name is customizable.

sw_req_markdown_sd_top_level

Attribute Name

Attribute Value

Description

The software shall add a top level heading to the Markdown file in single doc mode.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify the top level heading in the Markdown file in single doc mode.

sw_req_markdown_top_level_default

Attribute Name

Attribute Value

Description

The top level heading shall be ‘Specification’ by default.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify the top level heading in the Markdown file in single doc mode.

sw_req_markdown_top_level_custom

Attribute Name

Attribute Value

Description

The top level heading shall be customizable by command line arguments.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by specifying a custom top level heading in the Markdown file in single doc mode.

Markdown Render Configuration

sw_req_markdown_render_md

Attribute Name

Attribute Value

Description

The software shall render strings in Markdown format if specified in the render configuration.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by using strings in Markdown format, which needs no escaping.

reStructuredText

The following requirements describe the reStructuredText destination format supported by the software.

sw_req_rst

Attribute Name

Attribute Value

Description

The software shall support the conversion into reStructuredText format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into reStructuredText format.

sw_req_rst_section

Attribute Name

Attribute Value

Description

The reStructuredText converter shall convert a TRLC section into a reStructuredText heading by considering the depth level.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting a TRLC section into a reStructuredText heading.

sw_req_rst_record

Attribute Name

Attribute Value

Description

The reStructuredText converter shall convert the attributes of a TRLC record into a reStructuredText admonition with a table.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting consecutive TRLC records into a reStructuredText admonition with a table.

sw_req_rst_escape

Attribute Name

Attribute Value

Description

The software shall escape all strings according the reStructuredText format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by using strings with characters, which needs escaping.

sw_req_rst_string_format

Attribute Name

Attribute Value

Description

The software shall not escape strings that are already in reStructuredText format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by using strings in reStructuredText format, which needs no escaping.

sw_req_rst_string_format_md

Attribute Name

Attribute Value

Description

The software shall convert strings in Markdown format to reStructuredText format without escaping.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by using strings in Markdown format, which are converted and needs no escaping.

sw_req_rst_heading

Attribute Name

Attribute Value

Description

The reStructuredText converter shall provide a function to create a reStructuredText heading.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a reStructuredText heading.

sw_req_rst_admonition

Attribute Name

Attribute Value

Description

The reStructuredText converter shall provide a function to create a reStructuredText admonition.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a reStructuredText admonition.

sw_req_rst_table

Attribute Name

Attribute Value

Description

The reStructuredText converter shall provide a function to create a reStructuredText table.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a reStructuredText table.

sw_req_rst_list

Attribute Name

Attribute Value

Description

The reStructuredText converter shall provide a function to create a reStructuredText list.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a reStructuredText list.

sw_req_rst_image

Attribute Name

Attribute Value

Description

The reStructuredText converter shall provide a function to create a reStructuredText image to embed images.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating a reStructuredText image.

sw_req_rst_role

Attribute Name

Attribute Value

Description

The reStructuredText converter shall provide a function to create role text in reStructuredText format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by creating role text in reStructuredText format.

sw_req_rst_out_folder

Attribute Name

Attribute Value

Description

The reStructuredText converter shall create the converted files in the specified output folder.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by specifing an output folder, that doesn’t exist. It must exist after the conversion.

ReStructuredText Multiple Documents Mode

sw_req_rst_multiple_doc_mode

Attribute Name

Attribute Value

Description

The software shall create a reStructuredText file for each TRLC file by default.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into reStructuredText format and check if a reStructuredText file is created for each TRLC file.

ReStructuredText Single Document Mode

sw_req_rst_single_doc_mode

Attribute Name

Attribute Value

Description

The software shall create a single reStructuredText file which combines all TRLC files if requested by command line arguments.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into reStructuredText format and check if a single reStructuredText file is created.

sw_req_rst_out_file_name_default

Attribute Name

Attribute Value

Description

The output file name shall be ‘output.rst’ by default.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into reStructuredText format and check if the output file name is ‘output.rst’.

sw_req_rst_out_file_name_custom

Attribute Name

Attribute Value

Description

The output file name shall be customizable by command line arguments.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into reStructuredText format and check if the output file name is customizable.

sw_req_rst_sd_top_level

Attribute Name

Attribute Value

Description

The software shall add a top level heading to the reStructuredText file in single doc mode.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify the top level heading in the reStructuredText file in single doc mode.

sw_req_rst_sd_top_level_default

Attribute Name

Attribute Value

Description

The top level heading shall be ‘Specification’ by default.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify the top level heading in the reStructuredText file in single doc mode.

sw_req_rst_sd_top_level_custom

Attribute Name

Attribute Value

Description

The top level heading shall be customizable by command line arguments.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by specifying a custom top level heading in the reStructuredText file in single doc mode.

ReStructuredText Render Configuration

sw_req_rst_render_md

Attribute Name

Attribute Value

Description

The software shall convert strings in Markdown format to reStructuredText format if specified in the render configuration.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by using strings in Markdown format, that are converted.

Docx

The following requirements describe the docx destination format supported by the software.

sw_req_docx

Attribute Name

Attribute Value

Description

The software shall support the conversion into docx format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into Docx format.

sw_req_docx_template

Attribute Name

Attribute Value

Description

The software shall support loading a docx template to append docx content to.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify that the generated docx file format starts with the content of the given template.

sw_req_docx_file

Attribute Name

Attribute Value

Description

The software shall create a combined docx file for each TRLC file in file read order as provided by TRLC.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files into docx format and check if a merged docx file is generated as expected.

sw_req_docx_section

Attribute Name

Attribute Value

Description

If no project specific conversion file is available, a TRLC section shall be converted into a Docx heading by considering the depth level.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting a TRLC section into a docx heading.

sw_req_docx_record

Attribute Name

Attribute Value

Description

If no project specific conversion file is available, consecutive TRLC records shall be converted into a docx heading with depth+1 and a table listing the attributes.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting consecutive TRLC records into a docx file.

ReStructuredText Render Configuration

sw_req_docx_render_md

Attribute Name

Attribute Value

Description

The software shall convert strings in Markdown format to docx format if specified in the render configuration.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by using strings in Markdown format, that are converted.

Dump

The following requirements describe the dump destination format supported by the software.

sw_req_ascii_conversion

Attribute Name

Attribute Value

Description

The software shall support a simple conversion into text format to console out.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting one or more TRLC files using the dump converter.

PlantUML

The following requirements describe the PlantUML destination format supported by the software.

sw_req_plantuml

Attribute Name

Attribute Value

Description

The software shall support the conversion of a PlantUML diagram to a propriate image format.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

Verification Criteria

Verify by converting a PlantUML diagram into a propriate image format.

Software Constraints

sw_constraint_os_win

Attribute Name

Attribute Value

Description

The software shall support the Windows operating system.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

sw_constraint_os_linux

Attribute Name

Attribute Value

Description

The software shall support the Linux operating system.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A

sw_constraint_prg_lang

Attribute Name

Attribute Value

Description

The software shall be implemented in the Python programming language v3.12.

Valid Status

VALID_STATUS.valid

Note

TRLC as 3rd party library supports only up to Python v3.12.

Derived

N/A

sw_constraint_pep8

Attribute Name

Attribute Value

Description

The software shall comply with the PEP8 coding standard.

Valid Status

VALID_STATUS.valid

Note

N/A

Derived

N/A