Conversation
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 updates the Python ORT model to better align with analyzer output for project scope data, alongside routine version/tooling bumps for the release.
Changes:
- Update
Project.scope_dependenciesto default to an empty collection and accept analyzer input via the"scopes"key. - Bump package version to
0.6.4and update dev dependency minimums. - Refresh pre-commit tool revisions and the
uv.lockdependency lock.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/ort/models/project.py |
Adjusts project scope field defaults and adds an alias to accept analyzer "scopes" input. |
pyproject.toml |
Bumps project version and updates dev dependency minimum versions. |
.pre-commit-config.yaml |
Updates pinned tool revisions (ruff, conventional-pre-commit, uv). |
uv.lock |
Regenerates lockfile with updated dependency versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "is available. NOTE: Do not use this property to access scope information. Use scopes instead, which is" | ||
| "correctly initialized in all cases.", |
There was a problem hiding this comment.
The field description says "Use scopes instead", but this model does not expose a scopes attribute/property—only scope_dependencies. With the new alias, scopes exists only as an input key, not a Python attribute, so this is misleading. Consider updating the wording to reference scope_dependencies, or renaming the field to scopes (keeping an alias for backwards compatibility) so the documentation matches the API.
| "is available. NOTE: Do not use this property to access scope information. Use scopes instead, which is" | |
| "correctly initialized in all cases.", | |
| "is available. NOTE: In Python, use the 'scope_dependencies' attribute to access scope information; the" | |
| "input alias 'scopes' is provided for compatibility.", |
| scope_dependencies: set[Scope] = Field( | ||
| default_factory=set, |
There was a problem hiding this comment.
scope_dependencies is typed as set[Scope], but Scope is a mutable Pydantic BaseModel (not frozen) and does not implement __hash__, so parsing a non-empty scopes list will raise TypeError: unhashable type: 'Scope' when building the set. Consider switching this field to a list (to match YAML/JSON lists), or make Scope hashable (e.g., frozen + stable __hash__/__eq__) if set semantics are required.
| scope_dependencies: set[Scope] = Field( | |
| default_factory=set, | |
| scope_dependencies: list[Scope] = Field( | |
| default_factory=list, |
No description provided.