feat: Implement SPDX Schema Validation - #101
Open
saquibsaifee wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
@eaglei15 this PR is ready to be reviewed. |
Implements _validate_spdx_schema_version inside CLIController with proper SPDX validation logic via the official spdx-tools package. - Modifies src/controllers/cli_controller.py to import spdx-tools as a hard dependency. - Uses JsonLikeDictParser and validate_full_spdx_document to validate incoming SPDX dicts. - Supports SPDX 2.2 and 2.3 schema versions. - Adds comprehensive unit tests for both success and failure cases. - Updates pyproject.toml with the spdx-tools dependency. Signed-off-by: saquibsaifee <saquibsaifee2@gmail.com>
saquibsaifee
force-pushed
the
feat/spdx-schema-validation
branch
from
August 31, 2026 17:04
fdf2769 to
aa46c16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 What: The code health issue addressed was a dead, unimplemented method
_validate_spdx_schema_versioninsideCLIController.💡 Why: Implementing the proper SPDX schema validation logic allows a clean structural mapping for downstream operations. Using an official open source tool instead of creating our own makes the codebase better and more maintainable.
✅ Verification: Ran pytest unit tests, verified coverage, evaluated the solution structurally, and it has successfully passed the code review step.
✨ Result: A functioning, robust method in the CLI controller ready to be connected and called whenever SPDX validation is enabled.