Skip to content

API: Eid sorting#42

Merged
softlukas merged 6 commits into
masterfrom
eid_sorting
Jul 14, 2026
Merged

API: Eid sorting#42
softlukas merged 6 commits into
masterfrom
eid_sorting

Conversation

@softlukas

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for sorting the /{etype}/get entity EID listing endpoint by entity ID (eid), and introduces API tests to validate ascending/descending ordering.

Changes:

  • Extend sort parameter validation to accept the special pseudo-attribute eid.
  • Map eid sorting to the snapshot field (last.eid) when applying MongoDB sorting.
  • Add API tests covering sort=eid:1 and sort=eid:-1.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
dp3/api/routers/entity.py Allows eid as a special sort key and maps it to last.eid for snapshot sorting.
tests/test_api/test_get_entity_eids.py Adds tests for ascending/descending EID sorting (but introduces an import change that likely breaks test discovery).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_api/test_get_entity_eids.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread tests/test_api/test_get_entity_eids.py Outdated
Comment thread tests/test_api/test_get_entity_eids.py Outdated

@xsedla1o xsedla1o left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See comment. Otherwise looks good!

Comment thread dp3/api/routers/entity.py Outdated
@softlukas softlukas requested a review from xsedla1o July 14, 2026 12:04
@softlukas softlukas merged commit c38ea3c into master Jul 14, 2026
4 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.

3 participants