Adds Menu/MenuItem, CoffeeMaker and MoneyMachine with the assignment's method names (get_items, find_drink, report, is_resource_sufficient, make_coffee, make_payment).
Adds the main loop (drink names, report, off): resources are checked before payment, and payment before the drink is made. python -m coffee_machine runs it.
Moves drink prices, ingredient amounts and all message text into constants.py.
Adds 25 pytest tests and the code review record RC-007 against QC-PY-001 (Go).
Verification
ruff format, ruff check, mypy --strict clean.
pytest: 25 passed.
doxygen Doxyfile: no warnings.
Manual run: a latte paid with $3.00 gives $0.50 change, and report shows the right resources and $2.50.
Notes for the reviewer
This PR is based on mil-001-project-setup (PR #16) because Phase 2 needs the Phase 1 skeleton. Retarget it to main once #16 is merged.
RC-007 is still Proposed for S01's sign-off. It has one action item: decide whether a DCD or use case is wanted.
## Summary
- Adds `Menu`/`MenuItem`, `CoffeeMaker` and `MoneyMachine` with the assignment's method names (`get_items`, `find_drink`, `report`, `is_resource_sufficient`, `make_coffee`, `make_payment`).
- Adds the main loop (drink names, `report`, `off`): resources are checked before payment, and payment before the drink is made. `python -m coffee_machine` runs it.
- Moves drink prices, ingredient amounts and all message text into `constants.py`.
- Adds 25 pytest tests and the code review record RC-007 against QC-PY-001 (Go).
## Verification
- `ruff format`, `ruff check`, `mypy --strict` clean.
- `pytest`: 25 passed.
- `doxygen Doxyfile`: no warnings.
- Manual run: a latte paid with $3.00 gives $0.50 change, and `report` shows the right resources and $2.50.
## Notes for the reviewer
- This PR is based on `mil-001-project-setup` (PR #16) because Phase 2 needs the Phase 1 skeleton. Retarget it to `main` once #16 is merged.
- RC-007 is still `Proposed` for S01's sign-off. It has one action item: decide whether a DCD or use case is wanted.
Closes #6
Closes #7
Closes #8
Closes #9
Closes #10
Closes #11
Add the Menu, MenuItem, CoffeeMaker and MoneyMachine classes with the
assignment's method names, and a main loop that supports drink names,
report and off. Resources are checked before payment, and payment
before the drink is made.
Move drink prices, ingredient amounts and all message text into
constants.py. Add 25 pytest tests for every class and the main loop,
and record the review against QC-PY-001 as RC-007.
Task: MIL-002#1
Task: MIL-002#2
Task: MIL-002#3
Task: MIL-002#4
Task: MIL-002#5
Task: MIL-002#6
Closes#6Closes#7Closes#8Closes#9Closes#10Closes#11
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Menu/MenuItem,CoffeeMakerandMoneyMachinewith the assignment's method names (get_items,find_drink,report,is_resource_sufficient,make_coffee,make_payment).report,off): resources are checked before payment, and payment before the drink is made.python -m coffee_machineruns it.constants.py.Verification
ruff format,ruff check,mypy --strictclean.pytest: 25 passed.doxygen Doxyfile: no warnings.reportshows the right resources and $2.50.Notes for the reviewer
mil-001-project-setup(PR #16) because Phase 2 needs the Phase 1 skeleton. Retarget it tomainonce #16 is merged.Proposedfor S01's sign-off. It has one action item: decide whether a DCD or use case is wanted.Closes #6
Closes #7
Closes #8
Closes #9
Closes #10
Closes #11