Skip to content

Bring docs up to date for 0.3.0 - #12

Merged
dvejsada merged 1 commit into
mainfrom
claude/ha-integration-open-issues-1hg1fx
Sep 27, 2026
Merged

dvejsada merged 1 commit into
mainfrom
claude/ha-integration-open-issues-1hg1fx

Conversation

@dvejsada

Copy link
Copy Markdown
Owner

This is a docs-only update ahead of the v0.3.0 release. The README becomes the PyPI project page, so it should be accurate before the release is published. There are no code changes beyond docstrings.

What was out of date

  • README: undocumented methods. products.get_cards, products.get_week_sales, delivery.get_addresses and delivery.get_active_address_id were added in 0.2.0 but never documented. They are now listed, together with how get_next_slots resolves an address when login doesn't return one.
  • README: incomplete error contract. It now also covers:
    • batch operations: cart.add_items returns only the IDs it added, and orders.get_all_delivered returns the orders gathered so far if a page fails;
    • login raising RohlikAPIError for any unexpected status;
    • get_shopping_list raising ValueError when called without an ID.
  • README: Rohlík.cz-only wording. The intro and the credentials section now mention the other shops, and Features links to "Other shops". The manual-session example also shows the is_logged_in, user_id and address_id properties.
  • PUBLISHING.md: it asked you to create publish.yml, which already exists, and described a tag-push flow. It now describes the real flow:
    1. bump __version__,
    2. publish a GitHub Release with tag v<version>,
    3. the trusted-publishing workflow uploads to PyPI.
  • example.py: its docstring claimed the network calls were commented out, but it logs in and makes three calls. The docstring now says what runs. The example also picks the shop via SITES and shows the new methods and cart fields.
  • pyproject.toml: the PyPI description and keywords now cover Knuspr.de, Gurkerl.at, Kifli.hu and Sezamo.ro.
  • Docstrings: the package docstring and the login / logout / get_data docstrings no longer say Rohlik.cz only. login now documents that it can raise RohlikAPIError.

Testing

  • ruff check ., black --check . and mypy rohlik_api pass.
  • pytest: 152 passed.
  • python -m build produces rohlik_api-0.3.0 (wheel and sdist), and twine check passes on both.

🤖 Generated with Claude Code

https://claude.ai/code/session_0135WLPbnfESWnAJmw4P8uRH


Generated by Claude Code

- README: document products.get_cards / get_week_sales and
  delivery.get_addresses / get_active_address_id (added in 0.2.0 but never
  documented); complete the error contract (batch operations, login's
  RohlikAPIError, get_shopping_list's ValueError); mention the other
  Rohlík Group shops in the intro and credentials section; link the
  "Other shops" section from Features.
- PUBLISHING.md: describe the actual release flow (publish a GitHub
  Release -> trusted-publishing workflow) instead of asking to create a
  workflow that already exists.
- example.py: its docstring claimed the network calls were commented out;
  it now says what runs, and shows shop selection via SITES plus the
  newer methods and cart fields.
- pyproject: PyPI description and keywords cover the other shops.
- Package and client docstrings no longer say Rohlik.cz only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0135WLPbnfESWnAJmw4P8uRH

Copy link
Copy Markdown
Owner Author

@claude review this PR. It is docs-only: check that every README, PUBLISHING.md, example.py and docstring claim matches the actual code and the publish workflow (method names, signatures, return types, error behavior).


Generated by Claude Code

@claude

claude Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Claude finished @dvejsada's task in 1m 20s —— View job


Review of PR #12 — docs update for 0.3.0

  • Gather context (diff, repo structure)
  • Verify README claims against actual code (method names, signatures, return types, error behavior)
  • Verify PUBLISHING.md against actual workflow file
  • Verify example.py against actual code/output
  • Verify docstrings (__init__.py, client.py)
  • Verify pyproject.toml claims
  • Post final review

I checked every documentation claim in this PR against the actual implementation. Everything I verified matches the code exactly — no discrepancies found.

What I verified

README.md

  • New methods products.get_cards, products.get_week_sales, delivery.get_addresses, delivery.get_active_address_id — all exist in rohlik_api/services/products.py and delivery.py with the documented signatures and return types (list[ProductCard] | None, dict[str, Any] | None, int | None).
  • get_next_slots() fallback-to-saved-address behavior (rohlik_api/services/delivery.py:71-95) matches the described logic exactly, including caching the resolved address on self._auth.address_id.
  • Error contract additions all confirmed in code:
    • login raises InvalidCredentialsError on 401 and RohlikAPIError for any other non-200 status (rohlik_api/auth.py:88-104).
    • cart.add_items returns only successfully-added IDs, logging failures (rohlik_api/services/cart.py:39-67).
    • orders.get_all_delivered returns orders gathered so far if a page fails (rohlik_api/services/orders.py:59-84).
    • account.get_shopping_list raises ValueError when shopping_list_id is falsy (rohlik_api/services/account.py:44-51).
  • SITES table (codes cz/de/at/hu/ro, currencies) matches rohlik_api/sites.py exactly.
  • client.is_logged_in, client.user_id, client.address_id properties exist on RohlikAPI (rohlik_api/client.py:150-161).
  • ProductCard fields used in the get_week_sales example (name, price, original_price, on_sale) all exist on the model.
  • The #other-shops anchor link resolves correctly to the new ### Other shops section.

PUBLISHING.md

  • Accurately describes the real .github/workflows/publish.yml: triggers on release: published, builds via python -m build, validates with twine check, publishes via pypa/gh-action-pypi-publish using OIDC trusted publishing into the pypi environment. The old text asking to create the workflow and describing a tag-push trigger is gone, as claimed.

example.py

  • New docstring ("logs in and runs a product search, a cart fetch and a recipe search; the other calls are commented out") matches the actual uncommented calls: products.search, cart.get_content, recipes.search.
  • SITE = SITES["cz"] and the commented alternatives ("de", "at", "hu", "ro") match the real SITES keys.

pyproject.toml / docstrings

  • Description and keywords now correctly reference Knuspr.de, Gurkerl.at, Kifli.hu, Sezamo.ro.
  • rohlik_api/__init__.py, client.py docstrings (login, logout, get_data) no longer say "Rohlik.cz service" and the added RohlikAPIError raise-note on login matches AuthManager.login's actual behavior.

Minor observations (not blocking, purely optional)

  • None worth raising — this is a clean, accurate docs-only diff. Nice attention to matching return types and error-raising conditions precisely rather than just prose descriptions.

No code changes needed. This PR is ready to merge as-is from a documentation-accuracy standpoint.

@dvejsada
dvejsada merged commit d4779ff into main Sep 27, 2026
1 check 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