cloudcruise/: core package. Subpackages:workflows/,runs/,vault/,webhook/,utils/(common files:client.py,types.py,utils.py).- Entry points:
cloudcruise/cloudcruise.py(main client),cloudcruise/_default.py(shared default client),cloudcruise/py.typed(PEP 561 marker). tests/: unittest suite.tests/.envholds local config for optional live tests.pyproject.toml: setuptools build metadata (Python 3.10+).
- Setup (inside a venv):
pip install -e .• Live tests:pip install python-dotenv. - Run all tests:
python -m unittest discover -s tests -p 'test_*.py' -v. - Run a specific test:
python -m unittest tests/test_webhook.py -vorpython -m unittest tests.test_webhook.TestWebhook.test_verify_signature_ok -v. - Build sdist/wheel:
python -m pip install build && python -m build.
- Follow PEP 8 with 4‑space indents and explicit type hints; keep
from __future__ import annotationsat the top of new modules. - Data models use
@dataclass; preferTypedDictfor typed payloads; keep network code inclient.pyand helpers inutils/. - Naming: modules
lowercase_underscores.py; classesCamelCase; functions/methodssnake_case. - Public API: when adding exports, update
cloudcruise/__init__.py(__all__and re-exports) to maintain discoverability.
- Framework:
unittest. Tests live intests/and are namedtest_*.py; classesTest*, methodstest_*. - Unit tests must not hit the network. Integration/live checks belong in
tests/test_live_staging.pyand are skipped by default. - Live test config: set
CLOUDCRUISE_API_KEYandCLOUDCRUISE_ENCRYPTION_KEY(or usetests/.env).
- Commits observed in history are short, imperative, and lowercase (e.g.,
remove debug logs,improve typed suggestions); no trailing punctuation. - PRs must include: clear description, rationale, any API changes, tests for new behavior, and updated docs where applicable. Link issues and ensure
python -m unittestpasses.
- Never commit real secrets. Use env vars:
CLOUDCRUISE_API_KEYandCLOUDCRUISE_ENCRYPTION_KEY. tests/.envis for local development only; prefer ephemeral keys for manual tests.