Skip to content

Fix concept-code lookups containing slashes - #32

Open
konstjar wants to merge 2 commits into
mainfrom
codex/fix-by-code-path-encoding
Open

konstjar wants to merge 2 commits into
mainfrom
codex/fix-by-code-path-encoding

Conversation

@konstjar

@konstjar konstjar commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • percent-encode vocabulary IDs and concept codes as individual URL path segments
  • preserve slash-containing ICD-O codes such as 8032/3 as a single route parameter
  • cover synchronous and asynchronous clients with regression tests

Validation

  • uv run --extra dev pytest tests/unit/resources/test_concepts.py -q (40 passed)
  • uv run --extra dev ruff check src/ tests/unit/resources/test_concepts.py
  • uv run --extra dev ruff format --check src/ tests/unit/resources/test_concepts.py
  • uv run --extra dev mypy src/omophub

Summary by cubic

Fixes concept lookups so codes containing slashes, like ICD-O 8032/3, are sent as one URL path segment instead of being split into multiple parameters.

  • Percent-encodes vocabulary IDs and concept codes in get_by_code for both sync and async clients.
  • Clarifies in the docstrings that vocabulary_id and concept_code must be raw, URL-unencoded values.
  • Adds regression tests covering slash-containing codes for both clients.

Written for commit 28a168a. Summary will update on new commits.

Review in cubic

@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 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 2 files

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

Re-trigger cubic

Comment thread src/omophub/resources/concepts.py
@konstjar
konstjar force-pushed the codex/fix-by-code-path-encoding branch from 3acd3ff to 4e43715 Compare September 21, 2026 15:50

This branch has not been deployed

No deployments
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