Skip to content

Conversation

@khoroshevskyi
Copy link
Member

Fixed assignments of schemas to peps

@khoroshevskyi khoroshevskyi requested a review from Copilot March 27, 2025 21:10
Copy link
Contributor

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 project to properly support the use of LATEST_SCHEMA_VERSION when assigning schemas to PEPs.

  • Refactors schema lookup queries in pepdbagent/modules/project.py to handle the special LATEST_SCHEMA_VERSION.
  • Updates the version in pepdbagent/_version.py from 0.12.1 to 0.12.2.
  • Updates the changelog in docs/changelog.md.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pepdbagent/modules/project.py Adds conditions to query for the latest schema version using LATEST_SCHEMA_VERSION.
pepdbagent/_version.py Bumps version to 0.12.2.
docs/changelog.md Updates changelog with the new release details.
Comments suppressed due to low confidence (2)

pepdbagent/modules/project.py:373

  • Consider adding a .limit(1) clause to the query that retrieves the latest schema version to ensure that only a single record is returned, which would make the intent explicit and potentially avoid unexpected results.
if schema_version == LATEST_SCHEMA_VERSION:

pepdbagent/modules/project.py:714

  • Similarly, in _convert_update_schema_id, consider adding a .limit(1) clause to the latest schema query to enforce a single result and clarify the query intent.
if schema_version == LATEST_SCHEMA_VERSION:

@khoroshevskyi khoroshevskyi merged commit ebde3a5 into master Mar 28, 2025
7 checks passed
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