Skip to content

Commit 1006a99

Browse files
committed
docs: migrate to v8.0.0
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 1467b21 commit 1006a99

File tree

1 file changed

+47
-4
lines changed

1 file changed

+47
-4
lines changed

docs/upgrading.rst

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,54 @@ This document covers all breaking changes and should give guidance how to migrat
66

77
This document is not a full :doc:`change log <changelog>`, but a migration path.
88

9-
____
9+
Add this library to Metadata Tools
10+
----------------------------------
1011

11-
Downstream users SHOULD add the following to their BOM build processes, to keep track of used libraries for potential troubleshooting:
12+
This library no longer adds itself to the metadata.
1213

13-
```py
14+
Downstream users SHOULD add the following to their BOM build processes,
15+
to keep track of used libraries during the build process.
1416

17+
.. code-block:: python
1518
16-
```
19+
from cyclonedx.builder.this import this_component as cdx_lib_component
20+
from cyclonedx.model.bom import Bom
21+
22+
bom = Bom()
23+
bom.metadata.tools.components.add(cdx_lib_component())
24+
25+
Import model `Tool`
26+
-------------------
27+
28+
Class `cyclonedx.model.Tool` was moved to :class:`cyclonedx.model.tool.Tool`.
29+
Therefore, the imports need to be altered:
30+
31+
Old: ``from cyclonedx.model import Tool``
32+
33+
New: ``from cyclonedx.model.tool import Tool``
34+
35+
Altering Metadata Tools
36+
-----------------------
37+
38+
:prop:`cyclonedx.mode.bom.BomMetaData.tool` is an instance of :class:`cyclonedx.model.tool.ToolsRepository`, now.
39+
Therefore, the process of adding new tools was changed.
40+
41+
Old: ``my_bom.metadata.tools.add(my_tool)``
42+
43+
New: ``my_bom.metadata.tools.tools.add(my_tool)``
44+
45+
Altering Metadata Tools
46+
-----------------------
47+
48+
:prop:`cyclonedx.mode.vulnerability.Vulnerability.tools` is an instance of :class:`cyclonedx.model.tool.ToolsRepository`, now.
49+
Therefore, the process of adding new tools was changed.
50+
51+
Old: ``my_vulnerability.tools.add(my_tool)``
52+
53+
New: ``my_vulnerability.tools.tools.add(my_tool)``
54+
55+
:class:`cyclonedx.model.license.LicenseExpression()` no longer accepts optional arguments in a positional way, but in a key-word way.
56+
57+
Old: ``LicenseExpression(my_exp, my_acknowledgement)``
58+
59+
New: ``LicenseExpression(my_exp, acknowledgement=my_acknowledgement)``

0 commit comments

Comments
 (0)