Skip to content

v1.9.0 prep - #28

Merged
alex-omophub merged 2 commits into
mainfrom
develop
Aug 11, 2026
Merged

v1.9.0 prep#28
alex-omophub merged 2 commits into
mainfrom
develop

Conversation

@alex-omophub

@alex-omophub alex-omophub commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary by cubic

Add pagination to concept mappings and add iterators to fetch all pages. Also fix include_invalid so False is sent to the server, preventing unwanted deprecated mappings.

  • New Features

    • Mappings.get() and AsyncMappings.get() now accept page and page_size (default 1/100). Defaults preserve prior results.
    • Added Mappings.get_iter() and AsyncMappings.get_iter() to yield mappings across all pages.
  • Bug Fixes

    • include_invalid is now bool | None and is sent when False, allowing proper exclusion of deprecated mappings in both sync and async. Tests cover tri-state behavior.

Written for commit d7eb532. Summary will update on new commits.

Review in cubic

…gs API

- Added pagination support to `Mappings.get()` and `AsyncMappings.get()` methods, allowing for retrieval of mappings across multiple pages.
- Introduced `Mappings.get_iter()` and `AsyncMappings.get_iter()` methods to iterate through all mappings for a concept, handling pagination seamlessly.
- Updated tests to verify pagination functionality and ensure correct behavior of new methods.
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.68421% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/omophub/resources/mappings.py 73.68% 5 Missing and 5 partials ⚠️

📢 Thoughts on this report? Let us know!

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread CHANGELOG.md
Comment thread src/omophub/resources/mappings.py Outdated
…ter handling

- Fixed the `include_invalid` parameter in `Mappings.get()` and `AsyncMappings.get()` methods to correctly reach the server when set to `False`, allowing for proper exclusion of deprecated mappings.
- Updated the parameter type to `bool | None` and modified documentation to clarify its behavior.
- Added unit tests to verify the correct handling of the `include_invalid` parameter in various scenarios.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="CHANGELOG.md">

<violation number="1" location="CHANGELOG.md:30">
P3: The new Fixed entry ends with a truncated, grammatically incomplete sentence: "Omitting it behaves exactly as before, so only callers who explicitly passed `False` - and were being ignored." The clause after "so" ("only callers who explicitly passed `False`") is never completed, so the sentence trails off with a dangling dash rather than stating the intended conclusion (that the change only affects callers who explicitly passed `False` and were previously being ignored). Please complete the sentence so the release note reads cleanly.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread CHANGELOG.md
truthy, and this endpoint defaults to *including* deprecated mappings, so
asking to exclude them did nothing. It is now `bool | None`: omit it for the
server default, pass `False` to exclude. Omitting it behaves exactly as
before, so only callers who explicitly passed `False` - and were being

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The new Fixed entry ends with a truncated, grammatically incomplete sentence: "Omitting it behaves exactly as before, so only callers who explicitly passed False - and were being ignored." The clause after "so" ("only callers who explicitly passed False") is never completed, so the sentence trails off with a dangling dash rather than stating the intended conclusion (that the change only affects callers who explicitly passed False and were previously being ignored). Please complete the sentence so the release note reads cleanly.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At CHANGELOG.md, line 30:

<comment>The new Fixed entry ends with a truncated, grammatically incomplete sentence: "Omitting it behaves exactly as before, so only callers who explicitly passed `False` - and were being ignored." The clause after "so" ("only callers who explicitly passed `False`") is never completed, so the sentence trails off with a dangling dash rather than stating the intended conclusion (that the change only affects callers who explicitly passed `False` and were previously being ignored). Please complete the sentence so the release note reads cleanly.</comment>

<file context>
@@ -20,6 +20,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
+  truthy, and this endpoint defaults to *including* deprecated mappings, so
+  asking to exclude them did nothing. It is now `bool | None`: omit it for the
+  server default, pass `False` to exclude. Omitting it behaves exactly as
+  before, so only callers who explicitly passed `False` - and were being
+  ignored.
+
</file context>

@alex-omophub
alex-omophub merged commit 5fc72f9 into main Aug 11, 2026
13 of 14 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.

1 participant