Repository navigation
Tests for every SDK method and model; five error-handling fixes - #39
Merged
Merged
Conversation
A 200 with a non-JSON or empty body now raises SaturdayError (code invalid_response) instead of leaking json.JSONDecodeError; Retry-After is kept on typed 4xx errors, not only on 429/5xx; an empty path segment is rejected like dot segments instead of requesting the collection route; two docstrings named PermissionDeniedError, not the builtin PermissionError; the README resource table lists athletes.create_onboarding_link. Each fix has a regression test that failed before it in tests/test_bugfixes.py, and the non-JSON xfail in test_request.py now runs as a passing test.
All nine README python blocks now execute against mocked HTTP with recorded responses (previously two ran and the rest only compiled), as do the package, Saturday and coach docstring examples. The two docstring snippets are fragments that assume the Saturday import, so their tests seed that name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests now cover every public method and model of the Python SDK, against a mocked HTTP layer, and every README and docstring example runs as a test (640 passed, 2 skipped; branch coverage 100%, from 99.3%).
Bug fixes, public API unchanged:
Responses for nutrition.extract, infer, knowledge, untyped coach reads, organization subscriptions and licenses, integrations sync and disconnect, GearItem and ProductCategory are built from types.py and marked CONSTRUCTED: they prove request shape, not the live response shape.
Written by Meta Muse Code in a fenced lane; reviewed and tests rerun by Claude (OPS).
🤖 Generated with Claude Code