python-ort 0.10.3__py3-none-any.whl → 0.10.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ from ort.models.vulnerabilities import Vulnerability
9
9
  from .advisor_details import AdvisorDetails
10
10
  from .advisor_summary import AdvisorSummary
11
11
  from .defect import Defect
12
+ from .health_metrics import HealthMetric
12
13
 
13
14
 
14
15
  class AdvisorResult(BaseModel):
@@ -21,7 +22,7 @@ class AdvisorResult(BaseModel):
21
22
  """
22
23
 
23
24
  model_config = ConfigDict(
24
- extra="forbid",
25
+ extra="allow",
25
26
  )
26
27
 
27
28
  advisor: AdvisorDetails = Field(
@@ -37,6 +38,11 @@ class AdvisorResult(BaseModel):
37
38
  description="The vulnerabilities.",
38
39
  )
39
40
 
41
+ health_metrics: list[HealthMetric] = Field(
42
+ default_factory=list,
43
+ description="The vulnerabilities.",
44
+ )
45
+
40
46
  defects: list[Defect] = Field(
41
47
  default_factory=list,
42
48
  repr=False,
@@ -0,0 +1,54 @@
1
+ # SPDX-FileCopyrightText: 2025 Helio Chissini de Castro <heliocastro@gmail.com>
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ from pydantic import AnyUrl, BaseModel, ConfigDict, Field
5
+
6
+ from ..utils.validated_enum import ValidatedIntEnum
7
+
8
+
9
+ class Criticality(ValidatedIntEnum):
10
+ """
11
+ A rating of how critical a health metric value is, sorted from least to most critical.
12
+ """
13
+
14
+ LOW = 1
15
+ MEDIUM = 2
16
+ HIGH = 3
17
+ CRITICAL = 4
18
+
19
+
20
+ class HealthMetric(BaseModel):
21
+ """
22
+ A data model for a health metric of a package, as returned by an advisor provider.
23
+ """
24
+
25
+ model_config = ConfigDict(
26
+ extra="forbid",
27
+ )
28
+
29
+ name: str = Field(
30
+ description="The unique, human-readable name of the health metric.",
31
+ )
32
+ value: float = Field(
33
+ description="The raw metric score as returned by the provider.",
34
+ )
35
+ criticality: Criticality | None = Field(
36
+ default=None,
37
+ description="A rating how critical the value is.",
38
+ )
39
+ reason: str | None = Field(
40
+ default=None,
41
+ description="The reason for the score.",
42
+ )
43
+ details: list[str] = Field(
44
+ default_factory=list,
45
+ description="Details about the findings.",
46
+ )
47
+ documentation: str | None = Field(
48
+ default=None,
49
+ description="Summary of documentation about the metric.",
50
+ )
51
+ documentation_link: AnyUrl | None = Field(
52
+ default=None,
53
+ description="Link to the documentation about the metric.",
54
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-ort
3
- Version: 0.10.3
3
+ Version: 0.10.5
4
4
  Summary: A Python Ort model serialization library
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -16,7 +16,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
16
  Requires-Dist: click>=8.5.0
17
17
  Requires-Dist: license-expression>=30.4.4
18
18
  Requires-Dist: packageurl-python>=0.17.6
19
- Requires-Dist: pydantic>=2.13.5
19
+ Requires-Dist: pydantic>=2.14.1
20
20
  Requires-Dist: pyyaml>=6.0.3
21
21
  Requires-Python: >=3.10
22
22
  Description-Content-Type: text/markdown
@@ -2,7 +2,7 @@ ort/__init__.py,sha256=dO9diS6jtQimfoWDHYV0Wl4Mv22jwInt1RXL6rAFnBo,469
2
2
  ort/models/__init__.py,sha256=gI6oB1yLk50mE3TA6BBGUhq0-mdT4iKz2gjW366tb-U,2393
3
3
  ort/models/advisor_capability.py,sha256=u1-yQI66jVWgrOacZdIEZ_zcK_A_qZ8ma0umJs01V1o,839
4
4
  ort/models/advisor_details.py,sha256=wo5h3uKD_94ukw9nUGOBKGonCd8CF8YcPkcu7XoBR_I,754
5
- ort/models/advisor_result.py,sha256=LgfZRPdERNDVcIW7hRqCPyudbWXJvlSTlBLWuAONrlM,1317
5
+ ort/models/advisor_result.py,sha256=abUU1MWcPX1bJEjxFfqo61LRMtRBeNYEOLDvuIF7pLE,1486
6
6
  ort/models/advisor_run.py,sha256=zpQTQI0bLEOoKiw_4hkm4f82XJbpoGlUtmTGeKmrU-4,903
7
7
  ort/models/advisor_summary.py,sha256=et272JooKGr4BzX4dEFKvpO8MKu1BDgj4kEXDCn1ZOs,813
8
8
  ort/models/analyzer_result.py,sha256=V2Admq_P0o2uS8goXT_rLSK0G_lh-1RXMxL8u8z5S38,1588
@@ -59,6 +59,7 @@ ort/models/dependency_reference.py,sha256=9fuqrF38c8bBW63Cp6sTnot-h2D3sGdkEuXR8S
59
59
  ort/models/evaluator_run.py,sha256=LsJJ-GMQKqdvJNdj3wnHMJuKD7EqojJ5VQKAPTzPFzY,467
60
60
  ort/models/file_list.py,sha256=SKHqLNutldJefNIzt7jKo6_aAdF9hlUd_Z7cQxAj_H4,1627
61
61
  ort/models/hash.py,sha256=fE1pPgx98WkmGid-SK3AuTBHMZrD6No1SJEEudrbP80,1160
62
+ ort/models/health_metrics.py,sha256=xmgMH4tLrS1A6Kjkn-bZDB4-myoNvlXlqIu3JV4cu5Y,1472
62
63
  ort/models/identifier.py,sha256=UebjaTB-v5q5UWID77eEh497DhV60dqP0gxXhHyocC0,2633
63
64
  ort/models/issue.py,sha256=nUMKRABe8tF6pZzCdaPt2tjdYFf5zRgEipy-o68Ym5M,1153
64
65
  ort/models/license_finding.py,sha256=8vlnBV0LMb8cerOpZl6YH1eYwVuViuh0VseD6Sai_q0,1897
@@ -112,8 +113,8 @@ ort/utils/validated_enum.py,sha256=UFAGP7BGzAx1nSBWEeMXn1X1teVb6507N-lfXBf5qGM,1
112
113
  ort/utils/yaml_loader.py,sha256=kOiuRV93_q_ZUnAqHoNohAvqL7fkUn66WrvrdbgZKHs,1290
113
114
  tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
114
115
  tools/ort_validate.py,sha256=drVJo2rHO-o8UkFu0K8rRK0ZoOYvoRCP9nG2rkys4Qg,1934
115
- python_ort-0.10.3.dist-info/licenses/LICENSE,sha256=koFhbHMglt1BNVuMKdBBlrQcgQsWLgo4pZW6cCtyGvA,1081
116
- python_ort-0.10.3.dist-info/WHEEL,sha256=7hzKWg-J8I3Buqyw5tBii5z_MmAVsDYXXijd_QAtNZ8,81
117
- python_ort-0.10.3.dist-info/entry_points.txt,sha256=v2_5_A1Rs4kGKx2g-6PZQoNwx_JlDy6pfWSjMNT_BMU,58
118
- python_ort-0.10.3.dist-info/METADATA,sha256=wn2JJakf4agFlqnXfcNWSX6Hh8BPJGyCLFYX3ofvfRU,1463
119
- python_ort-0.10.3.dist-info/RECORD,,
116
+ python_ort-0.10.5.dist-info/licenses/LICENSE,sha256=koFhbHMglt1BNVuMKdBBlrQcgQsWLgo4pZW6cCtyGvA,1081
117
+ python_ort-0.10.5.dist-info/WHEEL,sha256=si2p8vW03RnhyBnhWl4tj-ObJa78SpE-c9HsEtblGR0,80
118
+ python_ort-0.10.5.dist-info/entry_points.txt,sha256=v2_5_A1Rs4kGKx2g-6PZQoNwx_JlDy6pfWSjMNT_BMU,58
119
+ python_ort-0.10.5.dist-info/METADATA,sha256=Sz0EGEGLuHUPHGVZ7nm2Uq8Q5Uz6hnhXInNqw4cxNYk,1463
120
+ python_ort-0.10.5.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.12.18
2
+ Generator: uv 0.13.5
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any