python-ort 0.8.5__tar.gz → 0.8.7__tar.gz

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.
Files changed (115) hide show
  1. {python_ort-0.8.5 → python_ort-0.8.7}/PKG-INFO +1 -1
  2. {python_ort-0.8.5 → python_ort-0.8.7}/pyproject.toml +1 -1
  3. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/__init__.py +0 -2
  4. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/advisor_run.py +5 -0
  5. python_ort-0.8.7/src/ort/models/hash.py +39 -0
  6. python_ort-0.8.5/src/ort/models/hash.py +0 -19
  7. python_ort-0.8.5/src/ort/models/hash_algorithm.py +0 -116
  8. {python_ort-0.8.5 → python_ort-0.8.7}/LICENSE +0 -0
  9. {python_ort-0.8.5 → python_ort-0.8.7}/README.md +0 -0
  10. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/__init__.py +0 -0
  11. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/advisor_capability.py +0 -0
  12. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/advisor_details.py +0 -0
  13. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/advisor_result.py +0 -0
  14. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/advisor_summary.py +0 -0
  15. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/analyzer_result.py +0 -0
  16. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/analyzer_run.py +0 -0
  17. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/base_run.py +0 -0
  18. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/__init__.py +0 -0
  19. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/advisor_configuration.py +0 -0
  20. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/analyzer_configuration.py +0 -0
  21. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/curations.py +0 -0
  22. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/excludes.py +0 -0
  23. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/file_archiver_configuration.py +0 -0
  24. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/file_list_storage_configuration.py +0 -0
  25. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/file_storage_configuration.py +0 -0
  26. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/http_file_storage_configuration.py +0 -0
  27. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/includes.py +0 -0
  28. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/issue_resolution.py +0 -0
  29. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/issue_resolution_reason.py +0 -0
  30. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/license_choices.py +0 -0
  31. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/license_finding_curation.py +0 -0
  32. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/license_finding_curation_reason.py +0 -0
  33. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/local_file_storage_configuration.py +0 -0
  34. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/package_configuration.py +0 -0
  35. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/package_manager_configuration.py +0 -0
  36. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/path_exclude.py +0 -0
  37. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/path_exclude_reason.py +0 -0
  38. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/path_include.py +0 -0
  39. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/path_include_reason.py +0 -0
  40. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/postgres_connection.py +0 -0
  41. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/provenance_storage_configuration.py +0 -0
  42. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/repository_analyzer_configuration.py +0 -0
  43. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/repository_configuration.py +0 -0
  44. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/resolutions.py +0 -0
  45. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/rule_violation_reason.py +0 -0
  46. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/rule_violation_resolution.py +0 -0
  47. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/s3_file_storage_configuration.py +0 -0
  48. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/scan_storage_configuration.py +0 -0
  49. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/scanner_configuration.py +0 -0
  50. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/scope_exclude.py +0 -0
  51. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/scope_exclude_reason.py +0 -0
  52. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/snippet/__init__.py +0 -0
  53. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/snippet/snippet_choice.py +0 -0
  54. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/snippet/snippet_choice_reason.py +0 -0
  55. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/snippet/snippet_choices.py +0 -0
  56. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/snippet/snippet_provenance.py +0 -0
  57. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/vcsmatcher.py +0 -0
  58. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/vulnerability_resolution.py +0 -0
  59. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/config/vulnerability_resolution_reason.py +0 -0
  60. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/copyright_finding.py +0 -0
  61. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/defect.py +0 -0
  62. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/dependency_graph.py +0 -0
  63. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/dependency_graph_edge.py +0 -0
  64. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/dependency_graph_node.py +0 -0
  65. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/dependency_reference.py +0 -0
  66. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/evaluator_run.py +0 -0
  67. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/file_list.py +0 -0
  68. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/identifier.py +0 -0
  69. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/issue.py +0 -0
  70. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/license_finding.py +0 -0
  71. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/license_source.py +0 -0
  72. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/ort_result.py +0 -0
  73. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/package.py +0 -0
  74. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/package_curation.py +0 -0
  75. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/package_curation_data.py +0 -0
  76. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/package_linkage.py +0 -0
  77. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/package_reference.py +0 -0
  78. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/project.py +0 -0
  79. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/provenance.py +0 -0
  80. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/provenance_resolution_result.py +0 -0
  81. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/remote_artifact.py +0 -0
  82. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/repository.py +0 -0
  83. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/resolutions.py +0 -0
  84. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/root_dependency_index.py +0 -0
  85. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/rule_violation.py +0 -0
  86. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/scan_result.py +0 -0
  87. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/scan_summary.py +0 -0
  88. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/scanner_details.py +0 -0
  89. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/scanner_run.py +0 -0
  90. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/scope.py +0 -0
  91. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/severity.py +0 -0
  92. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/snippet.py +0 -0
  93. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/snippet_finding.py +0 -0
  94. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/source_code_origin.py +0 -0
  95. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/text_location.py +0 -0
  96. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vcsinfo.py +0 -0
  97. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vcsinfo_curation_data.py +0 -0
  98. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vcstype.py +0 -0
  99. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vulnerabilities/__init__.py +0 -0
  100. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vulnerabilities/cvss2_rating.py +0 -0
  101. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vulnerabilities/cvss3_rating.py +0 -0
  102. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vulnerabilities/cvss4_rating.py +0 -0
  103. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vulnerabilities/vulnerability.py +0 -0
  104. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/models/vulnerabilities/vulnerability_reference.py +0 -0
  105. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/severity.py +0 -0
  106. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/types/__init__.py +0 -0
  107. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/types/purl_type.py +0 -0
  108. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/utils/__init__.py +0 -0
  109. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/utils/environment.py +0 -0
  110. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/utils/processed_declared_license.py +0 -0
  111. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/utils/spdx/__init__.py +0 -0
  112. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/utils/spdx/spdx_expression.py +0 -0
  113. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/utils/spdx/spdx_license_choice.py +0 -0
  114. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/utils/validated_enum.py +0 -0
  115. {python_ort-0.8.5 → python_ort-0.8.7}/src/ort/utils/yaml_loader.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-ort
3
- Version: 0.8.5
3
+ Version: 0.8.7
4
4
  Summary: A Python Ort model serialization library
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "python-ort"
7
- version = "0.8.5"
7
+ version = "0.8.7"
8
8
  description = "A Python Ort model serialization library"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -18,7 +18,6 @@ from .dependency_graph_edge import DependencyGraphEdge
18
18
  from .dependency_graph_node import DependencyGraphNode
19
19
  from .dependency_reference import DependencyReference
20
20
  from .hash import Hash
21
- from .hash_algorithm import HashAlgorithm
22
21
  from .identifier import Identifier
23
22
  from .issue import Issue
24
23
  from .ort_result import OrtResult
@@ -48,7 +47,6 @@ __all__ = [
48
47
  "DependencyGraphNode",
49
48
  "DependencyReference",
50
49
  "Hash",
51
- "HashAlgorithm",
52
50
  "Identifier",
53
51
  "Includes",
54
52
  "Excludes",
@@ -8,6 +8,7 @@ from .advisor_result import AdvisorResult
8
8
  from .base_run import BaseRun
9
9
  from .config.advisor_configuration import AdvisorConfiguration
10
10
  from .identifier import Identifier
11
+ from .issue import Issue
11
12
 
12
13
 
13
14
  class AdvisorRun(BaseRun):
@@ -19,6 +20,10 @@ class AdvisorRun(BaseRun):
19
20
  config: AdvisorConfiguration = Field(
20
21
  description="The [AdvisorConfiguration] used for this run.",
21
22
  )
23
+ provider_issues: set[Issue] = Field(
24
+ default_factory=set,
25
+ description="The [Issue]s that occurred while preparing and querying advisor providers for this run.",
26
+ )
22
27
  results: dict[Identifier, list[AdvisorResult]] = Field(
23
28
  default_factory=dict,
24
29
  description="The result of this run.",
@@ -0,0 +1,39 @@
1
+ # SPDX-FileCopyrightText: 2025 Helio Chissini de Castro <heliocastro@gmail.com>
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ from pydantic import BaseModel, Field, field_validator
5
+
6
+ ALGO_LIST: dict[str, list] = {
7
+ "MD5": ["MD5"],
8
+ "SHA1": ["SHA-1", "SHA1"],
9
+ "SHA256": ["SHA-256", "SHA256"],
10
+ "SHA384": ["SHA-384", "SHA384"],
11
+ "SHA512": ["SHA-512", "SHA512"],
12
+ "SHA1GIT": ["SHA-1-GIT", "SHA1-GIT", "SHA1GIT", "SWHID"],
13
+ }
14
+
15
+
16
+ class Hash(BaseModel):
17
+ """
18
+ A class that bundles a hash algorithm with its hash value.
19
+
20
+ Attributes:
21
+ value (str): The value calculated using the hash algorithm.
22
+ algorithm (HashAlgorithm): The algorithm used to calculate the hash value.
23
+ """
24
+
25
+ value: str = Field(
26
+ description="The value calculated using the hash algorithm.",
27
+ )
28
+ algorithm: str = Field(
29
+ default="NONE",
30
+ description="The algorithm used to calculate the hash value.",
31
+ )
32
+
33
+ @field_validator("algorithm", mode="before")
34
+ @classmethod
35
+ def validate_algorithm(cls, value):
36
+ for key, item in ALGO_LIST.items():
37
+ if value in item:
38
+ return key
39
+ return "UNKNOWN"
@@ -1,19 +0,0 @@
1
- # SPDX-FileCopyrightText: 2025 Helio Chissini de Castro <heliocastro@gmail.com>
2
- # SPDX-License-Identifier: MIT
3
-
4
- from pydantic import BaseModel, Field
5
-
6
- from .hash_algorithm import HashAlgorithm
7
-
8
-
9
- class Hash(BaseModel):
10
- """
11
- A class that bundles a hash algorithm with its hash value.
12
-
13
- Attributes:
14
- value (str): The value calculated using the hash algorithm.
15
- algorithm (HashAlgorithm): The algorithm used to calculate the hash value.
16
- """
17
-
18
- value: str = Field(description="The value calculated using the hash algorithm.")
19
- algorithm: HashAlgorithm = Field(description="The algorithm used to calculate the hash value.")
@@ -1,116 +0,0 @@
1
- # SPDX-FileCopyrightText: 2025 Helio Chissini de Castro <heliocastro@gmail.com>
2
- # SPDX-License-Identifier: MIT
3
-
4
- from typing import ClassVar
5
-
6
- from pydantic import BaseModel, Field, model_validator
7
-
8
-
9
- class HashAlgorithm(BaseModel):
10
- """
11
- A Python port of the Kotlin HashAlgorithm enum class.
12
-
13
- Each algorithm has one or more aliases, an empty hash value,
14
- and an 'is_verifiable' flag.
15
- """
16
-
17
- aliases: list[str] = Field(default_factory=list)
18
- empty_value: str = ""
19
- is_verifiable: bool = True
20
-
21
- # ---- known algorithms ----
22
- NONE: ClassVar["HashAlgorithm"]
23
- UNKNOWN: ClassVar["HashAlgorithm"]
24
- MD5: ClassVar["HashAlgorithm"]
25
- SHA1: ClassVar["HashAlgorithm"]
26
- SHA256: ClassVar["HashAlgorithm"]
27
- SHA384: ClassVar["HashAlgorithm"]
28
- SHA512: ClassVar["HashAlgorithm"]
29
- SHA1GIT: ClassVar["HashAlgorithm"]
30
-
31
- # ---- derived property ----
32
- @property
33
- def size(self) -> int:
34
- """The length of the empty hash string for this algorithm."""
35
- return len(self.empty_value)
36
-
37
- # ---- validation ----
38
- @model_validator(mode="before")
39
- @classmethod
40
- def _from_alias(cls, value):
41
- """Allow initialization from alias string."""
42
- if isinstance(value, str):
43
- algo = cls.from_string(value)
44
- return algo.model_dump()
45
- return value
46
-
47
- # ---- class methods ----
48
- @classmethod
49
- def from_string(cls, alias: str) -> "HashAlgorithm":
50
- """Find a HashAlgorithm by alias name (case-insensitive)."""
51
- alias_upper = alias.upper()
52
- for algo in cls._entries():
53
- if any(a.upper() == alias_upper for a in algo.aliases):
54
- return algo
55
- return cls.UNKNOWN
56
-
57
- @classmethod
58
- def create(cls, value: str) -> "HashAlgorithm":
59
- """
60
- Create a HashAlgorithm from a hash value string, based on its length.
61
- Returns NONE if value is blank, UNKNOWN otherwise.
62
- """
63
- if not value.strip():
64
- return cls.NONE
65
- for algo in cls._entries():
66
- if len(value) == algo.size:
67
- return algo
68
- return cls.UNKNOWN
69
-
70
- @classmethod
71
- def _entries(cls) -> list["HashAlgorithm"]:
72
- """Return the list of all defined algorithms."""
73
- return [
74
- cls.NONE,
75
- cls.UNKNOWN,
76
- cls.MD5,
77
- cls.SHA1,
78
- cls.SHA256,
79
- cls.SHA384,
80
- cls.SHA512,
81
- cls.SHA1GIT,
82
- ]
83
-
84
- def __str__(self) -> str:
85
- return self.aliases[0] if self.aliases else ""
86
-
87
-
88
- HashAlgorithm.NONE = HashAlgorithm(aliases=[""], empty_value="", is_verifiable=False)
89
- HashAlgorithm.UNKNOWN = HashAlgorithm(aliases=["UNKNOWN"], empty_value="", is_verifiable=False)
90
- HashAlgorithm.MD5 = HashAlgorithm(
91
- aliases=["MD5"],
92
- empty_value="d41d8cd98f00b204e9800998ecf8427e",
93
- )
94
- HashAlgorithm.SHA1 = HashAlgorithm(
95
- aliases=["SHA-1", "SHA1"],
96
- empty_value="da39a3ee5e6b4b0d3255bfef95601890afd80709",
97
- )
98
- HashAlgorithm.SHA256 = HashAlgorithm(
99
- aliases=["SHA-256", "SHA256"],
100
- empty_value="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
101
- )
102
- HashAlgorithm.SHA384 = HashAlgorithm(
103
- aliases=["SHA-384", "SHA384"],
104
- empty_value=("38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b"),
105
- )
106
- HashAlgorithm.SHA512 = HashAlgorithm(
107
- aliases=["SHA-512", "SHA512"],
108
- empty_value=(
109
- "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce"
110
- "47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e"
111
- ),
112
- )
113
- HashAlgorithm.SHA1GIT = HashAlgorithm(
114
- aliases=["SHA-1-GIT", "SHA1-GIT", "SHA1GIT", "SWHID"],
115
- empty_value="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
116
- )
File without changes
File without changes