Compare commits
2
Commits
c3e225b049
...
322efae5b4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
322efae5b4 | ||
|
|
572074ae73 |
@@ -174,3 +174,6 @@ cython_debug/
|
|||||||
# PyPI configuration file
|
# PyPI configuration file
|
||||||
.pypirc
|
.pypirc
|
||||||
|
|
||||||
|
|
||||||
|
# Doxygen output
|
||||||
|
docs/doxygen/
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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"
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
"""!
|
||||||
|
@file __init__.py
|
||||||
|
@brief Console coffee machine package.
|
||||||
|
"""
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
"""!
|
||||||
|
@file __main__.py
|
||||||
|
@brief Allow `python -m coffee_machine`.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from coffee_machine.main import main
|
||||||
|
|
||||||
|
main()
|
||||||
@@ -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").
|
||||||
|
"""
|
||||||
@@ -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").
|
||||||
|
"""
|
||||||
@@ -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()
|
||||||
Reference in New Issue
Block a user