@@ -1303,9 +1303,14 @@ def get_bom_with_definitions_standards() -> Bom:
13031303 """
13041304 return _make_bom (
13051305 definitions = Definitions (standards = [
1306- Standard (name = 'Some Standard' , version = '1.2.3' , description = 'Some description' , bom_ref = 'some-standard' ,
1307- owner = 'Some Owner' , external_references = [get_external_reference_2 ()]
1308- )
1306+ Standard (
1307+ bom_ref = 'some-standard' ,
1308+ name = 'Some Standard' ,
1309+ version = '1.2.3' ,
1310+ description = 'Some description' ,
1311+ owner = 'Some Owner' ,
1312+ external_references = [get_external_reference_2 ()]
1313+ )
13091314 ])
13101315 )
13111316
@@ -1315,44 +1320,78 @@ def get_bom_with_definitions_and_detailed_standards() -> Bom:
13151320 Returns a BOM with definitions and multiple detailed standards including requirements and levels.
13161321 """
13171322 return _make_bom (
1318- definitions = Definitions (
1319- standards = [
1320- Standard (name = 'Some Standard' , version = '1.2.3' , description = 'Some description' , bom_ref = 'some-standard' ,
1321- owner = 'Some Owner' , external_references = [get_external_reference_1 ()],
1322- requirements = [
1323- Requirement (identifier = 'REQ-1' , title = 'Requirement 1' , text = 'some requirement text' ,
1324- bom_ref = 'req-1' , descriptions = ['Requirement 1 described here' , 'and here' ],
1325- open_cre = [CreId ('CRE:1-2' )], properties = [Property (name = 'key1' , value = 'val1' )]
1326- ),
1327- Requirement (identifier = 'REQ-2' , title = 'Requirement 2' , text = 'some requirement text' ,
1328- bom_ref = 'req-2' , descriptions = ['Requirement 2 described here' ],
1329- open_cre = [CreId ('CRE:1-2' ), CreId ('CRE:3-4' )],
1330- properties = [Property (name = 'key2' , value = 'val2' )],
1331- parent = 'req-1'
1332- ),
1333- ],
1334- levels = [
1335- Level (identifier = 'LVL-1' , title = 'Level 1' , description = 'Level 1 description' ,
1336- bom_ref = 'lvl-1' , ),
1337- Level (identifier = 'LVL-2' , title = 'Level 2' , description = 'Level 2 description' ,
1338- bom_ref = 'lvl-2' , )
1339- ]),
1340- Standard (name = 'Other Standard' , version = '1.0.0' , description = 'Other description' ,
1341- bom_ref = 'other-standard' , owner = 'Other Owner' ,
1342- external_references = [get_external_reference_2 ()],
1343- requirements = [
1344- Requirement (identifier = 'REQ-3' , title = 'Requirement 3' , text = 'some requirement text' ,
1345- bom_ref = 'req-3' , descriptions = ['Requirement 3 described here' , 'and here' ],
1346- open_cre = [CreId ('CRE:5-6' ), CreId ('CRE:7-8' )],
1347- properties = [Property (name = 'key3' , value = 'val3' )]
1348- )
1349- ],
1350- levels = [
1351- Level (identifier = 'LVL-3' , title = 'Level 3' , description = 'Level 3 description' ,
1352- bom_ref = 'lvl-3' , )
1353- ])
1354- ]
1355- ))
1323+ definitions = Definitions (standards = [
1324+ Standard (
1325+ bom_ref = 'some-standard' ,
1326+ name = 'Some Standard' ,
1327+ version = '1.2.3' ,
1328+ description = 'Some description' ,
1329+ owner = 'Some Owner' ,
1330+ external_references = [get_external_reference_1 ()],
1331+ requirements = [
1332+ Requirement (
1333+ bom_ref = 'req-1' ,
1334+ identifier = 'REQ-1' ,
1335+ title = 'Requirement 1' ,
1336+ text = 'some requirement text' ,
1337+ descriptions = ['Requirement 1 described here' , 'and here' ],
1338+ open_cre = [CreId ('CRE:1-2' )],
1339+ properties = [Property (name = 'key1' , value = 'val1' )]
1340+ ),
1341+ Requirement (
1342+ bom_ref = 'req-2' ,
1343+ identifier = 'REQ-2' ,
1344+ title = 'Requirement 2' ,
1345+ text = 'some requirement text' ,
1346+ descriptions = ['Requirement 2 described here' ],
1347+ open_cre = [CreId ('CRE:1-2' ), CreId ('CRE:3-4' )],
1348+ properties = [Property (name = 'key2' , value = 'val2' )],
1349+ parent = 'req-1'
1350+ ),
1351+ ],
1352+ levels = [
1353+ Level (
1354+ bom_ref = 'lvl-1' ,
1355+ identifier = 'LVL-1' ,
1356+ title = 'Level 1' ,
1357+ description = 'Level 1 description'
1358+ ),
1359+ Level (
1360+ bom_ref = 'lvl-2' ,
1361+ identifier = 'LVL-2' ,
1362+ title = 'Level 2' ,
1363+ description = 'Level 2 description'
1364+ )
1365+ ]
1366+ ),
1367+ Standard (
1368+ bom_ref = 'other-standard' ,
1369+ name = 'Other Standard' ,
1370+ version = '1.0.0' ,
1371+ description = 'Other description' ,
1372+ owner = 'Other Owner' ,
1373+ external_references = [get_external_reference_2 ()],
1374+ requirements = [
1375+ Requirement (
1376+ bom_ref = 'req-3' ,
1377+ identifier = 'REQ-3' ,
1378+ title = 'Requirement 3' ,
1379+ text = 'some requirement text' ,
1380+ descriptions = ['Requirement 3 described here' , 'and here' ],
1381+ open_cre = [CreId ('CRE:5-6' ), CreId ('CRE:7-8' )],
1382+ properties = [Property (name = 'key3' , value = 'val3' )]
1383+ )
1384+ ],
1385+ levels = [
1386+ Level (
1387+ bom_ref = 'lvl-3' ,
1388+ identifier = 'LVL-3' ,
1389+ title = 'Level 3' ,
1390+ description = 'Level 3 description'
1391+ )
1392+ ]
1393+ )
1394+ ]))
13561395
13571396
13581397# ---
0 commit comments