Completes the optional-extras story so the base package works without redis or minio installed.
Fail-fast adapter imports — redis_adapter.py and minio_adapter.py now raise a clear ImportError with install instructions (python-repositories[redis] / [minio]) instead of failing later with NameError.
Lazy package exports — python_repositories and python_repositories.adapters use PEP 562 __getattr__ so interfaces load eagerly but adapters load only when accessed.
Unit tests — tests/unit/optional_dependencies_test.py covers base import, lazy loading, and missing-extra error messages.
Docs — README clarifies that interfaces work with the base install; adapters require the matching extra.
Minor cleanup — is_connected checks self._client is not None; trailing whitespace fixed in LICENSE and .gitignore.
Test plan
uv run pytest tests/unit/optional_dependencies_test.py -v
uv run pytest tests/integration/ -v
uv run mypy python_repositories
uv run pre-commit run --all-files
## Summary
Completes the optional-extras story so the base package works without `redis` or `minio` installed.
- **Fail-fast adapter imports** — `redis_adapter.py` and `minio_adapter.py` now raise a clear `ImportError` with install instructions (`python-repositories[redis]` / `[minio]`) instead of failing later with `NameError`.
- **Lazy package exports** — `python_repositories` and `python_repositories.adapters` use PEP 562 `__getattr__` so interfaces load eagerly but adapters load only when accessed.
- **Unit tests** — `tests/unit/optional_dependencies_test.py` covers base import, lazy loading, and missing-extra error messages.
- **Docs** — README clarifies that interfaces work with the base install; adapters require the matching extra.
- **Minor cleanup** — `is_connected` checks `self._client is not None`; trailing whitespace fixed in `LICENSE` and `.gitignore`.
## Test plan
- [x] `uv run pytest tests/unit/optional_dependencies_test.py -v`
- [x] `uv run pytest tests/integration/ -v`
- [x] `uv run mypy python_repositories`
- [x] `uv run pre-commit run --all-files`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Completes the optional-extras story so the base package works without
redisorminioinstalled.redis_adapter.pyandminio_adapter.pynow raise a clearImportErrorwith install instructions (python-repositories[redis]/[minio]) instead of failing later withNameError.python_repositoriesandpython_repositories.adaptersuse PEP 562__getattr__so interfaces load eagerly but adapters load only when accessed.tests/unit/optional_dependencies_test.pycovers base import, lazy loading, and missing-extra error messages.is_connectedchecksself._client is not None; trailing whitespace fixed inLICENSEand.gitignore.Test plan
uv run pytest tests/unit/optional_dependencies_test.py -vuv run pytest tests/integration/ -vuv run mypy python_repositoriesuv run pre-commit run --all-filesTest Coverage Report: