85e8342a74
Every script gets a complete spec.md sectionized like SPEC.md (python/src/<name>/spec.md, <name>.spec.md for shell scripts). Change order becomes spec -> tests -> code. Specs added for gpgtools, hello, hello_bash; CHANGELOG under Unreleased. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
1.2 KiB
1.2 KiB
hello specification
Complete description of python/src/hello/hello.py. The sample
Python script of the template: it exercises the registry, the
test category, and the run_python_script entry end to end.
Items are cited as hello spec item N.M.
1. Purpose
- 1.1 Print one line,
hello from daedalus <version>, and exit 0. It takes no arguments of its own. - 1.2
<version>comes fromapp_version(): the installed daedalus metadata (importlib.metadata.version("daedalus")), else theversionfield of the checkout'spyproject.toml(resolved relative to the script file), else the literalunknown.
2. Behavior
- 2.1
daedalus helloprints the line and exits 0;daedalus test hellodoes the same through the category prefix. - 2.2 The parser opts in to argcomplete (SPEC item 6.9) with a guarded import; without argcomplete nothing changes.
- 2.3 No files are read besides
pyproject.tomlin the fallback; nothing is written.
3. Testing approach
- 3.1
python/tests/test_hello.pycovers both version resolutions (metadata and pyproject fallback, monkeypatched), the printed line,--help, and end-to-end runs through the CLI.