Skip to content

fix: Add podcasts filter to news search - #101

Merged
robcaulk merged 2 commits into
devfrom
em/podcast-search
Aug 20, 2026
Merged

fix: Add podcasts filter to news search#101
robcaulk merged 2 commits into
devfrom
em/podcast-search

Conversation

@emmy-devop

@emmy-devop emmy-devop commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Requested by @drafty

What

  • Add the canonical podcasts parameter to synchronous and asynchronous search_news calls.
  • Place it after the existing final positional parameter sort_by, preserving every prior positional argument slot.
  • Type it as Literal["include", "only", "none"], default it to "include", and forward it as the plural query parameter.
  • Document the behavior and test all explicit values in both sync and async clients.

Why

This implements the approved public Python contract from asknews/api!375 and stories-service!213. The generated asknews-sdk OpenAPI repository is intentionally out of scope until the gateway is deployed. mcp-service!72 remains blocked until this Python SDK release is available.

How I tested

  • uv run pytest tests/api/test_news.py — 14 passed
  • explicit signature inspection — sync and async tails are sort_by, podcasts, *, http_headers; default remains include
  • uv run coverage run -m pytest --junitxml=report.xml — 72 passed
  • uv run coverage report — 89% total coverage
  • uv run ruff check asknews_sdk — passed
  • uv build --wheel — built asknews-0.13.56-py3-none-any.whl

Risk / rollback

Low and limited to the query arguments sent by search_news. Existing positional callers retain their original parameter mapping, and the new default is the server-approved backward-compatible include behavior. Revert the two feature commits to remove the SDK parameter. Merge timing should follow deployment of the stories and gateway contracts to avoid older servers rejecting the new query parameter.

Merging this PR into main triggers commitizen release automation and publishes a new patch release of the Python asknews package to PyPI. No version, changelog, generated-client, or workflow files are changed.

@emmy-devop

Copy link
Copy Markdown
Collaborator Author

Review feedback addressed in ccb92c6: podcasts now follows sort_by in both public signatures, preserving every existing positional argument slot, and async forwarding is covered for explicit include, only, and none values. Focused tests (14), full suite (72), Ruff, signature inspection, and wheel build all pass.

@robcaulk
robcaulk changed the base branch from main to dev August 20, 2026 13:47
@robcaulk
robcaulk merged commit 0f43912 into dev Aug 20, 2026
10 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.

2 participants