Author SHA1 Message Date
Tirsvad 572074ae73 Set up project skeleton and tooling for MIL-001
Add pyproject.toml (Python >=3.13, no runtime dependencies, pytest, ruff
and mypy as dev extras), a Doxyfile that scans src/, the
src/coffee_machine package with stub constants and main modules, and a
pytest smoke test. Ignore Doxygen output in .gitignore.

Closes #1
Closes #2
Closes #3
Closes #4
Refs #5

Task: MIL-001#1
Task: MIL-001#2
Task: MIL-001#3
Task: MIL-001#4
2026-10-05 00:30:18 +08:00
8 changed files with 92 additions and 0 deletions
+3
View File
@@ -174,3 +174,6 @@ cython_debug/
# PyPI configuration file # PyPI configuration file
.pypirc .pypirc
# Doxygen output
docs/doxygen/
+14
View File
@@ -0,0 +1,14 @@
# Doxygen configuration for the coffee machine. Run: doxygen Doxyfile
PROJECT_NAME = "Coffee Machine"
PROJECT_BRIEF = "Day 15 of Udemy's 100 Days of Code Python bootcamp"
OUTPUT_DIRECTORY = docs/doxygen
INPUT = src
FILE_PATTERNS = *.py
RECURSIVE = YES
OPTIMIZE_OUTPUT_JAVA = YES
EXTRACT_ALL = YES
JAVADOC_AUTOBRIEF = YES
GENERATE_HTML = YES
GENERATE_LATEX = NO
QUIET = YES
WARN_IF_UNDOCUMENTED = YES
+32
View File
@@ -0,0 +1,32 @@
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "coffee-machine"
version = "0.1.0"
description = "Console coffee machine: Day 15 of Udemy's 100 Days of Code Python bootcamp."
readme = "README.md"
requires-python = ">=3.13"
license = { file = "LICENSE" }
dependencies = []
[project.optional-dependencies]
dev = ["pytest>=8", "ruff", "mypy"]
[project.scripts]
coffee-machine = "coffee_machine.main:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
[tool.ruff]
line-length = 88
[tool.mypy]
strict = true
mypy_path = "src"
+4
View File
@@ -0,0 +1,4 @@
"""!
@file __init__.py
@brief Console coffee machine package.
"""
+8
View File
@@ -0,0 +1,8 @@
"""!
@file __main__.py
@brief Allow `python -m coffee_machine`.
"""
from coffee_machine.main import main
main()
+6
View File
@@ -0,0 +1,6 @@
"""!
@file constants.py
@brief Constants for the coffee machine: menu, coins and starting resources.
The values are added in MIL-002 ("Define constants").
"""
+12
View File
@@ -0,0 +1,12 @@
"""!
@file main.py
@brief Entry point of the coffee machine.
"""
def main() -> None:
"""!
@brief Run the coffee machine.
The ordering loop is added in MIL-002 ("Implement main loop").
"""
+13
View File
@@ -0,0 +1,13 @@
"""!
@file test_smoke.py
@brief Smoke test that the package imports.
"""
from coffee_machine import main as main_module
def test_main_is_callable() -> None:
"""!
@brief The entry point runs without error.
"""
main_module.main()