Skip to content

fix(model): Analyzer project scopes#19

Merged
heliocastro merged 2 commits intomainfrom
fix/analyzer_scopes
Mar 3, 2026
Merged

fix(model): Analyzer project scopes#19
heliocastro merged 2 commits intomainfrom
fix/analyzer_scopes

Conversation

@heliocastro
Copy link
Owner

No description provided.

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>
@heliocastro heliocastro self-assigned this Mar 3, 2026
Copilot AI review requested due to automatic review settings March 3, 2026 15:43
@heliocastro heliocastro merged commit f7e6d31 into main Mar 3, 2026
18 checks passed
@heliocastro heliocastro deleted the fix/analyzer_scopes branch March 3, 2026 15:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_dependencies to default to an empty collection and accept analyzer input via the "scopes" key.
  • Bump package version to 0.6.4 and update dev dependency minimums.
  • Refresh pre-commit tool revisions and the uv.lock dependency 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.

Comment on lines 66 to 67
"is available. NOTE: Do not use this property to access scope information. Use scopes instead, which is"
"correctly initialized in all cases.",
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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.",

Copilot uses AI. Check for mistakes.
Comment on lines +62 to +63
scope_dependencies: set[Scope] = Field(
default_factory=set,
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
scope_dependencies: set[Scope] = Field(
default_factory=set,
scope_dependencies: list[Scope] = Field(
default_factory=list,

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants