✨ feat(repository): add Repository.connect() factory classmethod#403
Merged
Conversation
The bare `python` command is not available in uv-managed environments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #403 +/- ##
=======================================
Coverage 91.76% 91.76%
=======================================
Files 33 33
Lines 7333 7333
=======================================
Hits 6729 6729
Misses 604 604
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…environments Try bare `python` first (works in CI), fall back to `uv run python` (works in uv-managed local environments). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mples The set_system_defaults() method requires a limits argument. The unavailability guide examples were only passing on_unavailable, causing doctest failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Repository.connect()async classmethod as the recommended one-call entry point for connecting to existing infrastructure (resolves namespace, performs version check, no infra provisioning)SyncRepository.connect()via the async-to-sync transformer for sync parityRepository.__init__()direct construction withDeprecationWarningdirecting users toconnect()orbuilder()_connect()helper that callsRepository.connect()connect()or builder patternsconnect()as the primary exampleTest plan
uv run pytest tests/unit/ -vpasses (connect() unit tests, deprecation warning tests, CLI migration tests)uv run pytest tests/integration/ -vpasses with LocalStackuv run pytest tests/e2e/test_localstack.py -vpasses with LocalStackuv run mypy src/zae_limiter/reports no new type errorspre-commit run --all-filespasses (sync code generation is up to date)grep -rn "Repository(" tests/ --include="*.py"shows onlyconnect(),builder(), or_skip_deprecation_warningcallsCloses #381
🤖 Generated with Claude Code