Skip to content

Updates and bug fixes - #15

Merged
alex-omophub merged 14 commits into
mainfrom
develop
Oct 22, 2026
Merged

alex-omophub merged 14 commits into
mainfrom
develop

Conversation

@alex-omophub

@alex-omophub alex-omophub commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary by cubic

Fixes several correctness bugs in the omophub R client and bumps the package to 1.10.0.

Bug Fixes

  • Batch concept and recommendation requests keep JSON arrays for single IDs, filters, and named input vectors; vocabulary filters are validated before sending.
  • get_by_code() percent-encodes vocabulary and code path segments, so codes containing slashes or percent signs work with all query options.
  • HTTP failures now raise the documented omophub_* condition classes (omophub_validation_error, omophub_auth_error, omophub_forbidden_error, omophub_not_found, omophub_rate_limit_error, omophub_server_error, omophub_connection_error), carrying status_code, error_code, details, request_id, and retry_after; the httr2 classes and e$resp are preserved for existing handlers. Unparseable or empty error bodies fall back to the HTTP status without masking the failure.

Changed

  • Autocomplete now calls /search/autocomplete and returns compact suggestion, type, and count fields; basic search enforces the API's 3–500 character query range.
  • CI workflows no longer share an API key for live tests, avoiding exhausted rate limits; the live suite runs once in integration-tests.yaml.

Written for commit 966ac15. Summary will update on new commits.

View guided diff Turn on auto-fix

alex-omophub and others added 13 commits September 8, 2026 14:22
- Bumped package version from 1.9.1 to 1.10.0 in DESCRIPTION.
- Updated autocomplete functionality to call the canonical `/search/autocomplete` endpoint, returning compact suggestion fields.
- Improved basic search validation to enforce a 3-500 character query length.
- Adjusted documentation and tests to reflect these changes, ensuring clarity and consistency in parameter usage.
- Updated the `concept_ids`, `relationship_types`, `vocabulary_ids`, and `domain_ids` in the API to preserve JSON array structure by using unname and as.list.
- Modified tests to reflect these changes, ensuring that the body of requests maintains the correct format for concept recommendations.
- Added `httpuv` as a suggested dependency in DESCRIPTION.
- Documented improvements in NEWS.md regarding JSON array preservation for various filters.
Fix concept-code lookups containing slashes
Enhance JSON handling in concepts API and update tests

@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 23 files

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

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread tests/testthat/test-request-errors.R Resolved
Comment thread R/concepts.R Resolved
Comment thread R/utils.R Resolved
Comment thread inst/examples/error_handling.R Resolved
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.15254% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
R/utils.R 98.80% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@alex-omophub
alex-omophub merged commit 433dfdb into main Oct 22, 2026
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