diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 91c45cc..fc86f84 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - '--fix=lf' - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.14.3' + rev: 'v0.14.4' hooks: - id: ruff args: [--fix] diff --git a/pyproject.toml b/pyproject.toml index 652e847..913ff8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ packages = ["src/ort"] [project] name = "python-ort" -version = "0.2.0" +version = "0.3.0" description = "A Python Ort model serialization library" readme = "README.md" license = "MIT" @@ -15,7 +15,6 @@ license-files = ["LICENSE"] requires-python = ">=3.10" dependencies = [ "pydantic>=2.12.4", - "pyyaml>=6.0.3", ] classifiers = [ "Development Status :: 3 - Alpha", @@ -25,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Software Development :: Libraries :: Python Modules", ] @@ -39,7 +39,7 @@ dev = [ "pycodestyle>=2.14.0", "pyrefly>=0.40.0", "pytest>=8.4.2", - "ruff>=0.14.3", + "ruff>=0.14.4", "types-pyyaml>=6.0.12.20250915", ] diff --git a/schemas/curations-schema.json b/schemas/curations-schema.json deleted file mode 100644 index eace2da..0000000 --- a/schemas/curations-schema.json +++ /dev/null @@ -1,1605 +0,0 @@ -{ - "$defs": { - "CurationsSchema": { - "description": "The OSS-Review-Toolkit (ORT) provides a possibility to correct metadata and set the concluded license for specific packages (dependencies) in curation files. A full list of all available options can be found at https://oss-review-toolkit.org/ort/docs/configuration/package-curations.", - "items": { - "$ref": "#/$defs/CurationsSchemaCurationsSchemaItem" - }, - "title": "CurationsSchema", - "type": "array" - }, - "CurationsSchemaCurationsSchemaItem": { - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "curations": { - "$ref": "#/$defs/CurationsSchemaCurationsSchemaItemCurations" - } - }, - "required": [ - "id", - "curations" - ], - "title": "CurationsSchemaCurationsSchemaItem", - "type": "object" - }, - "CurationsSchemaCurationsSchemaItemCurations": { - "properties": { - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - }, - "purl": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Purl" - }, - "cpe": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Cpe" - }, - "authors": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Authors" - }, - "concluded_license": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Concluded License" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Description" - }, - "homepage_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Homepage Url" - }, - "binary_artifact": { - "anyOf": [ - { - "$ref": "#/$defs/CurationsSchemaCurationsSchemaItemCurationsBinaryArtifact" - }, - { - "type": "null" - } - ], - "default": null - }, - "source_artifact": { - "anyOf": [ - { - "$ref": "#/$defs/CurationsSchemaCurationsSchemaItemCurationsBinaryArtifact" - }, - { - "type": "null" - } - ], - "default": null - }, - "vcs": { - "anyOf": [ - { - "$ref": "#/$defs/VcsMatcher" - }, - { - "type": "null" - } - ], - "default": null - }, - "is_metadata_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Is Metadata Only" - }, - "is_modified": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Is Modified" - }, - "declared_license_mapping": { - "additionalProperties": true, - "title": "Declared License Mapping", - "type": "object" - }, - "source_code_origins": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/SourceCodeOrigin" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Source Code Origins" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "title": "Labels", - "type": "object" - } - }, - "title": "CurationsSchemaCurationsSchemaItemCurations", - "type": "object" - }, - "CurationsSchemaCurationsSchemaItemCurationsBinaryArtifact": { - "properties": { - "url": { - "title": "Url", - "type": "string" - }, - "hash": { - "$ref": "#/$defs/Hash" - } - }, - "required": [ - "url", - "hash" - ], - "title": "CurationsSchemaCurationsSchemaItemCurationsBinaryArtifact", - "type": "object" - }, - "Hash": { - "properties": { - "value": { - "title": "Value", - "type": "string" - }, - "algorithm": { - "title": "Algorithm", - "type": "string" - } - }, - "required": [ - "value", - "algorithm" - ], - "title": "Hash", - "type": "object" - }, - "IssueResolutionReason": { - "enum": [ - "BUILD_TOOL_ISSUE", - "CANT_FIX_ISSUE", - "SCANNER_ISSUE" - ], - "title": "IssueResolutionReason", - "type": "string" - }, - "LicenseFindingCurationsModel": { - "properties": { - "path": { - "title": "Path", - "type": "string" - }, - "start_lines": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Start Lines" - }, - "line_count": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Line Count" - }, - "detected_license": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Detected License" - }, - "concluded_license": { - "title": "Concluded License", - "type": "string" - }, - "reason": { - "$ref": "#/$defs/PackageConfigurationSchemaLicenseFindingCurationReason" - }, - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - } - }, - "required": [ - "path", - "concluded_license", - "reason" - ], - "title": "LicenseFindingCurationsModel", - "type": "object" - }, - "OrtAnalyzerConfigurations": { - "additionalProperties": false, - "properties": { - "allow_dynamic_versions": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Allow Dynamic Versions" - }, - "enabled_package_managers": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtPackageManagers" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Enabled Package Managers" - }, - "disabled_package_managers": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtPackageManagers" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Disabled Package Managers" - }, - "package_managers": { - "anyOf": [ - { - "$ref": "#/$defs/OrtPackageManagerConfigurations" - }, - { - "type": "null" - } - ], - "default": null - }, - "sw360_configuration": { - "anyOf": [ - { - "$ref": "#/$defs/Sw360Configuration" - }, - { - "type": "null" - } - ], - "default": null - }, - "skip_excluded": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Skip Excluded" - } - }, - "title": "OrtAnalyzerConfigurations", - "type": "object" - }, - "OrtPackageManagerConfigurations": { - "additionalProperties": { - "$ref": "#/$defs/PackageManagerConfigs" - }, - "title": "OrtPackageManagerConfigurations", - "type": "object" - }, - "OrtPackageManagers": { - "description": "Enumeration of supported package managers in ORT.\n\nThis enum represents a variety of package managers across different programming ecosystems.", - "enum": [ - "Bazel", - "Bower", - "Bundler", - "Cargo", - "Carthage", - "CocoaPods", - "Composer", - "Conan", - "GoMod", - "Gradle", - "GradleInspector", - "Maven", - "NPM", - "NuGet", - "PIP", - "Pipenv", - "PNPM", - "Poetry", - "Pub", - "SBT", - "SpdxDocumentFile", - "Stack", - "SwiftPM", - "Unmanaged", - "Yarn", - "Yarn2" - ], - "title": "OrtPackageManagers", - "type": "string" - }, - "OrtRepositoryConfigurationCurations": { - "properties": { - "license_findings": { - "items": { - "$ref": "#/$defs/LicenseFindingCurationsModel" - }, - "title": "License Findings", - "type": "array" - }, - "packages": { - "anyOf": [ - { - "$ref": "#/$defs/CurationsSchema" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "required": [ - "license_findings" - ], - "title": "OrtRepositoryConfigurationCurations", - "type": "object" - }, - "OrtRepositoryConfigurationCurations1": { - "properties": { - "license_findings": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/LicenseFindingCurationsModel" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "License Findings" - }, - "packages": { - "$ref": "#/$defs/CurationsSchema" - } - }, - "required": [ - "packages" - ], - "title": "OrtRepositoryConfigurationCurations1", - "type": "object" - }, - "OrtRepositoryConfigurationExcludes": { - "properties": { - "paths": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtRepositoryConfigurationExcludesPath" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Paths" - }, - "scopes": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtRepositoryConfigurationExcludesScope" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Scopes" - } - }, - "title": "OrtRepositoryConfigurationExcludes", - "type": "object" - }, - "OrtRepositoryConfigurationExcludesPath": { - "properties": { - "pattern": { - "description": "A glob to match the path of the project definition file, relative to the root of the repository.", - "title": "Pattern", - "type": "string" - }, - "reason": { - "$ref": "#/$defs/PathExcludeReason" - }, - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - } - }, - "required": [ - "pattern", - "reason" - ], - "title": "OrtRepositoryConfigurationExcludesPath", - "type": "object" - }, - "OrtRepositoryConfigurationExcludesScope": { - "properties": { - "pattern": { - "title": "Pattern", - "type": "string" - }, - "reason": { - "$ref": "#/$defs/ScopeExcludeReason" - }, - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - } - }, - "required": [ - "pattern", - "reason" - ], - "title": "OrtRepositoryConfigurationExcludesScope", - "type": "object" - }, - "OrtRepositoryConfigurationIncludes": { - "properties": { - "paths": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtRepositoryConfigurationIncludesPath" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Paths" - } - }, - "title": "OrtRepositoryConfigurationIncludes", - "type": "object" - }, - "OrtRepositoryConfigurationIncludesPath": { - "properties": { - "pattern": { - "description": "A glob to match the path of the project definition file, relative to the root of the repository.", - "title": "Pattern", - "type": "string" - }, - "reason": { - "$ref": "#/$defs/PathIncludeReason" - }, - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - } - }, - "required": [ - "pattern", - "reason" - ], - "title": "OrtRepositoryConfigurationIncludesPath", - "type": "object" - }, - "OrtRepositoryConfigurationLicenseChoices": { - "properties": { - "package_license_choices": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoice" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Package License Choices" - }, - "repository_license_choices": { - "anyOf": [ - { - "items": {}, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Repository License Choices" - } - }, - "title": "OrtRepositoryConfigurationLicenseChoices", - "type": "object" - }, - "OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoice": { - "properties": { - "package_id": { - "title": "Package Id", - "type": "string" - }, - "license_choices": { - "items": { - "$ref": "#/$defs/OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoiceLicenseChoice" - }, - "title": "License Choices", - "type": "array" - } - }, - "required": [ - "package_id", - "license_choices" - ], - "title": "OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoice", - "type": "object" - }, - "OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoiceLicenseChoice": { - "properties": { - "given": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Given" - }, - "choice": { - "title": "Choice", - "type": "string" - } - }, - "required": [ - "choice" - ], - "title": "OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoiceLicenseChoice", - "type": "object" - }, - "OrtRepositoryConfigurationSnippetChoice": { - "properties": { - "provenance": { - "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceProvenance" - }, - "choices": { - "items": { - "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceChoice" - }, - "title": "Choices", - "type": "array" - } - }, - "required": [ - "provenance", - "choices" - ], - "title": "OrtRepositoryConfigurationSnippetChoice", - "type": "object" - }, - "OrtRepositoryConfigurationSnippetChoiceChoice": { - "properties": { - "given": { - "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceChoiceGiven" - }, - "choice": { - "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceChoiceChoice" - } - }, - "required": [ - "given", - "choice" - ], - "title": "OrtRepositoryConfigurationSnippetChoiceChoice", - "type": "object" - }, - "OrtRepositoryConfigurationSnippetChoiceChoiceChoice": { - "properties": { - "purl": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Purl" - }, - "reason": { - "$ref": "#/$defs/SnippetChoiceReason" - }, - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - } - }, - "required": [ - "reason" - ], - "title": "OrtRepositoryConfigurationSnippetChoiceChoiceChoice", - "type": "object" - }, - "OrtRepositoryConfigurationSnippetChoiceChoiceGiven": { - "properties": { - "source_location": { - "anyOf": [ - { - "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceChoiceGivenSourceLocation" - }, - { - "type": "null" - } - ], - "default": null - } - }, - "title": "OrtRepositoryConfigurationSnippetChoiceChoiceGiven", - "type": "object" - }, - "OrtRepositoryConfigurationSnippetChoiceChoiceGivenSourceLocation": { - "properties": { - "path": { - "title": "Path", - "type": "string" - }, - "start_line": { - "title": "Start Line", - "type": "integer" - }, - "end_line": { - "title": "End Line", - "type": "integer" - } - }, - "required": [ - "path", - "start_line", - "end_line" - ], - "title": "OrtRepositoryConfigurationSnippetChoiceChoiceGivenSourceLocation", - "type": "object" - }, - "OrtRepositoryConfigurationSnippetChoiceProvenance": { - "properties": { - "url": { - "title": "Url", - "type": "string" - } - }, - "required": [ - "url" - ], - "title": "OrtRepositoryConfigurationSnippetChoiceProvenance", - "type": "object" - }, - "PackageConfigurationSchemaLicenseFindingCurationReason": { - "enum": [ - "CODE", - "DATA_OF", - "DOCUMENTATION_OF", - "INCORRECT", - "NOT_DETECTED", - "REFERENCE" - ], - "title": "PackageConfigurationSchemaLicenseFindingCurationReason", - "type": "string" - }, - "PackageManagerConfigs": { - "additionalProperties": false, - "properties": { - "mustRunAfter": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtPackageManagers" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Mustrunafter" - }, - "options": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "default": null, - "title": "Options" - } - }, - "title": "PackageManagerConfigs", - "type": "object" - }, - "PathExcludeReason": { - "enum": [ - "BUILD_TOOL_OF", - "DATA_FILE_OF", - "DOCUMENTATION_OF", - "EXAMPLE_OF", - "OPTIONAL_COMPONENT_OF", - "OTHER", - "PROVIDED_BY", - "TEST_OF", - "TEST_TOOL_OF" - ], - "title": "PathExcludeReason", - "type": "string" - }, - "PathIncludeReason": { - "enum": [ - "SOURCE_OF" - ], - "title": "PathIncludeReason", - "type": "string" - }, - "ResolutionsSchema": { - "anyOf": [ - { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchema" - }, - { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchema1" - }, - { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchema2" - } - ], - "description": "The OSS-Review-Toolkit (ORT) provides a possibility to resolve issues, rule violations and security vulnerabilities in a resolutions file. A full list of all available options can be found at https://oss-review-toolkit.org/ort/docs/configuration/resolutions.", - "title": "ResolutionsSchema" - }, - "ResolutionsSchemaResolutionsSchema": { - "properties": { - "issues": { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaIssue" - }, - "title": "Issues", - "type": "array" - }, - "rule_violations": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaRuleViolation" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Rule Violations" - }, - "vulnerabilities": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaVulnerability" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Vulnerabilities" - } - }, - "required": [ - "issues" - ], - "title": "ResolutionsSchemaResolutionsSchema", - "type": "object" - }, - "ResolutionsSchemaResolutionsSchema1": { - "properties": { - "issues": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaIssue" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Issues" - }, - "rule_violations": { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaRuleViolation" - }, - "title": "Rule Violations", - "type": "array" - }, - "vulnerabilities": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaVulnerability" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Vulnerabilities" - } - }, - "required": [ - "rule_violations" - ], - "title": "ResolutionsSchemaResolutionsSchema1", - "type": "object" - }, - "ResolutionsSchemaResolutionsSchema2": { - "properties": { - "issues": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaIssue" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Issues" - }, - "rule_violations": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaRuleViolation" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Rule Violations" - }, - "vulnerabilities": { - "items": { - "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaVulnerability" - }, - "title": "Vulnerabilities", - "type": "array" - } - }, - "required": [ - "vulnerabilities" - ], - "title": "ResolutionsSchemaResolutionsSchema2", - "type": "object" - }, - "ResolutionsSchemaResolutionsSchemaIssue": { - "properties": { - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "$ref": "#/$defs/IssueResolutionReason" - }, - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - } - }, - "required": [ - "message", - "reason" - ], - "title": "ResolutionsSchemaResolutionsSchemaIssue", - "type": "object" - }, - "ResolutionsSchemaResolutionsSchemaRuleViolation": { - "properties": { - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "$ref": "#/$defs/RuleViolationResolutionReason" - }, - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - } - }, - "required": [ - "message", - "reason" - ], - "title": "ResolutionsSchemaResolutionsSchemaRuleViolation", - "type": "object" - }, - "ResolutionsSchemaResolutionsSchemaVulnerability": { - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "reason": { - "$ref": "#/$defs/VulnerabilityResolutionReason" - }, - "comment": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Comment" - } - }, - "required": [ - "id", - "reason" - ], - "title": "ResolutionsSchemaResolutionsSchemaVulnerability", - "type": "object" - }, - "RuleViolationResolutionReason": { - "enum": [ - "CANT_FIX_EXCEPTION", - "DYNAMIC_LINKAGE_EXCEPTION", - "EXAMPLE_OF_EXCEPTION", - "LICENSE_ACQUIRED_EXCEPTION", - "NOT_MODIFIED_EXCEPTION", - "PATENT_GRANT_EXCEPTION" - ], - "title": "RuleViolationResolutionReason", - "type": "string" - }, - "ScopeExcludeReason": { - "enum": [ - "BUILD_DEPENDENCY_OF", - "DEV_DEPENDENCY_OF", - "DOCUMENTATION_DEPENDENCY_OF", - "PROVIDED_DEPENDENCY_OF", - "TEST_DEPENDENCY_OF", - "RUNTIME_DEPENDENCY_OF" - ], - "title": "ScopeExcludeReason", - "type": "string" - }, - "SnippetChoiceReason": { - "enum": [ - "NO_RELEVANT_FINDING", - "ORIGINAL_FINDING", - "OTHER" - ], - "title": "SnippetChoiceReason", - "type": "string" - }, - "SourceCodeOrigin": { - "enum": [ - "VCS", - "ARTIFACT" - ], - "title": "SourceCodeOrigin", - "type": "string" - }, - "Sw360Configuration": { - "additionalProperties": false, - "properties": { - "restUrl": { - "format": "uri", - "minLength": 1, - "title": "Resturl", - "type": "string" - }, - "authUrl": { - "format": "uri", - "minLength": 1, - "title": "Authurl", - "type": "string" - }, - "username": { - "title": "Username", - "type": "string" - }, - "password": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Password" - }, - "clientId": { - "title": "Clientid", - "type": "string" - }, - "clientPassword": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Clientpassword" - }, - "token": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Token" - } - }, - "required": [ - "restUrl", - "authUrl", - "username", - "clientId" - ], - "title": "Sw360Configuration", - "type": "object" - }, - "VcsMatcher": { - "anyOf": [ - { - "$ref": "#/$defs/VcsMatcherVcsMatcher" - }, - { - "$ref": "#/$defs/VcsMatcherVcsMatcher1" - }, - { - "$ref": "#/$defs/VcsMatcherVcsMatcher2" - }, - { - "$ref": "#/$defs/VcsMatcherVcsMatcher3" - } - ], - "title": "VcsMatcher" - }, - "VcsMatcherVcsMatcher": { - "properties": { - "path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Path" - }, - "revision": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Revision" - }, - "type": { - "title": "Type", - "type": "string" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Url" - } - }, - "required": [ - "type" - ], - "title": "VcsMatcherVcsMatcher", - "type": "object" - }, - "VcsMatcherVcsMatcher1": { - "properties": { - "path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Path" - }, - "revision": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Revision" - }, - "type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Type" - }, - "url": { - "title": "Url", - "type": "string" - } - }, - "required": [ - "url" - ], - "title": "VcsMatcherVcsMatcher1", - "type": "object" - }, - "VcsMatcherVcsMatcher2": { - "properties": { - "path": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Path" - }, - "revision": { - "title": "Revision", - "type": "string" - }, - "type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Type" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Url" - } - }, - "required": [ - "revision" - ], - "title": "VcsMatcherVcsMatcher2", - "type": "object" - }, - "VcsMatcherVcsMatcher3": { - "properties": { - "path": { - "title": "Path", - "type": "string" - }, - "revision": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Revision" - }, - "type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Type" - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Url" - } - }, - "required": [ - "path" - ], - "title": "VcsMatcherVcsMatcher3", - "type": "object" - }, - "VulnerabilityResolutionReason": { - "enum": [ - "CANT_FIX_VULNERABILITY", - "INEFFECTIVE_VULNERABILITY", - "INVALID_MATCH_VULNERABILITY", - "MITIGATED_VULNERABILITY", - "NOT_A_VULNERABILITY", - "WILL_NOT_FIX_VULNERABILITY", - "WORKAROUND_FOR_VULNERABILITY" - ], - "title": "VulnerabilityResolutionReason", - "type": "string" - } - }, - "description": "Represents the configuration for an OSS-Review-Toolkit (ORT) repository.\n\nThis class defines various configuration options for analyzing, including, excluding,\nresolving, and curating artifacts in a repository. It also provides settings for package\nconfigurations, license choices, and snippet choices.\n\nUsage:\n Instantiate this class to specify repository-level configuration for ORT analysis.\n Each field corresponds to a specific aspect of the repository's configuration.", - "properties": { - "analyzer": { - "anyOf": [ - { - "$ref": "#/$defs/OrtAnalyzerConfigurations" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Define Analyzer specific options" - }, - "includes": { - "anyOf": [ - { - "$ref": "#/$defs/OrtRepositoryConfigurationIncludes" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Defines which parts of a repository should be included." - }, - "excludes": { - "anyOf": [ - { - "$ref": "#/$defs/OrtRepositoryConfigurationExcludes" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Defines which parts of a repository should be excluded." - }, - "resolutions": { - "anyOf": [ - { - "$ref": "#/$defs/ResolutionsSchema" - }, - { - "type": "null" - } - ], - "default": null - }, - "curations": { - "anyOf": [ - { - "$ref": "#/$defs/OrtRepositoryConfigurationCurations" - }, - { - "$ref": "#/$defs/OrtRepositoryConfigurationCurations1" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Curations for artifacts in a repository.", - "title": "Curations" - }, - "package_configurations": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtPackageManagerConfigurations" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A configuration for a specific package and provenance.", - "title": "Package Configurations" - }, - "license_choices": { - "anyOf": [ - { - "$ref": "#/$defs/OrtRepositoryConfigurationLicenseChoices" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A configuration to select a license from a multi-licensed package." - }, - "snippet_choices": { - "anyOf": [ - { - "items": { - "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoice" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "A configuration to select a snippet from a package with multiple snippet findings.", - "title": "Snippet Choices" - } - }, - "title": "OrtRepositoryConfiguration", - "type": "object" -} diff --git a/schemas/repository-configuration-schema.json b/schemas/repository-configuration-schema.json index bd125b0..9edcaa7 100644 --- a/schemas/repository-configuration-schema.json +++ b/schemas/repository-configuration-schema.json @@ -1,308 +1,1171 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://oss-review-toolkit.org/.ort.yml", - "title": "ORT repository configuration", - "description": "The OSS-Review-Toolkit (ORT) provides a possibility to configure exclusions, resolutions and more in a file called `.ort.yml`. A full list of all available options can be found at https://oss-review-toolkit.org/ort/docs/configuration/ort-yml.", - "type": "object", - "properties": { - "analyzer": { - "$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/repository-configurations/analyzer-configuration-schema.json" + "$defs": { + "CurationArtifact": { + "properties": { + "url": { + "format": "uri", + "minLength": 1, + "title": "Url", + "type": "string" + }, + "hash": { + "$ref": "#/$defs/Hash" + } + }, + "required": [ + "url", + "hash" + ], + "title": "CurationArtifact", + "type": "object" }, - "includes": { - "type": "object", - "description": "Defines which parts of a repository should be included.", + "Curations": { + "additionalProperties": false, + "description": "Curations for artifacts in a repository.\n\nAttributes:\n packages(list[PackageCuration]): Curations for third-party packages.\n license_findings(list[LicenseFindingCuration]): Curations for license findings.", "properties": { - "paths": { - "type": "array", + "packages": { + "description": "Curations for third-party packages.", "items": { - "type": "object", - "properties": { - "pattern": { - "description": "A glob to match the path of the project definition file, relative to the root of the repository.", - "type": "string" + "$ref": "#/$defs/PackageCuration" + }, + "title": "Packages", + "type": "array" + }, + "license_findings": { + "description": "Curations for license findings.", + "items": { + "$ref": "#/$defs/LicenseFindingCuration" + }, + "title": "License Findings", + "type": "array" + } + }, + "title": "Curations", + "type": "object" + }, + "Hash": { + "description": "A class that bundles a hash algorithm with its hash value.\n\nAttributes:\n value (str): The value calculated using the hash algorithm.\n algorithm (HashAlgorithm): The algorithm used to calculate the hash value.", + "properties": { + "value": { + "description": "The value calculated using the hash algorithm.", + "title": "Value", + "type": "string" + }, + "algorithm": { + "$ref": "#/$defs/HashAlgorithm", + "description": "The algorithm used to calculate the hash value." + } + }, + "required": [ + "value", + "algorithm" + ], + "title": "Hash", + "type": "object" + }, + "HashAlgorithm": { + "description": "An enum of supported hash algorithms. Each algorithm has one or more [aliases] associated to it,\nwhere the first alias is the definite name.\n\nAttributes:\n NONE: No hash algorithm.\n UNKNOWN: An unknown hash algorithm.\n MD5: The Message-Digest 5 hash algorithm, see [MD5](http://en.wikipedia.org/wiki/MD5).\n SHA1: The Secure Hash Algorithm 1, see [SHA-1](https://en.wikipedia.org/wiki/SHA-1).\n SHA256: The Secure Hash Algorithm 2 with 256 bits, see [SHA-256](https://en.wikipedia.org/wiki/SHA-256).\n SHA384: The Secure Hash Algorithm 2 with 384 bits, see [SHA-384](https://en.wikipedia.org/wiki/SHA-384).\n SHA512: The Secure Hash Algorithm 2 with 512 bits, see [SHA-512](https://en.wikipedia.org/wiki/SHA-512).\n SHA1GIT: The Secure Hash Algorithm 1, but calculated on a Git \"blob\" object, see\n - https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_object_storage\n - https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html#git-compatibility", + "enum": [ + "NONE", + "UNKNOWN", + "MD5", + "SHA1", + "SHA256", + "SHA384", + "SHA512", + [ + [ + "SHA-1-GIT", + "SHA1-GIT", + "SHA1GIT", + "SWHID" + ], + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391" + ] + ], + "title": "HashAlgorithm" + }, + "IssueResolutionReason": { + "enum": [ + "BUILD_TOOL_ISSUE", + "CANT_FIX_ISSUE", + "SCANNER_ISSUE" + ], + "title": "IssueResolutionReason", + "type": "string" + }, + "LicenseFindingCuration": { + "additionalProperties": false, + "description": "A curation for a license finding. Use it to correct a license finding or to add a license\nthat was not previously detected.\n\nAttributes:\n path (str): A glob to match the file path of a license finding.\n start_lines (list[int] | None): A matcher for the start line of a license finding, matches if the start line\n matches any of [startLines] or if [startLines] is empty.\n line_count (int | None): A matcher for the line count of a license finding\n matches if the line count equals [lineCount] or if [lineCount] is None\n detected_license (str | None): The concluded license as SPDX expression or None\n for no license, see https://spdx.dev/spdx-specification-21-web-version#h.jxpfx0ykyb60.\n concluded_license (str): The concluded license as SPDX expression or None for no license,\n see https://spdx.dev/spdx-specification-21-web-version#h.jxpfx0ykyb60.\n reason (LicenseFindingCurationReason): The reason why the curation was made, out of a predefined choice.\n comment (str | None): A comment explaining this [LicenseFindingCuration].", + "properties": { + "path": { + "description": "A glob to match the file path of a license finding.", + "title": "Path", + "type": "string" + }, + "start_lines": { + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A matcher for the start line of a license finding, matches if the start line matches any of[startLines] or if [startLines] is empty.", + "title": "Start Lines" + }, + "line_count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A matcher for the line count of a license findingmatches if the line count equals [lineCount] or if [lineCount] is None", + "title": "Line Count" + }, + "detected_license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The concluded license as SPDX expression or Nonefor no license, see https://spdx.dev/spdx-specification-21-web-version#h.jxpfx0ykyb60.", + "title": "Detected License" + }, + "concluded_license": { + "description": "The concluded license as SPDX expression or None for no license, see https://spdx.dev/spdx-specification-21-web-version#h.jxpfx0ykyb60.", + "title": "Concluded License", + "type": "string" + }, + "reason": { + "$ref": "#/$defs/LicenseFindingCurationReason", + "description": "The reason why the curation was made, out of a predefined choice." + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A comment explaining this [LicenseFindingCuration].", + "title": "Comment" + } + }, + "required": [ + "path", + "concluded_license", + "reason" + ], + "title": "LicenseFindingCuration", + "type": "object" + }, + "LicenseFindingCurationReason": { + "description": "A curation for a license finding. Use it to correct a license finding or to add a license that was not\npreviously detected.\n\nAttributes:\n CODE: The findings occur in source code, for example the name of a variable.\n DATA_OF: The findings occur in a data, for example a JSON object defining all SPDX licenses.\n DOCUMENTATION_OF: The findings occur in documentation, for example in code comments or in the README.md.\n INCORRECT: The detected licenses are not correct. Use only if none of the other reasons apply.\n NOT_DETECTED: Add applicable license as the scanner did not detect it.\n REFERENCE: The findings reference a file or URL, e.g. SEE LICENSE IN LICENSE or https://jquery.org/license/.", + "enum": [ + "CODE", + "DATA_OF", + "DOCUMENTATION_OF", + "INCORRECT", + "NOT_DETECTED", + "REFERENCE" + ], + "title": "LicenseFindingCurationReason", + "type": "string" + }, + "OrtAnalyzerConfigurations": { + "additionalProperties": false, + "properties": { + "allow_dynamic_versions": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Allow Dynamic Versions" + }, + "enabled_package_managers": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtPackageManagers" }, - "reason": { - "$ref": "#/definitions/pathIncludeReason" + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Enabled Package Managers" + }, + "disabled_package_managers": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtPackageManagers" }, - "comment": { - "type": "string" - } + "type": "array" }, - "required": [ - "pattern", - "reason" - ] - } + { + "type": "null" + } + ], + "default": null, + "title": "Disabled Package Managers" + }, + "package_managers": { + "anyOf": [ + { + "$ref": "#/$defs/OrtPackageManagerConfigurations" + }, + { + "type": "null" + } + ], + "default": null + }, + "sw360_configuration": { + "anyOf": [ + { + "$ref": "#/$defs/Sw360Configuration" + }, + { + "type": "null" + } + ], + "default": null + }, + "skip_excluded": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Skip Excluded" } - } + }, + "title": "OrtAnalyzerConfigurations", + "type": "object" }, - "excludes": { - "type": "object", - "description": "Defines which parts of a repository should be excluded.", + "OrtPackageManagerConfigurations": { + "additionalProperties": { + "$ref": "#/$defs/PackageManagerConfigs" + }, + "title": "OrtPackageManagerConfigurations", + "type": "object" + }, + "OrtPackageManagers": { + "description": "Enumeration of supported package managers in ORT.\n\nThis enum represents a variety of package managers across different programming ecosystems.", + "enum": [ + "Bazel", + "Bower", + "Bundler", + "Cargo", + "Carthage", + "CocoaPods", + "Composer", + "Conan", + "GoMod", + "Gradle", + "GradleInspector", + "Maven", + "NPM", + "NuGet", + "PIP", + "Pipenv", + "PNPM", + "Poetry", + "Pub", + "SBT", + "SpdxDocumentFile", + "Stack", + "SwiftPM", + "Unmanaged", + "Yarn", + "Yarn2" + ], + "title": "OrtPackageManagers", + "type": "string" + }, + "OrtRepositoryConfigurationExcludes": { "properties": { "paths": { - "type": "array", - "items": { - "type": "object", - "properties": { - "pattern": { - "description": "A glob to match the path of the project definition file, relative to the root of the repository.", - "type": "string" + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtRepositoryConfigurationExcludesPath" }, - "reason": { - "$ref": "#/definitions/pathExcludeReason" + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Paths" + }, + "scopes": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtRepositoryConfigurationExcludesScope" }, - "comment": { + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Scopes" + } + }, + "title": "OrtRepositoryConfigurationExcludes", + "type": "object" + }, + "OrtRepositoryConfigurationExcludesPath": { + "properties": { + "pattern": { + "description": "A glob to match the path of the project definition file, relative to the root of the repository.", + "title": "Pattern", + "type": "string" + }, + "reason": { + "$ref": "#/$defs/PathExcludeReason" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Comment" + } + }, + "required": [ + "pattern", + "reason" + ], + "title": "OrtRepositoryConfigurationExcludesPath", + "type": "object" + }, + "OrtRepositoryConfigurationExcludesScope": { + "properties": { + "pattern": { + "title": "Pattern", + "type": "string" + }, + "reason": { + "$ref": "#/$defs/ScopeExcludeReason" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Comment" + } + }, + "required": [ + "pattern", + "reason" + ], + "title": "OrtRepositoryConfigurationExcludesScope", + "type": "object" + }, + "OrtRepositoryConfigurationIncludes": { + "properties": { + "paths": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtRepositoryConfigurationIncludesPath" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Paths" + } + }, + "title": "OrtRepositoryConfigurationIncludes", + "type": "object" + }, + "OrtRepositoryConfigurationIncludesPath": { + "properties": { + "pattern": { + "description": "A glob to match the path of the project definition file, relative to the root of the repository.", + "title": "Pattern", + "type": "string" + }, + "reason": { + "$ref": "#/$defs/PathIncludeReason" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Comment" + } + }, + "required": [ + "pattern", + "reason" + ], + "title": "OrtRepositoryConfigurationIncludesPath", + "type": "object" + }, + "OrtRepositoryConfigurationLicenseChoices": { + "properties": { + "package_license_choices": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoice" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Package License Choices" + }, + "repository_license_choices": { + "anyOf": [ + { + "items": {}, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Repository License Choices" + } + }, + "title": "OrtRepositoryConfigurationLicenseChoices", + "type": "object" + }, + "OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoice": { + "properties": { + "package_id": { + "title": "Package Id", + "type": "string" + }, + "license_choices": { + "items": { + "$ref": "#/$defs/OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoiceLicenseChoice" + }, + "title": "License Choices", + "type": "array" + } + }, + "required": [ + "package_id", + "license_choices" + ], + "title": "OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoice", + "type": "object" + }, + "OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoiceLicenseChoice": { + "properties": { + "given": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Given" + }, + "choice": { + "title": "Choice", + "type": "string" + } + }, + "required": [ + "choice" + ], + "title": "OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoiceLicenseChoice", + "type": "object" + }, + "OrtRepositoryConfigurationSnippetChoice": { + "properties": { + "provenance": { + "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceProvenance" + }, + "choices": { + "items": { + "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceChoice" + }, + "title": "Choices", + "type": "array" + } + }, + "required": [ + "provenance", + "choices" + ], + "title": "OrtRepositoryConfigurationSnippetChoice", + "type": "object" + }, + "OrtRepositoryConfigurationSnippetChoiceChoice": { + "properties": { + "given": { + "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceChoiceGiven" + }, + "choice": { + "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceChoiceChoice" + } + }, + "required": [ + "given", + "choice" + ], + "title": "OrtRepositoryConfigurationSnippetChoiceChoice", + "type": "object" + }, + "OrtRepositoryConfigurationSnippetChoiceChoiceChoice": { + "properties": { + "purl": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Purl" + }, + "reason": { + "$ref": "#/$defs/SnippetChoiceReason" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Comment" + } + }, + "required": [ + "reason" + ], + "title": "OrtRepositoryConfigurationSnippetChoiceChoiceChoice", + "type": "object" + }, + "OrtRepositoryConfigurationSnippetChoiceChoiceGiven": { + "properties": { + "source_location": { + "anyOf": [ + { + "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoiceChoiceGivenSourceLocation" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "title": "OrtRepositoryConfigurationSnippetChoiceChoiceGiven", + "type": "object" + }, + "OrtRepositoryConfigurationSnippetChoiceChoiceGivenSourceLocation": { + "properties": { + "path": { + "title": "Path", + "type": "string" + }, + "start_line": { + "title": "Start Line", + "type": "integer" + }, + "end_line": { + "title": "End Line", + "type": "integer" + } + }, + "required": [ + "path", + "start_line", + "end_line" + ], + "title": "OrtRepositoryConfigurationSnippetChoiceChoiceGivenSourceLocation", + "type": "object" + }, + "OrtRepositoryConfigurationSnippetChoiceProvenance": { + "properties": { + "url": { + "title": "Url", + "type": "string" + } + }, + "required": [ + "url" + ], + "title": "OrtRepositoryConfigurationSnippetChoiceProvenance", + "type": "object" + }, + "PackageCuration": { + "additionalProperties": false, + "properties": { + "id": { + "title": "Id", + "type": "string" + }, + "curations": { + "$ref": "#/$defs/PackageCurationData" + } + }, + "required": [ + "id", + "curations" + ], + "title": "PackageCuration", + "type": "object" + }, + "PackageCurationData": { + "additionalProperties": false, + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Comment" + }, + "purl": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Purl" + }, + "cpe": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Cpe" + }, + "authors": { + "anyOf": [ + { + "items": { "type": "string" - } + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Authors" + }, + "concluded_license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Concluded License" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Description" + }, + "homepage_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Homepage Url" + }, + "binary_artifact": { + "anyOf": [ + { + "$ref": "#/$defs/CurationArtifact" + }, + { + "type": "null" + } + ], + "default": null + }, + "source_artifact": { + "anyOf": [ + { + "$ref": "#/$defs/CurationArtifact" + }, + { + "type": "null" + } + ], + "default": null + }, + "vcs": { + "anyOf": [ + { + "$ref": "#/$defs/VcsInfo" + }, + { + "type": "null" + } + ], + "default": null + }, + "is_metadata_only": { + "anyOf": [ + { + "type": "boolean" }, - "required": [ - "pattern", - "reason" - ] - } + { + "type": "null" + } + ], + "default": null, + "title": "Is Metadata Only" }, - "scopes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "pattern": { - "type": "string" - }, - "reason": { - "$ref": "#/definitions/scopeExcludeReason" + "is_modified": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Is Modified" + }, + "declared_license_mapping": { + "additionalProperties": true, + "title": "Declared License Mapping", + "type": "object" + }, + "source_code_origins": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/SourceCodeOrigin" }, - "comment": { - "type": "string" - } + "type": "array" }, - "required": [ - "pattern", - "reason" - ] - } + { + "type": "null" + } + ], + "default": null, + "title": "Source Code Origins" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "title": "Labels", + "type": "object" } - } - }, - "resolutions": { - "$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/resolutions-schema.json" + }, + "title": "PackageCurationData", + "type": "object" }, - "curations": { - "type": "object", - "description": "Curations for artifacts in a repository.", + "PackageManagerConfigs": { + "additionalProperties": false, "properties": { - "license_findings": { - "type": "array", - "items": { - "$ref": "#/definitions/licenseFindingCurations" - } + "mustRunAfter": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtPackageManagers" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Mustrunafter" }, - "packages": { - "$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/curations-schema.json" + "options": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "title": "Options" } }, + "title": "PackageManagerConfigs", + "type": "object" + }, + "PathExcludeReason": { + "enum": [ + "BUILD_TOOL_OF", + "DATA_FILE_OF", + "DOCUMENTATION_OF", + "EXAMPLE_OF", + "OPTIONAL_COMPONENT_OF", + "OTHER", + "PROVIDED_BY", + "TEST_OF", + "TEST_TOOL_OF" + ], + "title": "PathExcludeReason", + "type": "string" + }, + "PathIncludeReason": { + "enum": [ + "SOURCE_OF" + ], + "title": "PathIncludeReason", + "type": "string" + }, + "ResolutionsSchema": { "anyOf": [ { - "required": [ - "license_findings" - ] + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchema" + }, + { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchema1" }, { - "required": [ - "packages" - ] + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchema2" } - ] - }, - "package_configurations": { - "type": "array", - "description": "A configuration for a specific package and provenance.", - "items": { - "$ref": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/package-configuration-schema.json" - } + ], + "description": "The OSS-Review-Toolkit (ORT) provides a possibility to resolve issues, rule violations and security vulnerabilities in a resolutions file. A full list of all available options can be found at https://oss-review-toolkit.org/ort/docs/configuration/resolutions.", + "title": "ResolutionsSchema" }, - "license_choices": { - "type": "object", - "description": "A configuration to select a license from a multi-licensed package.", + "ResolutionsSchemaResolutionsSchema": { "properties": { - "package_license_choices": { - "type": "array", + "issues": { "items": { - "type": "object", - "properties": { - "package_id": { - "type": "string" + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaIssue" + }, + "title": "Issues", + "type": "array" + }, + "rule_violations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaRuleViolation" }, - "license_choices": { - "type": "array", - "items": { - "type": "object", - "properties": { - "given": { - "type": "string" - }, - "choice": { - "type": "string" - } - }, - "required": [ - "choice" - ] - } - } - }, - "required": [ - "package_id", - "license_choices" - ] - } + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Rule Violations" }, - "repository_license_choices": { - "type": "array", - "items": { - "given": { - "type": "string" + "vulnerabilities": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaVulnerability" + }, + "type": "array" }, - "choice": { - "type": "string" + { + "type": "null" } - } + ], + "default": null, + "title": "Vulnerabilities" } - } + }, + "required": [ + "issues" + ], + "title": "ResolutionsSchemaResolutionsSchema", + "type": "object" }, - "snippet_choices": { - "type": "array", - "description": "A configuration to select a snippet from a package with multiple snippet findings.", - "items": { - "type": "object", - "properties": { - "provenance": { - "type": "object", - "properties": { - "url": { - "type": "string" - } + "ResolutionsSchemaResolutionsSchema1": { + "properties": { + "issues": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaIssue" + }, + "type": "array" }, - "required": [ - "url" - ] + { + "type": "null" + } + ], + "default": null, + "title": "Issues" + }, + "rule_violations": { + "items": { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaRuleViolation" }, - "choices": { - "type": "array", - "items": { - "type": "object", - "properties": { - "given": { - "type": "object", - "properties": { - "source_location": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "start_line": { - "type": "integer" - }, - "end_line": { - "type": "integer" - } - }, - "required": [ - "path", - "start_line", - "end_line" - ] - } - } - }, - "choice": { - "type": "object", - "properties": { - "purl": { - "type": "string" - }, - "reason": { - "$ref": "#/definitions/snippetChoiceReason" - }, - "comment": { - "type": "string" - } - }, - "required": [ - "reason" - ] - } + "title": "Rule Violations", + "type": "array" + }, + "vulnerabilities": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaVulnerability" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Vulnerabilities" + } + }, + "required": [ + "rule_violations" + ], + "title": "ResolutionsSchemaResolutionsSchema1", + "type": "object" + }, + "ResolutionsSchemaResolutionsSchema2": { + "properties": { + "issues": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaIssue" }, - "required": [ - "given", - "choice" - ] + "type": "array" + }, + { + "type": "null" } - } + ], + "default": null, + "title": "Issues" }, - "required": [ - "provenance", - "choices" - ] - } - } - }, - "definitions": { - "licenseFindingCurations": { - "type": "object", + "rule_violations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaRuleViolation" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Rule Violations" + }, + "vulnerabilities": { + "items": { + "$ref": "#/$defs/ResolutionsSchemaResolutionsSchemaVulnerability" + }, + "title": "Vulnerabilities", + "type": "array" + } + }, + "required": [ + "vulnerabilities" + ], + "title": "ResolutionsSchemaResolutionsSchema2", + "type": "object" + }, + "ResolutionsSchemaResolutionsSchemaIssue": { "properties": { - "path": { + "message": { + "title": "Message", "type": "string" }, - "start_lines": { - "type": [ - "integer", - "string" - ] - }, - "line_count": { - "type": "integer" + "reason": { + "$ref": "#/$defs/IssueResolutionReason" }, - "detected_license": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Comment" + } + }, + "required": [ + "message", + "reason" + ], + "title": "ResolutionsSchemaResolutionsSchemaIssue", + "type": "object" + }, + "ResolutionsSchemaResolutionsSchemaRuleViolation": { + "properties": { + "message": { + "title": "Message", "type": "string" }, - "concluded_license": { + "reason": { + "$ref": "#/$defs/RuleViolationResolutionReason" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Comment" + } + }, + "required": [ + "message", + "reason" + ], + "title": "ResolutionsSchemaResolutionsSchemaRuleViolation", + "type": "object" + }, + "ResolutionsSchemaResolutionsSchemaVulnerability": { + "properties": { + "id": { + "title": "Id", "type": "string" }, "reason": { - "$ref": "#/definitions/licenseFindingCurationReason" + "$ref": "#/$defs/VulnerabilityResolutionReason" }, "comment": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Comment" } }, "required": [ - "path", - "concluded_license", + "id", "reason" - ] - }, - "pathIncludeReason": { - "enum": [ - "SOURCE_OF" - ] + ], + "title": "ResolutionsSchemaResolutionsSchemaVulnerability", + "type": "object" }, - "pathExcludeReason": { + "RuleViolationResolutionReason": { "enum": [ - "BUILD_TOOL_OF", - "DATA_FILE_OF", - "DOCUMENTATION_OF", - "EXAMPLE_OF", - "OPTIONAL_COMPONENT_OF", - "OTHER", - "PROVIDED_BY", - "TEST_OF", - "TEST_TOOL_OF" - ] + "CANT_FIX_EXCEPTION", + "DYNAMIC_LINKAGE_EXCEPTION", + "EXAMPLE_OF_EXCEPTION", + "LICENSE_ACQUIRED_EXCEPTION", + "NOT_MODIFIED_EXCEPTION", + "PATENT_GRANT_EXCEPTION" + ], + "title": "RuleViolationResolutionReason", + "type": "string" }, - "scopeExcludeReason": { + "ScopeExcludeReason": { "enum": [ "BUILD_DEPENDENCY_OF", "DEV_DEPENDENCY_OF", @@ -310,24 +1173,264 @@ "PROVIDED_DEPENDENCY_OF", "TEST_DEPENDENCY_OF", "RUNTIME_DEPENDENCY_OF" - ] - }, - "licenseFindingCurationReason": { - "enum": [ - "CODE", - "DATA_OF", - "DOCUMENTATION_OF", - "INCORRECT", - "NOT_DETECTED", - "REFERENCE" - ] + ], + "title": "ScopeExcludeReason", + "type": "string" }, - "snippetChoiceReason": { + "SnippetChoiceReason": { "enum": [ "NO_RELEVANT_FINDING", "ORIGINAL_FINDING", "OTHER" - ] + ], + "title": "SnippetChoiceReason", + "type": "string" + }, + "SourceCodeOrigin": { + "enum": [ + "VCS", + "ARTIFACT" + ], + "title": "SourceCodeOrigin", + "type": "string" + }, + "Sw360Configuration": { + "additionalProperties": false, + "properties": { + "restUrl": { + "format": "uri", + "minLength": 1, + "title": "Resturl", + "type": "string" + }, + "authUrl": { + "format": "uri", + "minLength": 1, + "title": "Authurl", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "password": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Password" + }, + "clientId": { + "title": "Clientid", + "type": "string" + }, + "clientPassword": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Clientpassword" + }, + "token": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Token" + } + }, + "required": [ + "restUrl", + "authUrl", + "username", + "clientId" + ], + "title": "Sw360Configuration", + "type": "object" + }, + "VcsInfo": { + "description": "Bundles general Version Control System information.\n\nAttributes:\n type(VcsType): The type of the VCS, for example Git, GitRepo, Mercurial, etc.\n url(AnyUrl): The URL to the VCS repository.\n revision(str): The VCS-specific revision (tag, branch, SHA1) that the version of the package maps to.\n path(str): The path inside the VCS to take into account.\n If the VCS supports checking out only a subdirectory, only this path is checked out.", + "properties": { + "type": { + "$ref": "#/$defs/VcsType", + "description": "The type of the VCS, for example Git, GitRepo, Mercurial, etc." + }, + "url": { + "description": "The URL to the VCS repository.", + "format": "uri", + "minLength": 1, + "title": "Url", + "type": "string" + }, + "revision": { + "description": "The VCS-specific revision (tag, branch, SHA1) that the version of the package maps to.", + "title": "Revision", + "type": "string" + }, + "path": { + "default": "", + "description": "The path inside the VCS to take into account.If the VCS supports checking out only a subdirectory, only this path is checked out.", + "title": "Path", + "type": "string" + } + }, + "required": [ + "url", + "revision" + ], + "title": "VcsInfo", + "type": "object" + }, + "VcsType": { + "description": "A class for Version Control System types. Each type has one or more [aliases] associated to it,\nwhere the first alias is the definite name. This class is not implemented as an enum as\nconstructing from an unknown type should be supported while maintaining that type as the primary\nalias for the string representation.\n\nAttributes:\n aliases(list[str]): Primary name and aliases", + "properties": { + "aliases": { + "description": "Primary name and aliases", + "items": { + "type": "string" + }, + "title": "Aliases", + "type": "array" + } + }, + "title": "VcsType", + "type": "object" + }, + "VulnerabilityResolutionReason": { + "enum": [ + "CANT_FIX_VULNERABILITY", + "INEFFECTIVE_VULNERABILITY", + "INVALID_MATCH_VULNERABILITY", + "MITIGATED_VULNERABILITY", + "NOT_A_VULNERABILITY", + "WILL_NOT_FIX_VULNERABILITY", + "WORKAROUND_FOR_VULNERABILITY" + ], + "title": "VulnerabilityResolutionReason", + "type": "string" + } + }, + "description": "Represents the configuration for an OSS-Review-Toolkit (ORT) repository.\n\nThis class defines various configuration options for analyzing, including, excluding,\nresolving, and curating artifacts in a repository. It also provides settings for package\nconfigurations, license choices, and snippet choices.\n\nUsage:\n Instantiate this class to specify repository-level configuration for ORT analysis.\n Each field corresponds to a specific aspect of the repository's configuration.", + "properties": { + "analyzer": { + "anyOf": [ + { + "$ref": "#/$defs/OrtAnalyzerConfigurations" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Define Analyzer specific options" + }, + "includes": { + "anyOf": [ + { + "$ref": "#/$defs/OrtRepositoryConfigurationIncludes" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Defines which parts of a repository should be included." + }, + "excludes": { + "anyOf": [ + { + "$ref": "#/$defs/OrtRepositoryConfigurationExcludes" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Defines which parts of a repository should be excluded." + }, + "resolutions": { + "anyOf": [ + { + "$ref": "#/$defs/ResolutionsSchema" + }, + { + "type": "null" + } + ], + "default": null + }, + "curations": { + "anyOf": [ + { + "$ref": "#/$defs/Curations" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Defines curations for packages used as dependencies by projects in this repository, or curations for license findings in the source code of a project in this repository." + }, + "package_configurations": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtPackageManagerConfigurations" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A configuration for a specific package and provenance.", + "title": "Package Configurations" + }, + "license_choices": { + "anyOf": [ + { + "$ref": "#/$defs/OrtRepositoryConfigurationLicenseChoices" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A configuration to select a license from a multi-licensed package." + }, + "snippet_choices": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/OrtRepositoryConfigurationSnippetChoice" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "A configuration to select a snippet from a package with multiple snippet findings.", + "title": "Snippet Choices" } - } + }, + "title": "OrtRepositoryConfiguration", + "type": "object" } diff --git a/src/ort/models/config/curations.py b/src/ort/models/config/curations.py new file mode 100644 index 0000000..0ced2cb --- /dev/null +++ b/src/ort/models/config/curations.py @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# SPDX-License-Identifier: MIT + + +from pydantic import BaseModel, ConfigDict, Field + +from ort.models.config.license_finding_curation import LicenseFindingCuration +from ort.models.package_curation import PackageCuration + + +class Curations(BaseModel): + """ + Curations for artifacts in a repository. + + Attributes: + packages(list[PackageCuration]): Curations for third-party packages. + license_findings(list[LicenseFindingCuration]): Curations for license findings. + """ + + model_config = ConfigDict( + extra="forbid", + ) + packages: list[PackageCuration] = Field( + default_factory=list, + description="Curations for third-party packages.", + ) + license_findings: list[LicenseFindingCuration] = Field( + default_factory=list, + description="Curations for license findings.", + ) diff --git a/src/ort/models/config/license_finding_curation.py b/src/ort/models/config/license_finding_curation.py new file mode 100644 index 0000000..3e35263 --- /dev/null +++ b/src/ort/models/config/license_finding_curation.py @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# SPDX-License-Identifier: MIT + + +from pydantic import BaseModel, ConfigDict, Field + +from ort.models.config.license_finding_curation_reason import LicenseFindingCurationReason + + +class LicenseFindingCuration(BaseModel): + """ + A curation for a license finding. Use it to correct a license finding or to add a license + that was not previously detected. + + Attributes: + path (str): A glob to match the file path of a license finding. + start_lines (list[int] | None): A matcher for the start line of a license finding, matches if the start line + matches any of [startLines] or if [startLines] is empty. + line_count (int | None): A matcher for the line count of a license finding + matches if the line count equals [lineCount] or if [lineCount] is None + detected_license (str | None): The concluded license as SPDX expression or None + for no license, see https://spdx.dev/spdx-specification-21-web-version#h.jxpfx0ykyb60. + concluded_license (str): The concluded license as SPDX expression or None for no license, + see https://spdx.dev/spdx-specification-21-web-version#h.jxpfx0ykyb60. + reason (LicenseFindingCurationReason): The reason why the curation was made, out of a predefined choice. + comment (str | None): A comment explaining this [LicenseFindingCuration]. + """ + + model_config = ConfigDict( + extra="forbid", + ) + path: str = Field( + description="A glob to match the file path of a license finding.", + ) + start_lines: list[int] | None = Field( + default=None, + description="A matcher for the start line of a license finding, matches if the start line matches any of" + "[startLines] or if [startLines] is empty.", + ) + line_count: int | None = Field( + default=None, + description="A matcher for the line count of a license finding" + "matches if the line count equals [lineCount] or if [lineCount] is None", + ) + + detected_license: str | None = Field( + default=None, + description="The concluded license as SPDX expression or None" + "for no license, see https://spdx.dev/spdx-specification-21-web-version#h.jxpfx0ykyb60.", + ) + concluded_license: str = Field( + description="The concluded license as SPDX expression or None for no license," + " see https://spdx.dev/spdx-specification-21-web-version#h.jxpfx0ykyb60.", + ) + reason: LicenseFindingCurationReason = Field( + description="The reason why the curation was made, out of a predefined choice.", + ) + comment: str | None = Field( + default=None, + description="A comment explaining this [LicenseFindingCuration].", + ) diff --git a/src/ort/models/config/license_finding_curation_reason.py b/src/ort/models/config/license_finding_curation_reason.py new file mode 100644 index 0000000..193d286 --- /dev/null +++ b/src/ort/models/config/license_finding_curation_reason.py @@ -0,0 +1,28 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# +# SPDX-License-Identifier: MIT + + +from enum import Enum + + +class LicenseFindingCurationReason(Enum): + """ + A curation for a license finding. Use it to correct a license finding or to add a license that was not + previously detected. + + Attributes: + CODE: The findings occur in source code, for example the name of a variable. + DATA_OF: The findings occur in a data, for example a JSON object defining all SPDX licenses. + DOCUMENTATION_OF: The findings occur in documentation, for example in code comments or in the README.md. + INCORRECT: The detected licenses are not correct. Use only if none of the other reasons apply. + NOT_DETECTED: Add applicable license as the scanner did not detect it. + REFERENCE: The findings reference a file or URL, e.g. SEE LICENSE IN LICENSE or https://jquery.org/license/. + """ + + CODE = "CODE" + DATA_OF = "DATA_OF" + DOCUMENTATION_OF = "DOCUMENTATION_OF" + INCORRECT = "INCORRECT" + NOT_DETECTED = "NOT_DETECTED" + REFERENCE = "REFERENCE" diff --git a/src/ort/models/hash.py b/src/ort/models/hash.py new file mode 100644 index 0000000..23dc0ee --- /dev/null +++ b/src/ort/models/hash.py @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# SPDX-License-Identifier: MIT + +from pydantic import BaseModel, Field + +from ort.models.hash_algorithm import HashAlgorithm + + +class Hash(BaseModel): + """ + A class that bundles a hash algorithm with its hash value. + + Attributes: + value (str): The value calculated using the hash algorithm. + algorithm (HashAlgorithm): The algorithm used to calculate the hash value. + """ + + value: str = Field(description="The value calculated using the hash algorithm.") + algorithm: HashAlgorithm = Field(description="The algorithm used to calculate the hash value.") diff --git a/src/ort/models/hash_algorithm.py b/src/ort/models/hash_algorithm.py new file mode 100644 index 0000000..c51464c --- /dev/null +++ b/src/ort/models/hash_algorithm.py @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# +# SPDX-License-Identifier: MIT + + +from enum import Enum + + +class HashAlgorithm(Enum): + """ + An enum of supported hash algorithms. Each algorithm has one or more [aliases] associated to it, + where the first alias is the definite name. + + Attributes: + NONE: No hash algorithm. + UNKNOWN: An unknown hash algorithm. + MD5: The Message-Digest 5 hash algorithm, see [MD5](http://en.wikipedia.org/wiki/MD5). + SHA1: The Secure Hash Algorithm 1, see [SHA-1](https://en.wikipedia.org/wiki/SHA-1). + SHA256: The Secure Hash Algorithm 2 with 256 bits, see [SHA-256](https://en.wikipedia.org/wiki/SHA-256). + SHA384: The Secure Hash Algorithm 2 with 384 bits, see [SHA-384](https://en.wikipedia.org/wiki/SHA-384). + SHA512: The Secure Hash Algorithm 2 with 512 bits, see [SHA-512](https://en.wikipedia.org/wiki/SHA-512). + SHA1GIT: The Secure Hash Algorithm 1, but calculated on a Git "blob" object, see + - https://git-scm.com/book/en/v2/Git-Internals-Git-Objects#_object_storage + - https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html#git-compatibility + """ + + NONE = "NONE" + UNKNOWN = "UNKNOWN" + MD5 = "MD5" + SHA1 = "SHA1" + SHA256 = "SHA256" + SHA384 = "SHA384" + SHA512 = "SHA512" + SHA1GIT = ( + ["SHA-1-GIT", "SHA1-GIT", "SHA1GIT", "SWHID"], + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + ) diff --git a/src/ort/models/package_curation.py b/src/ort/models/package_curation.py new file mode 100644 index 0000000..61e2e0a --- /dev/null +++ b/src/ort/models/package_curation.py @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# SPDX-License-Identifier: MIT + + +from pydantic import BaseModel, ConfigDict + +from .package_curation_data import PackageCurationData + + +class PackageCuration(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + id: str + curations: PackageCurationData diff --git a/src/ort/models/package_curation_data.py b/src/ort/models/package_curation_data.py new file mode 100644 index 0000000..c700939 --- /dev/null +++ b/src/ort/models/package_curation_data.py @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# SPDX-License-Identifier: MIT + +from typing import Any + +from pydantic import AnyUrl, BaseModel, ConfigDict, Field + +from .hash import Hash +from .source_code_origin import SourceCodeOrigin +from .vcsinfo import VcsInfo + + +class CurationArtifact(BaseModel): + url: AnyUrl + hash: Hash + + +class PackageCurationData(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + comment: str | None = None + purl: str | None = None + cpe: str | None = None + authors: list[str] | None = None + concluded_license: str | None = None + description: str | None = None + homepage_url: str | None = None + binary_artifact: CurationArtifact | None = None + source_artifact: CurationArtifact | None = None + vcs: VcsInfo | None = None + is_metadata_only: bool | None = None + is_modified: bool | None = None + declared_license_mapping: dict[str, Any] = Field(default_factory=dict) + source_code_origins: list[SourceCodeOrigin] | None = None + labels: dict[str, str] = Field(default_factory=dict) diff --git a/src/ort/models/repository_configuration.py b/src/ort/models/repository_configuration.py index 49a2d33..45528f6 100644 --- a/src/ort/models/repository_configuration.py +++ b/src/ort/models/repository_configuration.py @@ -7,9 +7,9 @@ from pydantic import BaseModel, Field, RootModel -from .analyzer_configurations import OrtAnalyzerConfigurations -from .package_managers import OrtPackageManagerConfigurations, PackageManagerConfigs -from .source_code_origin import SourceCodeOrigin +from ort.models.analyzer_configurations import OrtAnalyzerConfigurations +from ort.models.config.curations import Curations +from ort.models.package_managers import OrtPackageManagerConfigurations, PackageManagerConfigs class OrtRepositoryConfigurationLicenseChoicesPackageLicenseChoiceLicenseChoice(BaseModel): @@ -66,45 +66,6 @@ class VulnerabilityResolutionReason(Enum): workaround_for_vulnerability = "WORKAROUND_FOR_VULNERABILITY" -class VcsMatcherVcsMatcher(BaseModel): - path: str | None = None - revision: str | None = None - type: str - url: str | None = None - - -class VcsMatcherVcsMatcher1(BaseModel): - path: str | None = None - revision: str | None = None - type: str | None = None - url: str - - -class VcsMatcherVcsMatcher2(BaseModel): - path: str | None = None - revision: str - type: str | None = None - url: str | None = None - - -class VcsMatcherVcsMatcher3(BaseModel): - path: str - revision: str | None = None - type: str | None = None - url: str | None = None - - -class VcsMatcher( - RootModel[VcsMatcherVcsMatcher | VcsMatcherVcsMatcher1 | VcsMatcherVcsMatcher2 | VcsMatcherVcsMatcher3] -): - root: VcsMatcherVcsMatcher | VcsMatcherVcsMatcher1 | VcsMatcherVcsMatcher2 | VcsMatcherVcsMatcher3 - - -class Hash(BaseModel): - value: str - algorithm: str - - class PackageConfigurationSchemaSourceCodeOrigin(Enum): vcs = "VCS" artifact = "ARTIFACT" @@ -141,24 +102,6 @@ class PathExcludeReason(Enum): test_tool_of = "TEST_TOOL_OF" -VcsMatcherVcsMatcher4 = VcsMatcherVcsMatcher - - -VcsMatcherVcsMatcher5 = VcsMatcherVcsMatcher1 - - -VcsMatcherVcsMatcher6 = VcsMatcherVcsMatcher2 - - -VcsMatcherVcsMatcher7 = VcsMatcherVcsMatcher3 - - -class VcsMatcherModel( - RootModel[VcsMatcherVcsMatcher4 | VcsMatcherVcsMatcher5 | VcsMatcherVcsMatcher6 | VcsMatcherVcsMatcher7] -): - root: VcsMatcherVcsMatcher4 | VcsMatcherVcsMatcher5 | VcsMatcherVcsMatcher6 | VcsMatcherVcsMatcher7 - - class PathIncludeReason(Enum): source_of = "SOURCE_OF" @@ -301,47 +244,6 @@ class ResolutionsSchema( ) -class CurationsSchemaCurationsSchemaItemCurationsBinaryArtifact(BaseModel): - url: str - hash: Hash - - -CurationsSchemaCurationsSchemaItemCurationsSourceArtifact = CurationsSchemaCurationsSchemaItemCurationsBinaryArtifact - - -class CurationsSchemaCurationsSchemaItemCurations(BaseModel): - comment: str | None = None - purl: str | None = None - cpe: str | None = None - authors: list[str] | None = None - concluded_license: str | None = None - description: str | None = None - homepage_url: str | None = None - binary_artifact: CurationsSchemaCurationsSchemaItemCurationsBinaryArtifact | None = None - source_artifact: CurationsSchemaCurationsSchemaItemCurationsSourceArtifact | None = None - vcs: VcsMatcher | None = None - is_metadata_only: bool | None = None - is_modified: bool | None = None - declared_license_mapping: dict[str, Any] = Field(default_factory=dict) - source_code_origins: list[SourceCodeOrigin] | None = None - labels: dict[str, str] = Field(default_factory=dict) - - -class CurationsSchemaCurationsSchemaItem(BaseModel): - id: str - curations: CurationsSchemaCurationsSchemaItemCurations - - -class CurationsSchema(RootModel[list[CurationsSchemaCurationsSchemaItem]]): - root: list[CurationsSchemaCurationsSchemaItem] = Field( - ..., - description="The OSS-Review-Toolkit (ORT) provides a possibility to correct metadata and set " - "the concluded license for specific packages (dependencies) in curation files. A full list of all available " - "options can be found at https://oss-review-toolkit.org/ort/docs/configuration/package-curations.", - title="ORT curations", - ) - - class LicenseFindingCurationsModel(BaseModel): path: str start_lines: int | str | None = None @@ -352,14 +254,14 @@ class LicenseFindingCurationsModel(BaseModel): comment: str | None = None -class OrtRepositoryConfigurationCurations(BaseModel): +class OrtRepositoryConfigurationH(BaseModel): license_findings: list[LicenseFindingCurationsModel] - packages: CurationsSchema | None = None + packages: Curations | None = None class OrtRepositoryConfigurationCurations1(BaseModel): license_findings: list[LicenseFindingCurationsModel] | None = None - packages: CurationsSchema + packages: Curations class OrtRepositoryConfiguration(BaseModel): @@ -388,9 +290,10 @@ class OrtRepositoryConfiguration(BaseModel): description="Defines which parts of a repository should be excluded.", ) resolutions: ResolutionsSchema | None = None - curations: OrtRepositoryConfigurationCurations | OrtRepositoryConfigurationCurations1 | None = Field( + curations: Curations | None = Field( None, - description="Curations for artifacts in a repository.", + description="Defines curations for packages used as dependencies by projects in this repository," + " or curations for license findings in the source code of a project in this repository.", ) package_configurations: list[OrtPackageManagerConfigurations] | None = Field( None, diff --git a/src/ort/models/vcsinfo.py b/src/ort/models/vcsinfo.py new file mode 100644 index 0000000..edf0e17 --- /dev/null +++ b/src/ort/models/vcsinfo.py @@ -0,0 +1,33 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# SPDX-License-Identifier: MIT + +from pydantic import AnyUrl, BaseModel, Field + +from .vcstype import VcsType + + +class VcsInfo(BaseModel): + """ + Bundles general Version Control System information. + + Attributes: + type(VcsType): The type of the VCS, for example Git, GitRepo, Mercurial, etc. + url(AnyUrl): The URL to the VCS repository. + revision(str): The VCS-specific revision (tag, branch, SHA1) that the version of the package maps to. + path(str): The path inside the VCS to take into account. + If the VCS supports checking out only a subdirectory, only this path is checked out. + """ + + type: VcsType = Field( + default_factory=VcsType, + description="The type of the VCS, for example Git, GitRepo, Mercurial, etc.", + ) + url: AnyUrl = Field(description="The URL to the VCS repository.") + revision: str = Field( + description="The VCS-specific revision (tag, branch, SHA1) that the version of the package maps to." + ) + path: str = Field( + default="", + description="The path inside the VCS to take into account." + "If the VCS supports checking out only a subdirectory, only this path is checked out.", + ) diff --git a/src/ort/models/vcstype.py b/src/ort/models/vcstype.py new file mode 100644 index 0000000..9c0160c --- /dev/null +++ b/src/ort/models/vcstype.py @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: 2025 Helio Chissini de Castro +# SPDX-License-Identifier: MIT + +from pydantic import BaseModel, Field, model_validator + + +class VcsType(BaseModel): + """ + A class for Version Control System types. Each type has one or more [aliases] associated to it, + where the first alias is the definite name. This class is not implemented as an enum as + constructing from an unknown type should be supported while maintaining that type as the primary + alias for the string representation. + + Attributes: + aliases(list[str]): Primary name and aliases + """ + + aliases: list[str] = Field(default_factory=list, description="Primary name and aliases") + + @model_validator(mode="after") + def ensure_non_empty(self): + """Ensure the aliases list is never empty.""" + if not self.aliases: + self.aliases = [""] + return self + + def __str__(self): + return self.aliases[0] if self.aliases else "" + + @classmethod + def for_name(cls, name: str) -> "VcsType": + """Lookup known type by name, or create a new instance.""" + for t in KNOWN_TYPES: + if any(alias.lower() == name.lower() for alias in t.aliases): + return t + return cls(aliases=[name]) + + +# Define known VCS types as constants +GIT = VcsType(aliases=["Git", "GitHub", "GitLab"]) +GIT_REPO = VcsType(aliases=["GitRepo", "git-repo", "repo"]) +MERCURIAL = VcsType(aliases=["Mercurial", "hg"]) +SUBVERSION = VcsType(aliases=["Subversion", "svn"]) +UNKNOWN = VcsType(aliases=[""]) + +KNOWN_TYPES = [GIT, GIT_REPO, MERCURIAL, SUBVERSION] diff --git a/uv.lock b/uv.lock index bf60ed8..0a6c4dd 100644 --- a/uv.lock +++ b/uv.lock @@ -623,11 +623,10 @@ wheels = [ [[package]] name = "python-ort" -version = "0.2.0" +version = "0.3.0" source = { editable = "." } dependencies = [ { name = "pydantic" }, - { name = "pyyaml" }, ] [package.dev-dependencies] @@ -642,10 +641,7 @@ dev = [ ] [package.metadata] -requires-dist = [ - { name = "pydantic", specifier = ">=2.12.4" }, - { name = "pyyaml", specifier = ">=6.0.3" }, -] +requires-dist = [{ name = "pydantic", specifier = ">=2.12.4" }] [package.metadata.requires-dev] dev = [ @@ -654,7 +650,7 @@ dev = [ { name = "pycodestyle", specifier = ">=2.14.0" }, { name = "pyrefly", specifier = ">=0.40.0" }, { name = "pytest", specifier = ">=8.4.2" }, - { name = "ruff", specifier = ">=0.14.3" }, + { name = "ruff", specifier = ">=0.14.4" }, { name = "types-pyyaml", specifier = ">=6.0.12.20250915" }, ] @@ -733,28 +729,28 @@ wheels = [ [[package]] name = "ruff" -version = "0.14.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/75/62/50b7727004dfe361104dfbf898c45a9a2fdfad8c72c04ae62900224d6ecf/ruff-0.14.3.tar.gz", hash = "sha256:4ff876d2ab2b161b6de0aa1f5bd714e8e9b4033dc122ee006925fbacc4f62153", size = 5558687, upload-time = "2025-10-31T00:26:26.878Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ce/8e/0c10ff1ea5d4360ab8bfca4cb2c9d979101a391f3e79d2616c9bf348cd26/ruff-0.14.3-py3-none-linux_armv6l.whl", hash = "sha256:876b21e6c824f519446715c1342b8e60f97f93264012de9d8d10314f8a79c371", size = 12535613, upload-time = "2025-10-31T00:25:44.302Z" }, - { url = "https://files.pythonhosted.org/packages/d3/c8/6724f4634c1daf52409fbf13fefda64aa9c8f81e44727a378b7b73dc590b/ruff-0.14.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b6fd8c79b457bedd2abf2702b9b472147cd860ed7855c73a5247fa55c9117654", size = 12855812, upload-time = "2025-10-31T00:25:47.793Z" }, - { url = "https://files.pythonhosted.org/packages/de/03/db1bce591d55fd5f8a08bb02517fa0b5097b2ccabd4ea1ee29aa72b67d96/ruff-0.14.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:71ff6edca490c308f083156938c0c1a66907151263c4abdcb588602c6e696a14", size = 11944026, upload-time = "2025-10-31T00:25:49.657Z" }, - { url = "https://files.pythonhosted.org/packages/0b/75/4f8dbd48e03272715d12c87dc4fcaaf21b913f0affa5f12a4e9c6f8a0582/ruff-0.14.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:786ee3ce6139772ff9272aaf43296d975c0217ee1b97538a98171bf0d21f87ed", size = 12356818, upload-time = "2025-10-31T00:25:51.949Z" }, - { url = "https://files.pythonhosted.org/packages/ec/9b/506ec5b140c11d44a9a4f284ea7c14ebf6f8b01e6e8917734a3325bff787/ruff-0.14.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cd6291d0061811c52b8e392f946889916757610d45d004e41140d81fb6cd5ddc", size = 12336745, upload-time = "2025-10-31T00:25:54.248Z" }, - { url = "https://files.pythonhosted.org/packages/c7/e1/c560d254048c147f35e7f8131d30bc1f63a008ac61595cf3078a3e93533d/ruff-0.14.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a497ec0c3d2c88561b6d90f9c29f5ae68221ac00d471f306fa21fa4264ce5fcd", size = 13101684, upload-time = "2025-10-31T00:25:56.253Z" }, - { url = "https://files.pythonhosted.org/packages/a5/32/e310133f8af5cd11f8cc30f52522a3ebccc5ea5bff4b492f94faceaca7a8/ruff-0.14.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:e231e1be58fc568950a04fbe6887c8e4b85310e7889727e2b81db205c45059eb", size = 14535000, upload-time = "2025-10-31T00:25:58.397Z" }, - { url = "https://files.pythonhosted.org/packages/a2/a1/7b0470a22158c6d8501eabc5e9b6043c99bede40fa1994cadf6b5c2a61c7/ruff-0.14.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:469e35872a09c0e45fecf48dd960bfbce056b5db2d5e6b50eca329b4f853ae20", size = 14156450, upload-time = "2025-10-31T00:26:00.889Z" }, - { url = "https://files.pythonhosted.org/packages/0a/96/24bfd9d1a7f532b560dcee1a87096332e461354d3882124219bcaff65c09/ruff-0.14.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d6bc90307c469cb9d28b7cfad90aaa600b10d67c6e22026869f585e1e8a2db0", size = 13568414, upload-time = "2025-10-31T00:26:03.291Z" }, - { url = "https://files.pythonhosted.org/packages/a7/e7/138b883f0dfe4ad5b76b58bf4ae675f4d2176ac2b24bdd81b4d966b28c61/ruff-0.14.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2f8a0bbcffcfd895df39c9a4ecd59bb80dca03dc43f7fb63e647ed176b741e", size = 13315293, upload-time = "2025-10-31T00:26:05.708Z" }, - { url = "https://files.pythonhosted.org/packages/33/f4/c09bb898be97b2eb18476b7c950df8815ef14cf956074177e9fbd40b7719/ruff-0.14.3-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:678fdd7c7d2d94851597c23ee6336d25f9930b460b55f8598e011b57c74fd8c5", size = 13539444, upload-time = "2025-10-31T00:26:08.09Z" }, - { url = "https://files.pythonhosted.org/packages/9c/aa/b30a1db25fc6128b1dd6ff0741fa4abf969ded161599d07ca7edd0739cc0/ruff-0.14.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:1ec1ac071e7e37e0221d2f2dbaf90897a988c531a8592a6a5959f0603a1ecf5e", size = 12252581, upload-time = "2025-10-31T00:26:10.297Z" }, - { url = "https://files.pythonhosted.org/packages/da/13/21096308f384d796ffe3f2960b17054110a9c3828d223ca540c2b7cc670b/ruff-0.14.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:afcdc4b5335ef440d19e7df9e8ae2ad9f749352190e96d481dc501b753f0733e", size = 12307503, upload-time = "2025-10-31T00:26:12.646Z" }, - { url = "https://files.pythonhosted.org/packages/cb/cc/a350bac23f03b7dbcde3c81b154706e80c6f16b06ff1ce28ed07dc7b07b0/ruff-0.14.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:7bfc42f81862749a7136267a343990f865e71fe2f99cf8d2958f684d23ce3dfa", size = 12675457, upload-time = "2025-10-31T00:26:15.044Z" }, - { url = "https://files.pythonhosted.org/packages/cb/76/46346029fa2f2078826bc88ef7167e8c198e58fe3126636e52f77488cbba/ruff-0.14.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:a65e448cfd7e9c59fae8cf37f9221585d3354febaad9a07f29158af1528e165f", size = 13403980, upload-time = "2025-10-31T00:26:17.81Z" }, - { url = "https://files.pythonhosted.org/packages/9f/a4/35f1ef68c4e7b236d4a5204e3669efdeefaef21f0ff6a456792b3d8be438/ruff-0.14.3-py3-none-win32.whl", hash = "sha256:f3d91857d023ba93e14ed2d462ab62c3428f9bbf2b4fbac50a03ca66d31991f7", size = 12500045, upload-time = "2025-10-31T00:26:20.503Z" }, - { url = "https://files.pythonhosted.org/packages/03/15/51960ae340823c9859fb60c63301d977308735403e2134e17d1d2858c7fb/ruff-0.14.3-py3-none-win_amd64.whl", hash = "sha256:d7b7006ac0756306db212fd37116cce2bd307e1e109375e1c6c106002df0ae5f", size = 13594005, upload-time = "2025-10-31T00:26:22.533Z" }, - { url = "https://files.pythonhosted.org/packages/b7/73/4de6579bac8e979fca0a77e54dec1f1e011a0d268165eb8a9bc0982a6564/ruff-0.14.3-py3-none-win_arm64.whl", hash = "sha256:26eb477ede6d399d898791d01961e16b86f02bc2486d0d1a7a9bb2379d055dc1", size = 12590017, upload-time = "2025-10-31T00:26:24.52Z" }, +version = "0.14.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/df/55/cccfca45157a2031dcbb5a462a67f7cf27f8b37d4b3b1cd7438f0f5c1df6/ruff-0.14.4.tar.gz", hash = "sha256:f459a49fe1085a749f15414ca76f61595f1a2cc8778ed7c279b6ca2e1fd19df3", size = 5587844, upload-time = "2025-11-06T22:07:45.033Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/17/b9/67240254166ae1eaa38dec32265e9153ac53645a6c6670ed36ad00722af8/ruff-0.14.4-py3-none-linux_armv6l.whl", hash = "sha256:e6604613ffbcf2297cd5dcba0e0ac9bd0c11dc026442dfbb614504e87c349518", size = 12606781, upload-time = "2025-11-06T22:07:01.841Z" }, + { url = "https://files.pythonhosted.org/packages/46/c8/09b3ab245d8652eafe5256ab59718641429f68681ee713ff06c5c549f156/ruff-0.14.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:d99c0b52b6f0598acede45ee78288e5e9b4409d1ce7f661f0fa36d4cbeadf9a4", size = 12946765, upload-time = "2025-11-06T22:07:05.858Z" }, + { url = "https://files.pythonhosted.org/packages/14/bb/1564b000219144bf5eed2359edc94c3590dd49d510751dad26202c18a17d/ruff-0.14.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:9358d490ec030f1b51d048a7fd6ead418ed0826daf6149e95e30aa67c168af33", size = 11928120, upload-time = "2025-11-06T22:07:08.023Z" }, + { url = "https://files.pythonhosted.org/packages/a3/92/d5f1770e9988cc0742fefaa351e840d9aef04ec24ae1be36f333f96d5704/ruff-0.14.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81b40d27924f1f02dfa827b9c0712a13c0e4b108421665322218fc38caf615c2", size = 12370877, upload-time = "2025-11-06T22:07:10.015Z" }, + { url = "https://files.pythonhosted.org/packages/e2/29/e9282efa55f1973d109faf839a63235575519c8ad278cc87a182a366810e/ruff-0.14.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f5e649052a294fe00818650712083cddc6cc02744afaf37202c65df9ea52efa5", size = 12408538, upload-time = "2025-11-06T22:07:13.085Z" }, + { url = "https://files.pythonhosted.org/packages/8e/01/930ed6ecfce130144b32d77d8d69f5c610e6d23e6857927150adf5d7379a/ruff-0.14.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa082a8f878deeba955531f975881828fd6afd90dfa757c2b0808aadb437136e", size = 13141942, upload-time = "2025-11-06T22:07:15.386Z" }, + { url = "https://files.pythonhosted.org/packages/6a/46/a9c89b42b231a9f487233f17a89cbef9d5acd538d9488687a02ad288fa6b/ruff-0.14.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:1043c6811c2419e39011890f14d0a30470f19d47d197c4858b2787dfa698f6c8", size = 14544306, upload-time = "2025-11-06T22:07:17.631Z" }, + { url = "https://files.pythonhosted.org/packages/78/96/9c6cf86491f2a6d52758b830b89b78c2ae61e8ca66b86bf5a20af73d20e6/ruff-0.14.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a9f3a936ac27fb7c2a93e4f4b943a662775879ac579a433291a6f69428722649", size = 14210427, upload-time = "2025-11-06T22:07:19.832Z" }, + { url = "https://files.pythonhosted.org/packages/71/f4/0666fe7769a54f63e66404e8ff698de1dcde733e12e2fd1c9c6efb689cb5/ruff-0.14.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:95643ffd209ce78bc113266b88fba3d39e0461f0cbc8b55fb92505030fb4a850", size = 13658488, upload-time = "2025-11-06T22:07:22.32Z" }, + { url = "https://files.pythonhosted.org/packages/ee/79/6ad4dda2cfd55e41ac9ed6d73ef9ab9475b1eef69f3a85957210c74ba12c/ruff-0.14.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:456daa2fa1021bc86ca857f43fe29d5d8b3f0e55e9f90c58c317c1dcc2afc7b5", size = 13354908, upload-time = "2025-11-06T22:07:24.347Z" }, + { url = "https://files.pythonhosted.org/packages/b5/60/f0b6990f740bb15c1588601d19d21bcc1bd5de4330a07222041678a8e04f/ruff-0.14.4-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:f911bba769e4a9f51af6e70037bb72b70b45a16db5ce73e1f72aefe6f6d62132", size = 13587803, upload-time = "2025-11-06T22:07:26.327Z" }, + { url = "https://files.pythonhosted.org/packages/c9/da/eaaada586f80068728338e0ef7f29ab3e4a08a692f92eb901a4f06bbff24/ruff-0.14.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:76158a7369b3979fa878612c623a7e5430c18b2fd1c73b214945c2d06337db67", size = 12279654, upload-time = "2025-11-06T22:07:28.46Z" }, + { url = "https://files.pythonhosted.org/packages/66/d4/b1d0e82cf9bf8aed10a6d45be47b3f402730aa2c438164424783ac88c0ed/ruff-0.14.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f3b8f3b442d2b14c246e7aeca2e75915159e06a3540e2f4bed9f50d062d24469", size = 12357520, upload-time = "2025-11-06T22:07:31.468Z" }, + { url = "https://files.pythonhosted.org/packages/04/f4/53e2b42cc82804617e5c7950b7079d79996c27e99c4652131c6a1100657f/ruff-0.14.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c62da9a06779deecf4d17ed04939ae8b31b517643b26370c3be1d26f3ef7dbde", size = 12719431, upload-time = "2025-11-06T22:07:33.831Z" }, + { url = "https://files.pythonhosted.org/packages/a2/94/80e3d74ed9a72d64e94a7b7706b1c1ebaa315ef2076fd33581f6a1cd2f95/ruff-0.14.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5a443a83a1506c684e98acb8cb55abaf3ef725078be40237463dae4463366349", size = 13464394, upload-time = "2025-11-06T22:07:35.905Z" }, + { url = "https://files.pythonhosted.org/packages/54/1a/a49f071f04c42345c793d22f6cf5e0920095e286119ee53a64a3a3004825/ruff-0.14.4-py3-none-win32.whl", hash = "sha256:643b69cb63cd996f1fc7229da726d07ac307eae442dd8974dbc7cf22c1e18fff", size = 12493429, upload-time = "2025-11-06T22:07:38.43Z" }, + { url = "https://files.pythonhosted.org/packages/bc/22/e58c43e641145a2b670328fb98bc384e20679b5774258b1e540207580266/ruff-0.14.4-py3-none-win_amd64.whl", hash = "sha256:26673da283b96fe35fa0c939bf8411abec47111644aa9f7cfbd3c573fb125d2c", size = 13635380, upload-time = "2025-11-06T22:07:40.496Z" }, + { url = "https://files.pythonhosted.org/packages/30/bd/4168a751ddbbf43e86544b4de8b5c3b7be8d7167a2a5cb977d274e04f0a1/ruff-0.14.4-py3-none-win_arm64.whl", hash = "sha256:dd09c292479596b0e6fec8cd95c65c3a6dc68e9ad17b8f2382130f87ff6a75bb", size = 12663065, upload-time = "2025-11-06T22:07:42.603Z" }, ] [[package]]