Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.48 KB

File metadata and controls

42 lines (30 loc) · 1.48 KB

Contributing to robogreeno-cloud

Setup

git clone <repo>
cd robogreeno-cloud
pip install -e ".[dev]"
pytest          # all tests should pass before you start

Branch & PR flow

  • Branch from main: git checkout -b feature/your-feature
  • One logical change per PR. Keep PRs small enough to review in one sitting.
  • All tests must pass and ruff check . must be clean before requesting review.
  • Every new module needs at least one test in tests/.

Adding a DTN algorithm

  1. Create simulator/dtn/your_algorithm.py inheriting from DTNRouter.
  2. Implement on_contact(self, agent_a, agent_b, tick).
  3. Register it in simulator/__main__.py in the _ROUTERS dict.
  4. Add it as a valid value in simulator/config/default.yaml (comment).
  5. Write tests in tests/test_dtn.py (see existing tests as template).
  6. Add a one-paragraph description to docs/tutorials/02_add_a_dtn_algorithm.md.

Simulator configuration

All tuneable parameters live in simulator/config/default.yaml. Never hard-code SD card sizes, radii, or counts in Python — always read from config.

Communication protocol changes

Any change to comms/protocol/messages.py is a breaking change for the Embedded team. Open an issue first, tag it protocol-change, and get sign-off before merging.

Code style

  • ruff for linting (line length 100, Python 3.9 target).
  • Type hints on all public functions.
  • No docstrings on obvious functions; a short comment only when the why is non-obvious.