Developer Documentation¶
- Author:
Developer Documentation¶
This section contains technical documentation for developers working on rgpycrumbs.
Architecture¶
Document |
Description |
|---|---|
How ensureimport() works for optional dependencies |
|
Dispatcher pattern for PEP 723 scripts |
|
Separation of CLI, I/O, and plotting logic |
Patterns¶
Pattern |
Description |
|---|---|
Defer optional dependency loading until first use |
|
Self-contained CLI scripts with inline dependencies |
|
How to write tests for CLI and plotting code |
Contributing¶
Quick Start for Developers¶
Setup Development Environment**¶
git clone https://github.com/HaoZeke/rgpycrumbs
cd rgpycrumbs
uv sync --all-extras
Run Tests**¶
uv run pytest -m pure # Pure Python tests
uv run pytest -m interpolation # Tests requiring scipy
uv run pytest -m surfaces # Tests requiring jax
Add New CLI Command**¶
Create script in
rgpycrumbs/<module>/cli_<name>.pyAdd PEP 723 header with dependencies
Use click for CLI interface
Delegate to plotting functions in
rgpycrumbs/<module>/plotting.py
See CLI Architecture for details.