feat(curations): Minor fix and tests#12
Merged
heliocastro merged 2 commits intoheliocastro:mainfrom Nov 7, 2025
Merged
Conversation
- VcsType was not properly accepting correct string values, but list instead. Fixed to proper validate entry - Added VcsInfoCurationData and replaced VcsInfo in PackageCurationData - Add Ort documentation examples as a test set Signed-off-by: Helio Chissini de Castro <helio.chissini.de.castro@cariad.technology>
Signed-off-by: Helio Chissini de Castro <helio.chissini.de.castro@cariad.technology>
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for package curations with VCS type handling improvements and test coverage. The version is bumped from 0.3.0 to 0.3.1, and CI testing workflows are reorganized.
- Introduced
VcsInfoCurationDatamodel for package curations with optional VCS fields - Refactored
VcsTypevalidation to use a simpler string-based model with pre-validation - Added test coverage for package curation examples and consolidated YAML loading utilities
- Added
richlibrary as a dev dependency - Reorganized testing workflows into separate build and testing pipelines
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updated package version to 0.3.1, added rich, markdown-it-py, and mdurl dependencies |
| pyproject.toml | Bumped version to 0.3.1, added rich dev dependency, removed hatch config, updated pytest config |
| src/ort/models/vcstype.py | Simplified VcsType model from list-based aliases to string-based name with pre-validation |
| src/ort/models/vcsinfo_curation_data.py | New model for VCS info in curations with all optional fields |
| src/ort/models/package_curation_data.py | Changed vcs field from VcsInfo to VcsInfoCurationData |
| tests/utils/load_yaml_config.py | New utility function for loading YAML test configuration files |
| tests/test_package_curation.py | New tests validating package curation examples from ORT documentation |
| tests/test_ort_repository_configuration.py | Refactored to use shared load_yaml_config utility |
| tests/data/example_simple_curation.yml | New test data file with simple curation example |
| tests/data/example_curations.yml | New test data file with comprehensive curation examples |
| .github/workflows/testing.yml | New dedicated pytest workflow for running tests |
| .github/workflows/build.yml | Removed test execution (moved to separate testing workflow) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| curations: | ||
| comment: 'Repository moved to https://gitlab.ow2.org.' | ||
| vcs: | ||
| type: 'Giot' |
There was a problem hiding this comment.
Corrected spelling of 'Giot' to 'Git'.
Suggested change
| type: 'Giot' | |
| type: 'Git' |
| DATA_CONFIG_DIR = Path(__file__).parent.parent / "data" | ||
|
|
||
|
|
||
| def load_yaml_config(filename: str, data_dir: Path = DATA_CONFIG_DIR) -> Any: |
There was a problem hiding this comment.
Mixing implicit and explicit returns may indicate an error, as implicit returns always return None.
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.
No description provided.