From 32a8b848c5ffc8081532d137881d9e04cbc2c051 Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 16:27:37 +0800 Subject: [PATCH 1/3] Add project foundation: configuration, package skeleton, Doxyfile, CI and ADRs Task: MIL-001#1 Refs #2 Refs #3 Refs #4 Refs #5 Refs #6 --- .gitea/workflows/ci.yml | 70 ++++ .gitignore | 33 ++ .yamllint.yml | 8 + Doxyfile | 374 ++++++++++++++++++ ...adr-0001-read-nato-data-with-csv-module.md | 53 +++ docs/adr/adr-0002-skip-analysis-artifacts.md | 50 +++ docs/artifact-registry.md | 119 +++--- pyproject.toml | 55 +++ src/nato_alphabet/__init__.py | 1 + src/nato_alphabet/constants.py | 29 ++ .../data/nato_phonetic_alphabet.csv | 27 ++ tests/test_package.py | 29 ++ 12 files changed, 789 insertions(+), 59 deletions(-) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .gitignore create mode 100644 .yamllint.yml create mode 100644 Doxyfile create mode 100644 docs/adr/adr-0001-read-nato-data-with-csv-module.md create mode 100644 docs/adr/adr-0002-skip-analysis-artifacts.md create mode 100644 pyproject.toml create mode 100644 src/nato_alphabet/__init__.py create mode 100644 src/nato_alphabet/constants.py create mode 100644 src/nato_alphabet/data/nato_phonetic_alphabet.csv create mode 100644 tests/test_package.py diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..edd6079 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,70 @@ +# Continuous integration for the NATO alphabet project. +# +# Purpose: run the pytest suite on Python 3.13 so a change is known to work +# before it is merged (BC-001 objective O3, success criterion 2). +# Triggers: a push to main or to a milestone branch, and every pull request +# that touches source, tests, project configuration or this file. +# Inputs: none. +# Secrets: none. The job reads the repository only. +# Changes: nothing outside the repository. +# Decision: MIL-001 task "Add the CI workflow". +# Host: Gitea Actions (act_runner); the same file runs on GitHub Actions. +# The runner must offer the label ubuntu-latest. + +name: CI + +on: + push: + branches: [main, "mil-*"] + paths: + - "src/**" + - "tests/**" + - "pyproject.toml" + - ".gitea/workflows/ci.yml" + pull_request: + paths: + - "src/**" + - "tests/**" + - "pyproject.toml" + - ".gitea/workflows/ci.yml" + +# A newer run of the same branch makes the older one pointless. +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +env: + PYTHON_VERSION: "3.13" + +jobs: + test: + name: Test on Python 3.13 + permissions: + contents: read + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Check out the repository + uses: actions/checkout@v4.2.2 + + - name: Set up Python + uses: actions/setup-python@v5.6.0 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Create the virtual environment and upgrade pip + run: | + python -m venv .venv + .venv/bin/python -m pip install --upgrade pip + + - name: Install the project with its development tools + run: .venv/bin/python -m pip install -e ".[dev]" + + - name: Check the code style + run: .venv/bin/python -m ruff check . + + - name: Check the types + run: .venv/bin/python -m mypy + + - name: Run the tests + run: .venv/bin/python -m pytest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ec4969e --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +# Byte-compiled and cache files +__pycache__/ +*.py[cod] +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ +.import_linter_cache/ + +# Virtual environments +.venv/ +venv/ +env/ + +# Packaging, build and Doxygen output +build/ +dist/ +*.egg-info/ +.eggs/ + +# Coverage +.coverage +htmlcov/ + +# Secrets and local configuration (personal tokens, never committed) +.env +.env.* +!.env.example + +# Editors and operating system +.idea/ +.vscode/ +.DS_Store +Thumbs.db diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..314e874 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,8 @@ +# yamllint configuration for the repository's YAML files (tool: yamllint). +extends: default +rules: + line-length: + max: 100 + truthy: + check-keys: false + document-start: disable diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..4248036 --- /dev/null +++ b/Doxyfile @@ -0,0 +1,374 @@ +# Doxyfile 1.15.0 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "NATO alphabet" +PROJECT_NUMBER = +PROJECT_BRIEF = "Spell a word with the NATO phonetic alphabet (100 Days of Code, day 26)" +PROJECT_LOGO = +PROJECT_ICON = +OUTPUT_DIRECTORY = build +CREATE_SUBDIRS = NO +CREATE_SUBDIRS_LEVEL = 8 +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +JAVADOC_BANNER = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +PYTHON_DOCSTRING = YES +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = YES +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +OPTIMIZE_OUTPUT_SLICE = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +MARKDOWN_STRICT = YES +TOC_INCLUDE_HEADINGS = 6 +MARKDOWN_ID_STYLE = DOXYGEN +AUTOLINK_SUPPORT = YES +AUTOLINK_IGNORE_WORDS = +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 +NUM_PROC_THREADS = 1 +TIMESTAMP = NO +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_PRIV_VIRTUAL = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +RESOLVE_UNNAMED_PARAMS = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_UNDOC_NAMESPACES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = SYSTEM +HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_HEADERFILE = YES +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = +EXTERNAL_TOOL_PATH = +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = YES +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_IF_INCOMPLETE_DOC = YES +WARN_NO_PARAMDOC = NO +WARN_IF_UNDOC_ENUM_VAL = NO +WARN_LAYOUT_FILE = YES +WARN_AS_ERROR = FAIL_ON_WARNINGS +WARN_FORMAT = "$file:$line: $text" +WARN_LINE_FORMAT = "at line $line of file $file" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = src README.md +INPUT_ENCODING = UTF-8 +INPUT_FILE_ENCODING = +FILE_PATTERNS = *.py *.md +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = README.md +IMPLICIT_DIR_DOCS = YES +FORTRAN_COMMENT_AFTER = 72 +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +CLANG_ASSISTED_PARSING = NO +CLANG_ADD_INC_PATHS = YES +CLANG_OPTIONS = +CLANG_DATABASE_PATH = +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE = AUTO_LIGHT +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_DYNAMIC_MENUS = YES +HTML_DYNAMIC_SECTIONS = NO +HTML_CODE_FOLDING = YES +HTML_COPY_CLIPBOARD = YES +HTML_PROJECT_COOKIE = +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_FEEDURL = +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +SITEMAP_URL = +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +GENERATE_TREEVIEW = YES +PAGE_OUTLINE_PANEL = YES +FULL_SIDEBAR = NO +ENUM_VALUES_PER_LINE = 4 +SHOW_ENUM_VALUES = NO +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +OBFUSCATE_EMAILS = YES +HTML_FORMULA_FORMAT = png +FORMULA_FONTSIZE = 10 +FORMULA_MACROFILE = +USE_MATHJAX = NO +MATHJAX_VERSION = MathJax_2 +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = +MAKEINDEX_CMD_NAME = makeindex +LATEX_MAKEINDEX_CMD = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4 +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_BIB_STYLE = plainnat +LATEX_EMOJI_DIRECTORY = +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +RTF_EXTRA_FILES = +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_SUBDIR = +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES +XML_NS_MEMB_FILE_SCOPE = NO +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# Configuration options related to Sqlite3 output +#--------------------------------------------------------------------------- +GENERATE_SQLITE3 = NO +SQLITE3_OUTPUT = sqlite3 +SQLITE3_RECREATE_DB = YES +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +#--------------------------------------------------------------------------- +# Configuration options related to diagram generator tools +#--------------------------------------------------------------------------- +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10" +DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10" +DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4" +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 +UML_MAX_EDGE_LABELS = 10 +DOT_UML_DETAILS = NO +DOT_WRAP_THRESHOLD = 17 +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DIR_GRAPH_MAX_DEPTH = 1 +DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +DIA_PATH = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = +PLANTUMLFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +MSCGEN_TOOL = +MSCFILE_DIRS = diff --git a/docs/adr/adr-0001-read-nato-data-with-csv-module.md b/docs/adr/adr-0001-read-nato-data-with-csv-module.md new file mode 100644 index 0000000..cef74f6 --- /dev/null +++ b/docs/adr/adr-0001-read-nato-data-with-csv-module.md @@ -0,0 +1,53 @@ +# ADR-0001 Read the NATO data with the standard library csv module + +## Metadata +| Key | Value | +| --- | --- | +| ID | ADR-0001 | +| CrossReference | [BC-001], [SA-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version, reviewed in RC-006 | pending | + +Allowed Status values: `Proposed`, `Accepted`, `Rejected`, `Deprecated`, `Superseded by ADR-NNNN`. + +--- + +## Context + +The lecture reads the NATO alphabet file into a Pandas DataFrame and builds the dictionary with `iterrows`. The file has 26 rows and two columns. S01 follows the lecture, but S03 wants a repository with no runtime dependencies, and [BC-001] objective O5 and constraint "no runtime dependencies unless needed" say the same. + +Options evaluated: + +1. Pandas, as in the lecture: matches the course, but adds a large runtime dependency for a 26-row table. +2. Polars: smaller than Pandas, still a runtime dependency that the task does not need. +3. The standard library `csv` module: no dependency, and the dictionary comprehension that the assignment teaches works unchanged on the rows of `csv.DictReader`. + +## Decision + +Read the NATO alphabet with the standard library `csv` module (`csv.DictReader`) and build the letter-to-code-word dictionary with a dictionary comprehension. The project declares no runtime dependencies. + +## Consequences + +**Positive:** + +- No runtime dependency to install or keep secure; S03 sees an empty dependency list. +- Faster start and a smaller environment for S02. +- The comprehension taught in the lecture is still used. + +**Negative:** + +- The code differs from the lecture's Pandas code, so S02 comparing line by line sees a difference. +- A later day that needs Pandas has to add it explicitly. + +## Affected Artifacts + +- [BC-001] — meets objective O5 and the constraint on runtime dependencies. +- [SA-001] — resolves the conflict between S01 and S03 listed there. + +--- + +[BC-001]: ../business-case.md +[SA-001]: ../stakeholder-analysis.md diff --git a/docs/adr/adr-0002-skip-analysis-artifacts.md b/docs/adr/adr-0002-skip-analysis-artifacts.md new file mode 100644 index 0000000..9e25e66 --- /dev/null +++ b/docs/adr/adr-0002-skip-analysis-artifacts.md @@ -0,0 +1,50 @@ +# ADR-0002 Skip the optional analysis artifacts + +## Metadata +| Key | Value | +| --- | --- | +| ID | ADR-0002 | +| CrossReference | [BC-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version, reviewed in RC-007 | pending | + +Allowed Status values: `Proposed`, `Accepted`, `Rejected`, `Deprecated`, `Superseded by ADR-NNNN`. + +--- + +## Context + +The journey of the framework offers analysis documents beyond the baseline: KPI definitions, a Business Model Canvas, a BPMN process model and a riskiest-assumption test. The project is a single-evening course exercise with six measurable success criteria already in [BC-001], no commercial model, no business process and no costly belief to test. + +Options evaluated: + +1. Write all four documents: complete, but each needs a review and adds no decision that the Business Case does not already hold. +2. Write only the KPI definitions: the success criteria would be restated in another file. +3. Skip all four and record the reason here. + +## Decision + +Skip the KPI definitions, the Business Model Canvas, the BPMN process model and the riskiest-assumption test. The Business Case's Success Criteria table carries the measures, and the baseline documents (Business Case, Stakeholder Analysis, Project Plan, milestones) are not skipped. + +## Consequences + +**Positive:** + +- Less documentation to keep consistent for a small project. +- The success criteria are stated once, in one place. + +**Negative:** + +- A reader who expects a KPI document finds the measures in the Business Case instead. +- If the project grows (a package published, more users), the skipped documents must be written then. + +## Affected Artifacts + +- [BC-001] — its Success Criteria stay the only definition of the measures. + +--- + +[BC-001]: ../business-case.md diff --git a/docs/artifact-registry.md b/docs/artifact-registry.md index 75393a8..b629482 100644 --- a/docs/artifact-registry.md +++ b/docs/artifact-registry.md @@ -1,59 +1,60 @@ -# Artifact Registry - -This project's artifact state. Types, short names and `CrossReference -Candidates` come from the framework catalog -(`framework/registry/artifact-catalog.md`); this file only records where -each document lives in *this* project and the next version to use. - -Delete rows for types you don't use. Add a row the first time you create a -document of a type. `Primary File` may contain a glob (e.g. -`docs/uc-*/uc.md`); `framework/scripts/find-crossreferences.sh` reads it. - -| Short Name | Artifact Type | Primary File | Next Available Version | -| --- | --- | --- | --- | -| BC | Business Case | docs/business-case.md | 002 | -| SA | Stakeholder Analysis | docs/stakeholder-analysis.md | 002 | -| PP | Project Plan | docs/project-plan.md | 002 | -| MIL | Milestone / Gateway | docs/milestones/*.md | 004 | -| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 006 | -| TM | Traceability Matrix | docs/sqa/traceability-matrix.md | 002 | - -## Languages - -Set the PO language when the project starts; `project-planning` asks for it -if it is missing. An artifact of a type marked "Written in the PO language" -exists once, in that language, under its normal name (`business-case.md`); the -`artifact` skill ("One file per artifact") has the rule. - -| Setting | Value | -| --- | --- | -| PO language | en | -| PO domain | it | -| High-level register | IT Executive English | -| Technical register | IT Professional English | - -Every artifact of a type marked "Yes" below states its language and domain in -its `Language` and `Domain` Metadata rows; `new-artifact.sh` fills them from -`PO language` and `PO domain`. `Language` is a BCP 47 code (`da`, `en`). -`Domain` is a value from this list; add a row to introduce a domain, so a -reviewer can see at once which professional vocabulary a document uses. - -| Domain | Meaning | -| --- | --- | -| it | Software and IT | -| medical | Healthcare and medical devices | -| construction | Construction and civil engineering | - -| Artifact types | Register | Written in the PO language | -| --- | --- | --- | -| BC, KPI, PP, MIL | IT Executive English | Yes | -| SA, BMC, BPMN, UCD, US, UC, SSD, DM, RA, GOV, DICT | IT Professional English | Yes | -| OC, SD, DCD, ERD, ADR, TM, RC, QC, source code | IT Professional English | No | - -## Notes - -- "Next Available Version" is the zero-padded (3-digit) version to use the - *next* time a new document of that type is created. Increment it only when - a brand-new document is created, not when an existing document's - `## Version History` gets a row. -- `ADR` uses 4 digits (`0001`); `RC` is sequential across all artifact types. +# Artifact Registry + +This project's artifact state. Types, short names and `CrossReference +Candidates` come from the framework catalog +(`framework/registry/artifact-catalog.md`); this file only records where +each document lives in *this* project and the next version to use. + +Delete rows for types you don't use. Add a row the first time you create a +document of a type. `Primary File` may contain a glob (e.g. +`docs/uc-*/uc.md`); `framework/scripts/find-crossreferences.sh` reads it. + +| Short Name | Artifact Type | Primary File | Next Available Version | +| --- | --- | --- | --- | +| BC | Business Case | docs/business-case.md | 002 | +| SA | Stakeholder Analysis | docs/stakeholder-analysis.md | 002 | +| PP | Project Plan | docs/project-plan.md | 002 | +| MIL | Milestone / Gateway | docs/milestones/*.md | 004 | +| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 006 | +| TM | Traceability Matrix | docs/sqa/traceability-matrix.md | 002 | +| ADR | Architecture Decision Record | docs/adr/adr-NNNN-*.md | 0003 | + +## Languages + +Set the PO language when the project starts; `project-planning` asks for it +if it is missing. An artifact of a type marked "Written in the PO language" +exists once, in that language, under its normal name (`business-case.md`); the +`artifact` skill ("One file per artifact") has the rule. + +| Setting | Value | +| --- | --- | +| PO language | en | +| PO domain | it | +| High-level register | IT Executive English | +| Technical register | IT Professional English | + +Every artifact of a type marked "Yes" below states its language and domain in +its `Language` and `Domain` Metadata rows; `new-artifact.sh` fills them from +`PO language` and `PO domain`. `Language` is a BCP 47 code (`da`, `en`). +`Domain` is a value from this list; add a row to introduce a domain, so a +reviewer can see at once which professional vocabulary a document uses. + +| Domain | Meaning | +| --- | --- | +| it | Software and IT | +| medical | Healthcare and medical devices | +| construction | Construction and civil engineering | + +| Artifact types | Register | Written in the PO language | +| --- | --- | --- | +| BC, KPI, PP, MIL | IT Executive English | Yes | +| SA, BMC, BPMN, UCD, US, UC, SSD, DM, RA, GOV, DICT | IT Professional English | Yes | +| OC, SD, DCD, ERD, ADR, TM, RC, QC, source code | IT Professional English | No | + +## Notes + +- "Next Available Version" is the zero-padded (3-digit) version to use the + *next* time a new document of that type is created. Increment it only when + a brand-new document is created, not when an existing document's + `## Version History` gets a row. +- `ADR` uses 4 digits (`0001`); `RC` is sequential across all artifact types. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7b58c7c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,55 @@ +[build-system] +requires = ["setuptools>=77"] +build-backend = "setuptools.build_meta" + +[project] +name = "nato-alphabet" +version = "0.1.0" +description = "Console tool that spells a word with the NATO phonetic alphabet (100 Days of Code, day 26)." +readme = "README.md" +requires-python = ">=3.13" +license = "AGPL-3.0-or-later" +license-files = ["LICENSE"] +authors = [{ name = "Jens Tirsvad Nielsen" }] +keywords = ["nato", "phonetic-alphabet", "comprehensions", "100-days-of-code"] +dependencies = [] + +[project.optional-dependencies] +dev = [ + "pytest==9.1.1", + "ruff==0.17.0", + "mypy==2.4.0", + "import-linter==2.15", +] + +[project.scripts] +nato-alphabet = "nato_alphabet.main:main" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +nato_alphabet = ["data/*.csv"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +pythonpath = ["src"] + +[tool.ruff] +line-length = 88 +src = ["src", "tests"] +extend-exclude = ["framework", ".agents", ".claude"] + +[tool.ruff.lint] +select = ["E", "F", "I", "N", "UP", "B", "D"] + +[tool.ruff.lint.pydocstyle] +convention = "pep257" + +[tool.ruff.lint.per-file-ignores] +"tests/**" = ["D"] + +[tool.mypy] +strict = true +files = ["src", "tests"] +mypy_path = "src" diff --git a/src/nato_alphabet/__init__.py b/src/nato_alphabet/__init__.py new file mode 100644 index 0000000..d823b9a --- /dev/null +++ b/src/nato_alphabet/__init__.py @@ -0,0 +1 @@ +"""@brief Console tool that spells a word with the NATO phonetic alphabet.""" diff --git a/src/nato_alphabet/constants.py b/src/nato_alphabet/constants.py new file mode 100644 index 0000000..296a858 --- /dev/null +++ b/src/nato_alphabet/constants.py @@ -0,0 +1,29 @@ +"""@brief Constants of the NATO alphabet tool. + +Every literal that the program, its messages or its data loading depend on is +defined here once. +""" + +## @brief Name of the package that holds the data file. +DATA_PACKAGE: str = "nato_alphabet" + +## @brief Folder inside the package that holds the data file. +DATA_DIRECTORY: str = "data" + +## @brief Name of the comma-separated values file with the NATO alphabet. +DATA_FILE_NAME: str = "nato_phonetic_alphabet.csv" + +## @brief Header of the column with the letter in the data file. +LETTER_COLUMN: str = "letter" + +## @brief Header of the column with the code word in the data file. +CODE_COLUMN: str = "code" + +## @brief Text shown when the program asks for a word. +PROMPT_TEXT: str = "Enter a word: " + +## @brief Text shown when the word holds a character that is not a letter. +INVALID_INPUT_TEXT: str = "Sorry, only the letters A to Z are allowed. Try again." + +## @brief Text shown before the code words are printed. +RESULT_TEXT: str = "Phonetic code words:" diff --git a/src/nato_alphabet/data/nato_phonetic_alphabet.csv b/src/nato_alphabet/data/nato_phonetic_alphabet.csv new file mode 100644 index 0000000..3d8e6d8 --- /dev/null +++ b/src/nato_alphabet/data/nato_phonetic_alphabet.csv @@ -0,0 +1,27 @@ +letter,code +A,Alfa +B,Bravo +C,Charlie +D,Delta +E,Echo +F,Foxtrot +G,Golf +H,Hotel +I,India +J,Juliet +K,Kilo +L,Lima +M,Mike +N,November +O,Oscar +P,Papa +Q,Quebec +R,Romeo +S,Sierra +T,Tango +U,Uniform +V,Victor +W,Whiskey +X,X-ray +Y,Yankee +Z,Zulu \ No newline at end of file diff --git a/tests/test_package.py b/tests/test_package.py new file mode 100644 index 0000000..0ba0135 --- /dev/null +++ b/tests/test_package.py @@ -0,0 +1,29 @@ +"""Smoke tests of the package skeleton.""" + +from importlib import resources + +from nato_alphabet import constants + +EXPECTED_ROW_COUNT = 26 + + +def test_data_file_exists_in_package() -> None: + data_file = ( + resources.files(constants.DATA_PACKAGE) + / constants.DATA_DIRECTORY + / constants.DATA_FILE_NAME + ) + + assert data_file.is_file() + + +def test_data_file_has_one_row_per_letter() -> None: + data_file = ( + resources.files(constants.DATA_PACKAGE) + / constants.DATA_DIRECTORY + / constants.DATA_FILE_NAME + ) + + lines = data_file.read_text(encoding="utf-8").splitlines() + + assert len(lines) - 1 == EXPECTED_ROW_COUNT From a381791874907359dab9b8f40a3c2b73f95dc0c8 Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 16:32:33 +0800 Subject: [PATCH 2/3] Review MIL-001 deliverables: ADRs, CI workflow and package skeleton Task: MIL-001#1 Refs #2 Refs #5 Refs #6 --- docs/artifact-registry.md | 2 +- docs/sqa/reviews/rc-006-adr-0001.md | 54 +++++++++++++ docs/sqa/reviews/rc-007-adr-0002.md | 54 +++++++++++++ docs/sqa/reviews/rc-008-ci-workflow.md | 88 ++++++++++++++++++++++ docs/sqa/reviews/rc-009-python-skeleton.md | 59 +++++++++++++++ docs/sqa/traceability-matrix.md | 18 ++++- 6 files changed, 272 insertions(+), 3 deletions(-) create mode 100644 docs/sqa/reviews/rc-006-adr-0001.md create mode 100644 docs/sqa/reviews/rc-007-adr-0002.md create mode 100644 docs/sqa/reviews/rc-008-ci-workflow.md create mode 100644 docs/sqa/reviews/rc-009-python-skeleton.md diff --git a/docs/artifact-registry.md b/docs/artifact-registry.md index b629482..48bdf72 100644 --- a/docs/artifact-registry.md +++ b/docs/artifact-registry.md @@ -15,7 +15,7 @@ document of a type. `Primary File` may contain a glob (e.g. | SA | Stakeholder Analysis | docs/stakeholder-analysis.md | 002 | | PP | Project Plan | docs/project-plan.md | 002 | | MIL | Milestone / Gateway | docs/milestones/*.md | 004 | -| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 006 | +| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 010 | | TM | Traceability Matrix | docs/sqa/traceability-matrix.md | 002 | | ADR | Architecture Decision Record | docs/adr/adr-NNNN-*.md | 0003 | diff --git a/docs/sqa/reviews/rc-006-adr-0001.md b/docs/sqa/reviews/rc-006-adr-0001.md new file mode 100644 index 0000000..383f304 --- /dev/null +++ b/docs/sqa/reviews/rc-006-adr-0001.md @@ -0,0 +1,54 @@ +# SQA Review Record RC-006: ADR-0001 + +## Metadata +| Key | Value | +| --- | --- | +| ID | RC-006 | +| CrossReference | [ADR-0001], [QC-ADR-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of ADR-0001 | pending | + +--- + +## Artifact Under Review + +- Instance reviewed: [ADR-0001] +- Checklist used: [QC-ADR-001] +- Scope: full review +- Language and domain: n/a (technical type) +- Language reviewer: none +- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`) + +## Checklist Results + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | The ID (`ADR-NNNN`, 4-digit) matches the filename number and is unique and sequential | Pass | ADR-0001 matches `adr-0001-*.md` and follows the registry sequence. | +| 2 | Context states the problem, the forces (cost, risk, constraints) and the options evaluated | Pass | Context states the problem, forces and the options evaluated. | +| 3 | At least two options were considered, or the absence of alternatives is justified | Pass | Three options (ADR-0001) / three options (ADR-0002) are listed. | +| 4 | Decision is stated in one or two unhedged sentences and matches one of the evaluated options | Pass | The Decision is stated plainly and is one of the listed options. | +| 5 | Consequences list both Positive and Negative outcomes | Pass | Positive and Negative consequences are listed. | +| 6 | Quality-attribute impacts (performance, security, portability, etc.) are named where the decision affects them | Pass | Portability and security: no runtime dependency to install or patch. | +| 7 | Affected Artifacts are listed as links, and each is also in CrossReference | Pass | Affected Artifacts are links and each is in CrossReference. | +| 8 | Status changes are recorded as new Version History rows with a Change summary and Commit link; retained rows are never rewritten | Pass | One Version History row; no retained row was rewritten. | +| 9 | A superseded or deprecated ADR names its successor, and the successor links back | N-A | No ADR is superseded or deprecated. | +| 10 | Written in business or technical language of the domain, with no unexplained abbreviations | Pass | Plain technical language; abbreviations such as CSV are spelled out in the Business Case. | +| 11 | Status is one of `Proposed`, `Accepted`, `Rejected`, `Deprecated` or `Superseded by ADR-NNNN`, and every Version History row uses only these | Pass | The status is `Accepted`, an allowed value. | + +## Overall Verdict + +Go — every Mandatory criterion of QC-ADR-001 passes. + +## Action Items + +| Action | Owner | Due | +| --- | --- | --- | +| None | S01 | n/a | + +--- + +[ADR-0001]: ../../adr/adr-0001-read-nato-data-with-csv-module.md +[QC-ADR-001]: ../../../framework/qc/artifacts/qc-adr.md diff --git a/docs/sqa/reviews/rc-007-adr-0002.md b/docs/sqa/reviews/rc-007-adr-0002.md new file mode 100644 index 0000000..f71e853 --- /dev/null +++ b/docs/sqa/reviews/rc-007-adr-0002.md @@ -0,0 +1,54 @@ +# SQA Review Record RC-007: ADR-0002 + +## Metadata +| Key | Value | +| --- | --- | +| ID | RC-007 | +| CrossReference | [ADR-0002], [QC-ADR-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of ADR-0002 | pending | + +--- + +## Artifact Under Review + +- Instance reviewed: [ADR-0002] +- Checklist used: [QC-ADR-001] +- Scope: full review +- Language and domain: n/a (technical type) +- Language reviewer: none +- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`) + +## Checklist Results + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | The ID (`ADR-NNNN`, 4-digit) matches the filename number and is unique and sequential | Pass | ADR-0002 matches `adr-0002-*.md` and follows the registry sequence. | +| 2 | Context states the problem, the forces (cost, risk, constraints) and the options evaluated | Pass | Context states the problem, forces and the options evaluated. | +| 3 | At least two options were considered, or the absence of alternatives is justified | Pass | Three options (ADR-0001) / three options (ADR-0002) are listed. | +| 4 | Decision is stated in one or two unhedged sentences and matches one of the evaluated options | Pass | The Decision is stated plainly and is one of the listed options. | +| 5 | Consequences list both Positive and Negative outcomes | Pass | Positive and Negative consequences are listed. | +| 6 | Quality-attribute impacts (performance, security, portability, etc.) are named where the decision affects them | Pass | Maintainability: fewer documents to keep consistent. | +| 7 | Affected Artifacts are listed as links, and each is also in CrossReference | Pass | Affected Artifacts are links and each is in CrossReference. | +| 8 | Status changes are recorded as new Version History rows with a Change summary and Commit link; retained rows are never rewritten | Pass | One Version History row; no retained row was rewritten. | +| 9 | A superseded or deprecated ADR names its successor, and the successor links back | N-A | No ADR is superseded or deprecated. | +| 10 | Written in business or technical language of the domain, with no unexplained abbreviations | Pass | Plain technical language; abbreviations such as CSV are spelled out in the Business Case. | +| 11 | Status is one of `Proposed`, `Accepted`, `Rejected`, `Deprecated` or `Superseded by ADR-NNNN`, and every Version History row uses only these | Pass | The status is `Accepted`, an allowed value. | + +## Overall Verdict + +Go — every Mandatory criterion of QC-ADR-001 passes. + +## Action Items + +| Action | Owner | Due | +| --- | --- | --- | +| None | S01 | n/a | + +--- + +[ADR-0002]: ../../adr/adr-0002-skip-analysis-artifacts.md +[QC-ADR-001]: ../../../framework/qc/artifacts/qc-adr.md diff --git a/docs/sqa/reviews/rc-008-ci-workflow.md b/docs/sqa/reviews/rc-008-ci-workflow.md new file mode 100644 index 0000000..dc5832c --- /dev/null +++ b/docs/sqa/reviews/rc-008-ci-workflow.md @@ -0,0 +1,88 @@ +# SQA Review Record RC-008: WF-001 + +## Metadata +| Key | Value | +| --- | --- | +| ID | RC-008 | +| CrossReference | [WF-001], [QC-WF-001], [QC-YML-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of WF-001 | pending | + +--- + +## Artifact Under Review + +- Instance reviewed: [WF-001] +- Checklist used: [QC-WF-001] and [QC-YML-001] +- Scope: full review +- Language and domain: n/a (technical type) +- Language reviewer: none +- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`) + +## Checklist Results + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | The file meets the YAML checklist ([QC-YML-001]) | Pass | See the QC-YML-001 table below; every Mandatory row passes. | +| 2 | The file is in `.gitea/workflows/` or `.github/workflows/` with the extension `.yml` or `.yaml`, and the same workflow does not exist in both directories | Pass | `.gitea/workflows/ci.yml`; no workflow in `.github/workflows/`. Gitea 1.27.3 ran it (run 2 on branch `mil-001-repository-foundation`). | +| 3 | The file declares `name`, `on` and `jobs`; `on` lists explicit events and, where it matters, `branches` or `paths` | Pass | `name`, `on` (push with `branches` and `paths`, pull_request with `paths`) and `jobs` are declared. | +| 4 | A header comment states the purpose, the triggers, the inputs, the secrets it needs, what it changes outside the repository, and the decision or milestone it implements | Pass | The header states purpose, triggers, inputs, secrets, changes outside the repository and the decision. | +| 5 | Every job and step has a descriptive `name`, unique within its job | Pass | Every step has a unique descriptive `name`. | +| 6 | The file passes `actionlint` (or the project's workflow validation test) and the tool version is stated | Pass | actionlint 1.7.12 reports no finding; yamllint 1.38.0 as well. | +| 7 | Every job declares `permissions` explicitly with the least access that works (`contents: read` or none by default); write access only on the job that needs it | Pass | The job declares `permissions: contents: read`. | +| 8 | Every action used is pinned to a full commit SHA or an exact release tag, never to a branch; a moving major tag (`@v1`) is accepted only for an action published by the same organisation under a stated release policy | Pass | `actions/checkout@v4.2.2` and `actions/setup-python@v5.6.0` are exact release tags. | +| 9 | No secret is written in the file; a secret is read as `secrets.NAME`, passed to a step through `env:`, never placed on a command line or echoed | Pass | No secret is used or written. | +| 10 | Untrusted text (`inputs.*`, event fields such as a title, branch name or label, step outputs derived from them) is never interpolated into a `run:` script; it is passed through `env:` and used as a quoted variable | Pass | No event field is interpolated into a `run:` block; `github.ref` is used only in the concurrency group. | +| 11 | A trigger that gives a run secrets or a write token on code from a fork or an untrusted branch (`pull_request_target`, `workflow_run`) does not check out or execute that code | Pass | No `pull_request_target` or `workflow_run` trigger. | +| 12 | A workflow that changes state outside the repository (release, tag, publish, sync, deploy) is started by hand or by a protected branch, and a manual run defaults to a dry run with an explicit input to apply | N-A | The workflow changes nothing outside the repository. | +| 13 | The token the workflow uses has only the scope the job needs, and where the host's built-in token is enough it is used instead of a personal token | N-A | No token is used. | +| 14 | Every job sets `runs-on` to an explicit label and `timeout-minutes` | Pass | `runs-on: ubuntu-latest` and `timeout-minutes: 10`. | +| 15 | `concurrency` is set where two runs would conflict: a check cancels the older run (`cancel-in-progress: true`); a publishing job queues (`cancel-in-progress: false`) | Pass | `concurrency` with `cancel-in-progress: true` for a check. | +| 16 | Triggers are filtered (`branches`, `paths`, `types`) so the workflow runs only for the changes it concerns | Pass | Branch and path filters limit the runs to code and configuration changes. | +| 17 | Tools and dependencies are installed at pinned versions; a version is a workflow input with a default or a value in one place | Pass | Python version is the one value `PYTHON_VERSION`; development tools are pinned with `==` in `pyproject.toml`. | +| 18 | A dependency cache is used where the install is slow enough to matter | N-A | The install takes about 15 seconds; a cache would not matter. | +| 19 | A failing step names the tool, the file and the reason in its log (annotation or `::error::` line) | N-A | Each step is a single tool command whose own log names the file and reason. | +| 20 | A `run:` block is within the limit on embedded program text of criterion 7 of [QC-YML-001]; a longer script is a file (`tools/`, or a shared repository fetched at a pinned ref) that the step calls with one command, and the workflow passes its settings through `env:` | Pass | The longest `run:` block has two lines. | +| 21 | Logic used by more than one workflow or repository is a reusable workflow (`workflow_call`) or a composite action; each input has a `description`, a `type` and a `default` where one is sensible | N-A | One workflow; no logic is shared. | +| 22 | Every workflow feature used is verified on the instance that runs it, and the host and version are recorded; a feature the target hosts differ on is noted in the header | Pass | Verified on Gitea 1.27.3 (`/api/v1/version`): the run completed with conclusion success on runner label ubuntu-latest. | +| 23 | A reusable workflow states, in its header, how a caller pins it and the script it fetches, so the workflow and its script are the same release | N-A | Not a reusable workflow. | +| 24 | A static test of the repository's workflows exists and runs on every pull request: valid YAML, required keys, explicit permissions and runner, no inline script above the limit | N-A | Optional; the workflow is linted by actionlint and yamllint in this review, no repeated static test exists for a single file. | + +## Referenced Checklist Results (QC-YML-001) + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | The file parses with a safe YAML loader and has no duplicate keys in any mapping | Pass | Loaded with PyYAML `safe_load`; no duplicate keys (yamllint `key-duplicates`). | +| 2 | Indentation is 2 spaces everywhere, never tabs; lines end with LF; the file ends with one newline and has no trailing spaces | Pass | 2-space indentation, LF, final newline, no trailing spaces (yamllint default rules). | +| 3 | Passes `yamllint` (or the project's YAML linter) with its configuration committed next to the code and no unexplained `disable` comments | Pass | yamllint 1.38.0 with `.yamllint.yml` committed; no `disable` comments. | +| 4 | A scalar that YAML would coerce to another type is quoted: `yes`, `no`, `on`, `off`, `null`, `~`, numbers with a leading zero, versions such as `1.10`, and values that contain `: ` or ` #` | Pass | `"3.13"` is quoted; no coercible scalar remains. | +| 5 | Only safe, plain types are used: no language-specific tags (`!!python/object`, `!ruby/object`) and no `!include`-style extension unless the consuming tool documents it | Pass | No tags or extensions. | +| 6 | No secret is written in the file: no password, token, key or private connection string; a secret is referenced by name and supplied by the consuming tool | Pass | No secret. | +| 7 | Embedded program text (shell, Python, SQL, `jq`, and so on) in a value is at most five lines; a longer one is moved to a file of its own, in its own language, and the YAML calls it | Pass | Longest embedded script is two lines. | +| 8 | A block of keys or values repeated in the file or across files is defined once (an anchor, a template, an include or a reusable unit the consumer supports) | Pass | Nothing repeats beyond the three-line path list used by two triggers; the paths are a different trigger each, accepted because the host has no anchor support in `on:`. | +| 9 | Anchors, aliases and merge keys (`&`, `*`, `<<`) are used only where the consuming tool is known to support them | Pass | No anchors or aliases. | +| 10 | The file validates against the schema of the consuming tool where one exists, and the schema or tool version is stated | N-A | Optional: no schema file is available offline; actionlint validates the structure. | +| 11 | A header comment states what the file is for, which tool reads it, and where its decision or design is recorded | Pass | The header says what the file is for, which tool reads it and the decision. | +| 12 | Key names follow the convention of the consuming tool; one case style is used within the file (kebab-case or snake_case, never mixed) | Pass | kebab-case for keys such as `runs-on`, `timeout-minutes`; no mixed style. | +| 13 | Multi-line strings use a block scalar (`\|` or `>`) and state the chomping indicator (`\|-`, `\|+`) where the trailing newline matters | Pass | `run: |` is used for the two-line block with the default clip chomping, which suits a script. | +| 14 | The file name is lowercase kebab-case with one extension style (`.yml` or `.yaml`) used throughout the repository | Pass | `ci.yml`, lowercase, `.yml` throughout. | +| 15 | A change is exercised by a check that runs without the real target: a parse and schema test, or a dry run of the consuming tool | Pass | Exercised by actionlint, yamllint and a real run. | + +## Overall Verdict + +Go — every Mandatory criterion of QC-WF-001 and QC-YML-001 passes; the workflow ran green on Gitea 1.27.3. The `Doxyfile` output folder is `build/` (not `build/doxygen/` as the MIL-001 task summary says) because Doxygen creates only one directory level; the Go/No-Go criteria are not affected. + +## Action Items + +| Action | Owner | Due | +| --- | --- | --- | +| None | S01 | n/a | + +--- + +[WF-001]: ../../../.gitea/workflows/ci.yml +[QC-WF-001]: ../../../framework/qc/code/qc-workflow.md +[QC-YML-001]: ../../../framework/qc/code/qc-yaml.md diff --git a/docs/sqa/reviews/rc-009-python-skeleton.md b/docs/sqa/reviews/rc-009-python-skeleton.md new file mode 100644 index 0000000..2dd69a4 --- /dev/null +++ b/docs/sqa/reviews/rc-009-python-skeleton.md @@ -0,0 +1,59 @@ +# SQA Review Record RC-009: PY-001 + +## Metadata +| Key | Value | +| --- | --- | +| ID | RC-009 | +| CrossReference | [PY-001], [QC-PY-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of PY-001 | pending | + +--- + +## Artifact Under Review + +- Instance reviewed: [PY-001] +- Checklist used: [QC-PY-001] +- Scope: full review +- Language and domain: n/a (technical type) +- Language reviewer: none +- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`) + +## Checklist Results + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | Packages, modules, functions, variables, classes and constants follow PEP 8 casing (`snake_case`, `PascalCase`, `UPPER_SNAKE`) | Pass | snake_case modules, UPPER_SNAKE constants; ruff rule set N passes. | +| 2 | Names state purpose in the domain's language; no unexplained abbreviations, no single-letter names outside tiny scopes | Pass | Names state purpose: `DATA_FILE_NAME`, `LETTER_COLUMN`, `INVALID_INPUT_TEXT`. | +| 3 | Code is produced by the project's formatter and passes its linter with no unexplained suppressions | Pass | `ruff check` and `ruff format --check` pass; no suppressions. | +| 4 | Every function and method signature is type-annotated, including `-> None` | Pass | Test functions are annotated `-> None`; constants are annotated. | +| 5 | No bare `except:`, no swallowed exceptions; specific exceptions are raised and the cause is kept (`raise ... from`) | N-A | No exception handling exists in the skeleton. | +| 6 | No mutable default arguments and no shadowed builtins | Pass | No mutable defaults; no builtin shadowed. | +| 7 | Files, locks and connections are managed with context managers | Pass | No file handles are opened; `Traversable.read_text` closes its own. | +| 8 | Public modules, classes and functions have docstrings that say what, not how | Pass | The module and package have docstrings with `@brief`. | +| 9 | Logging uses `logging`, not `print`; no secrets or personal data in log output | N-A | No output is produced in the skeleton. | +| 10 | Classes and operations trace to the Design Class Diagram they implement; deviations are recorded | N-A | No design class diagram exists for this phase; the skeleton has no classes. | +| 11 | Tests exist for new behaviour, are named for the behaviour, and do not depend on order or the network | Pass | Two tests named for the behaviour test the data file. | +| 12 | Type checker runs in strict mode without errors; `Any` is justified in a comment | Pass | `mypy --strict` reports no issue in 3 files. | +| 13 | Dependencies are declared and pinned in the project's dependency file, none unused | Pass | Zero runtime dependencies; dev tools pinned exactly. | +| 14 | Each piece of knowledge (a business rule, constant, format, validation or query) is defined in one place; code is merged only where it expresses the same knowledge, not where it merely looks alike | Pass | Each literal is defined once in `constants.py`; the test reads names, not copies. | +| 15 | Imports point inward: business-rule modules import no framework, database, UI or delivery-mechanism code, and there are no import cycles | Pass | The package imports nothing; no cycles. | +| 16 | SOLID holds: a class or module has one reason to change; new behaviour is added by extension, not by editing a type test in several places; subclasses honour the contract of their base; protocols are narrow; high-level code depends on protocols or abstract types and receives its implementations | Pass | A module with only constants has one reason to change. | + +## Overall Verdict + +Go — every Mandatory criterion of QC-PY-001 passes or is not applicable to the skeleton (constants and smoke tests). + +## Action Items + +| Action | Owner | Due | +| --- | --- | --- | +| None | S01 | n/a | + +--- + +[PY-001]: ../../../src/nato_alphabet/constants.py +[QC-PY-001]: ../../../framework/qc/code/qc-programming-python.md diff --git a/docs/sqa/traceability-matrix.md b/docs/sqa/traceability-matrix.md index c44b432..85b6f04 100644 --- a/docs/sqa/traceability-matrix.md +++ b/docs/sqa/traceability-matrix.md @@ -9,7 +9,8 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [7212302] | +| 2026-10-13 | Deprecated | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [7212302] | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Added rows for ADR-0001, ADR-0002, the CI workflow and the Python skeleton (RC-006 to RC-009) | pending | --- @@ -30,14 +31,19 @@ Tracks backward and forward links between artifact instances so that the cross-a | [BC-001] | Business Case | en | it | - | [SA-001], [PP-001], [MIL-001], [MIL-002], [MIL-003] | [RC-001] | | [SA-001] | Stakeholder Analysis | en | it | [BC-001] | [PP-001] | [RC-002] | | [PP-001] | Project Plan | en | it | [BC-001], [SA-001] | [MIL-001], [MIL-002], [MIL-003] | - | -| [MIL-001] | Milestone | en | it | [BC-001], [PP-001] | [MIL-002] | [RC-003] | +| [MIL-001] | Milestone | en | it | [BC-001], [PP-001] | [MIL-002], [ADR-0001], [ADR-0002] | [RC-003] | | [MIL-002] | Milestone | en | it | [BC-001], [MIL-001] | [MIL-003] | [RC-004] | | [MIL-003] | Milestone | en | it | [BC-001], [MIL-002] | - | [RC-005] | +| [ADR-0001] | ADR | - | - | [BC-001], [SA-001] | [PY-001] | [RC-006] | +| [ADR-0002] | ADR | - | - | [BC-001] | - | [RC-007] | +| [WF-001] | CI workflow | - | - | [MIL-001] | - | [RC-008] | +| [PY-001] | Python source | - | - | [ADR-0001], [MIL-001] | - | [RC-009] | ## Coverage Notes - `-` in Upstream means foundational; in Downstream it means nothing is built on it yet; in Last Reviewed it means no review record exists. - PP-001 has no QC checklist yet; it is accepted by the Product Owner's stand-in. +- WF-001 and PY-001 are labels for reviewed code instances (no artifact file). - Use cases, user stories and design artifacts are added in MIL-002. --- @@ -54,3 +60,11 @@ Tracks backward and forward links between artifact instances so that the cross-a [RC-005]: ./reviews/rc-005-mil-003.md [SA-001]: ../stakeholder-analysis.md [7212302]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/026-nato-alphabet/commit/7212302fb9d9fe411215d4702d56a7cfe8834f1a +[ADR-0001]: ../adr/adr-0001-read-nato-data-with-csv-module.md +[ADR-0002]: ../adr/adr-0002-skip-analysis-artifacts.md +[WF-001]: ../../.gitea/workflows/ci.yml +[PY-001]: ../../src/nato_alphabet/constants.py +[RC-006]: ./reviews/rc-006-adr-0001.md +[RC-007]: ./reviews/rc-007-adr-0002.md +[RC-008]: ./reviews/rc-008-ci-workflow.md +[RC-009]: ./reviews/rc-009-python-skeleton.md From c9e180702a3cd2c3a0e7439ff5fe036bdab41d22 Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 16:32:35 +0800 Subject: [PATCH 3/3] Resolve pending commit links for the MIL-001 deliverables --- docs/adr/adr-0001-read-nato-data-with-csv-module.md | 3 ++- docs/adr/adr-0002-skip-analysis-artifacts.md | 3 ++- docs/sqa/reviews/rc-006-adr-0001.md | 3 ++- docs/sqa/reviews/rc-007-adr-0002.md | 3 ++- docs/sqa/reviews/rc-008-ci-workflow.md | 3 ++- docs/sqa/reviews/rc-009-python-skeleton.md | 3 ++- docs/sqa/traceability-matrix.md | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/adr/adr-0001-read-nato-data-with-csv-module.md b/docs/adr/adr-0001-read-nato-data-with-csv-module.md index cef74f6..80d0479 100644 --- a/docs/adr/adr-0001-read-nato-data-with-csv-module.md +++ b/docs/adr/adr-0001-read-nato-data-with-csv-module.md @@ -9,7 +9,7 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version, reviewed in RC-006 | pending | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version, reviewed in RC-006 | [32a8b84] | Allowed Status values: `Proposed`, `Accepted`, `Rejected`, `Deprecated`, `Superseded by ADR-NNNN`. @@ -51,3 +51,4 @@ Read the NATO alphabet with the standard library `csv` module (`csv.DictReader`) [BC-001]: ../business-case.md [SA-001]: ../stakeholder-analysis.md +[32a8b84]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/026-nato-alphabet/commit/32a8b848c5ffc8081532d137881d9e04cbc2c051 diff --git a/docs/adr/adr-0002-skip-analysis-artifacts.md b/docs/adr/adr-0002-skip-analysis-artifacts.md index 9e25e66..34daee4 100644 --- a/docs/adr/adr-0002-skip-analysis-artifacts.md +++ b/docs/adr/adr-0002-skip-analysis-artifacts.md @@ -9,7 +9,7 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version, reviewed in RC-007 | pending | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version, reviewed in RC-007 | [32a8b84] | Allowed Status values: `Proposed`, `Accepted`, `Rejected`, `Deprecated`, `Superseded by ADR-NNNN`. @@ -48,3 +48,4 @@ Skip the KPI definitions, the Business Model Canvas, the BPMN process model and --- [BC-001]: ../business-case.md +[32a8b84]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/026-nato-alphabet/commit/32a8b848c5ffc8081532d137881d9e04cbc2c051 diff --git a/docs/sqa/reviews/rc-006-adr-0001.md b/docs/sqa/reviews/rc-006-adr-0001.md index 383f304..ed7ac96 100644 --- a/docs/sqa/reviews/rc-006-adr-0001.md +++ b/docs/sqa/reviews/rc-006-adr-0001.md @@ -9,7 +9,7 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of ADR-0001 | pending | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of ADR-0001 | [a381791] | --- @@ -52,3 +52,4 @@ Go — every Mandatory criterion of QC-ADR-001 passes. [ADR-0001]: ../../adr/adr-0001-read-nato-data-with-csv-module.md [QC-ADR-001]: ../../../framework/qc/artifacts/qc-adr.md +[a381791]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/026-nato-alphabet/commit/a381791874907359dab9b8f40a3c2b73f95dc0c8 diff --git a/docs/sqa/reviews/rc-007-adr-0002.md b/docs/sqa/reviews/rc-007-adr-0002.md index f71e853..3132733 100644 --- a/docs/sqa/reviews/rc-007-adr-0002.md +++ b/docs/sqa/reviews/rc-007-adr-0002.md @@ -9,7 +9,7 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of ADR-0002 | pending | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of ADR-0002 | [a381791] | --- @@ -52,3 +52,4 @@ Go — every Mandatory criterion of QC-ADR-001 passes. [ADR-0002]: ../../adr/adr-0002-skip-analysis-artifacts.md [QC-ADR-001]: ../../../framework/qc/artifacts/qc-adr.md +[a381791]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/026-nato-alphabet/commit/a381791874907359dab9b8f40a3c2b73f95dc0c8 diff --git a/docs/sqa/reviews/rc-008-ci-workflow.md b/docs/sqa/reviews/rc-008-ci-workflow.md index dc5832c..dfe8eb8 100644 --- a/docs/sqa/reviews/rc-008-ci-workflow.md +++ b/docs/sqa/reviews/rc-008-ci-workflow.md @@ -9,7 +9,7 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of WF-001 | pending | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of WF-001 | [a381791] | --- @@ -86,3 +86,4 @@ Go — every Mandatory criterion of QC-WF-001 and QC-YML-001 passes; the workflo [WF-001]: ../../../.gitea/workflows/ci.yml [QC-WF-001]: ../../../framework/qc/code/qc-workflow.md [QC-YML-001]: ../../../framework/qc/code/qc-yaml.md +[a381791]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/026-nato-alphabet/commit/a381791874907359dab9b8f40a3c2b73f95dc0c8 diff --git a/docs/sqa/reviews/rc-009-python-skeleton.md b/docs/sqa/reviews/rc-009-python-skeleton.md index 2dd69a4..c1524bc 100644 --- a/docs/sqa/reviews/rc-009-python-skeleton.md +++ b/docs/sqa/reviews/rc-009-python-skeleton.md @@ -9,7 +9,7 @@ ## Version History | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | -| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of PY-001 | pending | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Review of PY-001 | [a381791] | --- @@ -57,3 +57,4 @@ Go — every Mandatory criterion of QC-PY-001 passes or is not applicable to the [PY-001]: ../../../src/nato_alphabet/constants.py [QC-PY-001]: ../../../framework/qc/code/qc-programming-python.md +[a381791]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/026-nato-alphabet/commit/a381791874907359dab9b8f40a3c2b73f95dc0c8 diff --git a/docs/sqa/traceability-matrix.md b/docs/sqa/traceability-matrix.md index 85b6f04..ab26957 100644 --- a/docs/sqa/traceability-matrix.md +++ b/docs/sqa/traceability-matrix.md @@ -10,7 +10,7 @@ | Date | Status | Author | Reviewer | Change | Commit | | --- | --- | --- | --- | --- | --- | | 2026-10-13 | Deprecated | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [7212302] | -| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Added rows for ADR-0001, ADR-0002, the CI workflow and the Python skeleton (RC-006 to RC-009) | pending | +| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Added rows for ADR-0001, ADR-0002, the CI workflow and the Python skeleton (RC-006 to RC-009) | [a381791] | --- @@ -68,3 +68,4 @@ Tracks backward and forward links between artifact instances so that the cross-a [RC-007]: ./reviews/rc-007-adr-0002.md [RC-008]: ./reviews/rc-008-ci-workflow.md [RC-009]: ./reviews/rc-009-python-skeleton.md +[a381791]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/026-nato-alphabet/commit/a381791874907359dab9b8f40a3c2b73f95dc0c8