Use a virtual environment with Python 3.11 or 3.12:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"Run the complete local quality gate:
make checkThe gate runs:
pytestfor unit and fixture-backed integration testsruff check .for linting and import orderingmypy srcfor strict type checking
- Provider tests must use deterministic HTTP fixtures or in-memory fakes.
- Do not put real API keys in tests, fixtures, logs, or issue reports.
- Add regression coverage for cache freshness, pagination, filtering, and provider error behavior.
- Verify database migrations, idempotent event ingestion, checkpoint recovery, and export provenance.
- Give every protocol adapter complete, partial, malformed, and unknown recorded fixtures at an exact block.
- Keep core/provider tests independent of a display server where possible.
- GUI changes should preserve the service boundary and loading/error states.
- Start every Python file with a short module docstring.
- Explain what the file owns, what it does, and any important boundary or safety rule.
- Use simple English and keep the header short enough to scan before the imports.
- Add comments before non-obvious logic when the reason is not clear from the code.
- Explain why a special case exists. Do not write comments that only repeat the next line.
- Update a header when the main responsibility of its file changes.
Protocol adapter contributions must also follow PROTOCOL_ADAPTERS.md.
Network-backed operations must use BackgroundTaskRunner. Do not call provider or service methods that may perform network I/O directly from a button handler. Widget updates must happen through QObject-bound slots or signals on the GUI thread. Cancellation suppresses late task results; workers are not terminated unsafely, and a ledger transaction already committed by a canceled task remains valid.
When adding a new view:
- Add a service-level operation first.
- Add unit tests for validation and result behavior.
- Add the view with explicit loading, success, and error states.
- Add fixture coverage for provider behavior where relevant.
- Run
make checkbefore opening a pull request.
Tests should use temporary paths for SQLite, settings, and cache data. Never test against a personal installation database.
Normal development and CI use recorded provider responses. To intentionally exercise all four live wallet-data adapters, configure the environment described in PROVIDER_STRATEGY.md and run:
make validate-providers-liveThe command consumes provider API credits. Run it only on a trusted local machine, use public test addresses, and do not paste credentials into command arguments, logs, issues, or screenshots.