Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
Expand All @@ -34,7 +34,7 @@ jobs:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Required for hatch-vcs to get version from tags
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install build tools
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Build package
run: python -m build
- name: Upload distributions
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: release-dists
path: dist/
Expand All @@ -39,7 +39,7 @@ jobs:
id-token: write # Required for trusted publishing
steps:
- name: Download distributions
uses: actions/download-artifact@v5
uses: actions/download-artifact@v8
with:
name: release-dists
path: dist/
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: The [Unreleased] link still points to v1.7.1...HEAD. Update it to v1.8.1...HEAD now that v1.8.1 is the latest release, consistent with the pattern used by all prior version links.

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

<comment>The `[Unreleased]` link still points to `v1.7.1...HEAD`. Update it to `v1.8.1...HEAD` now that v1.8.1 is the latest release, consistent with the pattern used by all prior version links.</comment>

<file context>
@@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [1.8.1] - 2026-06-01
+
+### Changed
</file context>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Missing link definitions for [1.8.1] and [1.8.0]. Add reference-style link definitions at the bottom of the file so the version headings render as clickable links.

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

<comment>Missing link definitions for `[1.8.1]` and `[1.8.0]`. Add reference-style link definitions at the bottom of the file so the version headings render as clickable links.</comment>

<file context>
@@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [1.8.1] - 2026-06-01
+
+### Changed
</file context>

and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.8.1] - 2026-06-01

### Changed

- `Search.semantic()`, `Search.semantic_iter()`, `AsyncSearch.semantic()`, and
`AsyncSearch.semantic_iter()` now call the canonical path
`GET /v1/search/semantic` instead of `GET /v1/concepts/semantic-search`. The
legacy path remains a permanent server-side alias (emits `Deprecation: true`
+ `Link: …rel="successor-version"` headers), so older installations of this
SDK continue to work - no breaking change for callers.

## [1.8.0] - 2026-05-25

### Added
Expand Down
10 changes: 4 additions & 6 deletions src/omophub/resources/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def semantic(
if threshold is not None:
params["threshold"] = threshold

return self._request.get("/concepts/semantic-search", params=params)
return self._request.get("/search/semantic", params=params)

def semantic_iter(
self,
Expand Down Expand Up @@ -369,7 +369,7 @@ def fetch_page(
if threshold is not None:
params["threshold"] = threshold

result = self._request.get_raw("/concepts/semantic-search", params=params)
result = self._request.get_raw("/search/semantic", params=params)

data = result.get("data", [])
results = data.get("results", data) if isinstance(data, dict) else data
Expand Down Expand Up @@ -656,7 +656,7 @@ async def semantic(
if threshold is not None:
params["threshold"] = threshold

return await self._request.get("/concepts/semantic-search", params=params)
return await self._request.get("/search/semantic", params=params)

async def semantic_iter(
self,
Expand Down Expand Up @@ -690,9 +690,7 @@ async def fetch_page(
if threshold is not None:
params["threshold"] = threshold

result = await self._request.get_raw(
"/concepts/semantic-search", params=params
)
result = await self._request.get_raw("/search/semantic", params=params)

data = result.get("data", [])
results = data.get("results", data) if isinstance(data, dict) else data
Expand Down
24 changes: 12 additions & 12 deletions tests/unit/resources/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def test_semantic_search(self, sync_client: OMOPHub, base_url: str) -> None:
},
"meta": {"pagination": {"page": 1, "has_next": False, "total_items": 1}},
}
route = respx.get(f"{base_url}/concepts/semantic-search").mock(
route = respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json=semantic_response)
)

Expand All @@ -316,7 +316,7 @@ def test_semantic_search_with_filters(
self, sync_client: OMOPHub, base_url: str
) -> None:
"""Test semantic search with all filters."""
route = respx.get(f"{base_url}/concepts/semantic-search").mock(
route = respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json={"success": True, "data": {"results": []}})
)

Expand Down Expand Up @@ -353,7 +353,7 @@ def test_semantic_iter_single_page(
],
"meta": {"pagination": {"page": 1, "has_next": False}},
}
respx.get(f"{base_url}/concepts/semantic-search").mock(
respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json=semantic_response)
)

Expand Down Expand Up @@ -385,7 +385,7 @@ def mock_response(request):
return Response(200, json=page1_response)
return Response(200, json=page2_response)

respx.get(f"{base_url}/concepts/semantic-search").mock(side_effect=mock_response)
respx.get(f"{base_url}/search/semantic").mock(side_effect=mock_response)

results = list(sync_client.search.semantic_iter("diabetes", page_size=1))
assert len(results) == 2
Expand All @@ -402,7 +402,7 @@ def test_semantic_iter_empty_response(
"data": [],
"meta": {"pagination": {"page": 1, "has_next": False}},
}
respx.get(f"{base_url}/concepts/semantic-search").mock(
respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json=semantic_response)
)

Expand Down Expand Up @@ -555,7 +555,7 @@ async def test_async_semantic_search(
"results": [{"concept_id": 4329847, "similarity_score": 0.95}],
},
}
respx.get(f"{base_url}/concepts/semantic-search").mock(
respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json=semantic_response)
)

Expand All @@ -568,7 +568,7 @@ async def test_async_semantic_with_filters(
self, async_client: omophub.AsyncOMOPHub, base_url: str
) -> None:
"""Test async semantic search with filters."""
route = respx.get(f"{base_url}/concepts/semantic-search").mock(
route = respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json={"success": True, "data": {"results": []}})
)

Expand All @@ -591,7 +591,7 @@ async def test_async_semantic_with_all_filters(
self, async_client: omophub.AsyncOMOPHub, base_url: str
) -> None:
"""Test async semantic search with all available filters."""
route = respx.get(f"{base_url}/concepts/semantic-search").mock(
route = respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json={"success": True, "data": {"results": []}})
)

Expand Down Expand Up @@ -629,7 +629,7 @@ async def test_async_semantic_iter_single_page(
],
"meta": {"pagination": {"page": 1, "has_next": False}},
}
respx.get(f"{base_url}/concepts/semantic-search").mock(
respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json=semantic_response)
)

Expand Down Expand Up @@ -674,7 +674,7 @@ def mock_response(request):
return Response(200, json=page2_response)
return Response(200, json=page3_response)

respx.get(f"{base_url}/concepts/semantic-search").mock(side_effect=mock_response)
respx.get(f"{base_url}/search/semantic").mock(side_effect=mock_response)

results = []
async for item in async_client.search.semantic_iter("diabetes", page_size=1):
Expand All @@ -696,7 +696,7 @@ async def test_async_semantic_iter_with_filters(
"data": [{"concept_id": 1, "similarity_score": 0.9}],
"meta": {"pagination": {"page": 1, "has_next": False}},
}
route = respx.get(f"{base_url}/concepts/semantic-search").mock(
route = respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json=semantic_response)
)

Expand Down Expand Up @@ -732,7 +732,7 @@ async def test_async_semantic_iter_empty_response(
"data": [],
"meta": {"pagination": {"page": 1, "has_next": False}},
}
respx.get(f"{base_url}/concepts/semantic-search").mock(
respx.get(f"{base_url}/search/semantic").mock(
return_value=Response(200, json=semantic_response)
)

Expand Down
Loading