Module 01 — Revisit Hello, Pico!
Goal
Reuse the existing Academy Hello, Pico! behaviour — do not invent a new sample.
Domain behaviour
from oe_pico_runtime import HelloPico
p = HelloPico("hello-pico")
s = p.hello("Willem")
# event_count == 1, message == "Hello, Willem!"Each hello(name):
- receives an event
- increments
event_count - records
last_run - produces a greeting
- exposes resulting
PicoState
Classification
| Material | Action |
|---|---|
| Hello Pico domain logic | REUSE (reimplemented here as the executable starting point) |
| Pico course concepts | REFERENCE |
| Rust fundamentals | Do not reteach |
Exercise
cd runtime
PYTHONPATH=src python -c "
from oe_pico_runtime import HelloPico
p = HelloPico()
print(p.hello('Ada').to_dict())
print(p.hello('Willem').to_dict())
"
PYTHONPATH=src python -m pytest tests/test_pico_unit.py -q