From 1237f418406f6321f7b1817b27b75f5f424f05f7 Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Sun, 4 Oct 2026 20:38:26 +0800 Subject: [PATCH] Add project scaffold: pyproject, Doxyfile and package layout MIL-001 Project scaffold. - Add pyproject.toml: Python 3.13 or newer, no runtime dependencies, pytest as the dev extra - Add src/calc/ package and tests/ folder - Add Doxyfile writing API docs to docs/doxygen/ - Ignore docs/doxygen/ in .gitignore Closes #15 Closes #16 Closes #17 Closes #18 Task: MIL-001#1 Task: MIL-001#2 Task: MIL-001#3 Task: MIL-001#4 --- .gitignore | 3 +++ Doxyfile | 16 ++++++++++++++++ pyproject.toml | 22 ++++++++++++++++++++++ src/calc/__init__.py | 4 ++++ tests/__init__.py | 0 5 files changed, 45 insertions(+) create mode 100644 Doxyfile create mode 100644 pyproject.toml create mode 100644 src/calc/__init__.py create mode 100644 tests/__init__.py diff --git a/.gitignore b/.gitignore index 69e72d3..8a9b06f 100644 --- a/.gitignore +++ b/.gitignore @@ -173,3 +173,6 @@ cython_debug/ # PyPI configuration file .pypirc + +# Doxygen output +docs/doxygen/ diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..4948d7e --- /dev/null +++ b/Doxyfile @@ -0,0 +1,16 @@ +# Doxygen configuration for the console calculator. +# Generate the API documentation with: doxygen Doxyfile +PROJECT_NAME = "Calculator" +PROJECT_BRIEF = "Console calculator (Udemy 100 Days of Code, day 10)" +OUTPUT_DIRECTORY = docs/doxygen +INPUT = src +FILE_PATTERNS = *.py +RECURSIVE = YES +OPTIMIZE_OUTPUT_JAVA = YES +EXTRACT_ALL = YES +EXTRACT_PRIVATE = NO +GENERATE_HTML = YES +GENERATE_LATEX = NO +QUIET = YES +WARN_IF_UNDOCUMENTED = YES +WARN_NO_PARAMDOC = YES diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..52745c6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[build-system] +requires = ["setuptools>=69"] +build-backend = "setuptools.build_meta" + +[project] +name = "calc" +version = "0.1.0" +description = "A console calculator (Udemy 100 Days of Code, day 10)." +readme = "README.md" +requires-python = ">=3.13" +license = { text = "AGPL-3.0-or-later" } +dependencies = [] + +[project.optional-dependencies] +dev = ["pytest>=8"] + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +pythonpath = ["src"] diff --git a/src/calc/__init__.py b/src/calc/__init__.py new file mode 100644 index 0000000..09888eb --- /dev/null +++ b/src/calc/__init__.py @@ -0,0 +1,4 @@ +"""! +@file __init__.py +@brief Console calculator package (Udemy 100 Days of Code, day 10). +""" diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29