ReqProject#

class ansys.scade.pyalmgw.documents.ReqProject(path: pathlib.Path | None = None, **kwargs)#

Bases: Element

Provides an implementation of a Requirements File.

Overview#

bind

Bind the traceability links.

parse

Build the project structure from a Requirements Document XML file.

read

Build the project structure from a Requirements Document XML file.

write

Serialize the project to a Requirements Document XML file.

children

Return the contained elements to be serialized as a dictionary.

depth

Return the maximum depth of a section.

Import detail#

from ansys.scade.pyalmgw.documents import ReqProject

Property detail#

property ReqProject.children: Dict[str, List[List[ReqObject]]]#

Return the contained elements to be serialized as a dictionary.

property ReqProject.depth: int#

Return the maximum depth of a section.

Attribute detail#

ReqProject.documents: List[ReqDocument] = []#
ReqProject.path = None#
ReqProject.xml_tag = 'ReqProject'#

Method detail#

ReqProject.bind() List[TraceabilityLink]#

Bind the traceability links.

Returns:
List[TraceabilityLink]

Traceability links that can’t be resolved.

ReqProject.parse(root: Any)#

Build the project structure from a Requirements Document XML file.

Parameters:
rootAny

Root element of the XML DOM.

ReqProject.read()#

Build the project structure from a Requirements Document XML file.

ReqProject.write(path: pathlib.Path | None = None)#

Serialize the project to a Requirements Document XML file.

Parameters:
pathPath

Path of the output file. Whene none, the file is saved to current path of the project.