Skip to content

Better command help, lint takes several targets, register lists for py-doc new - #134

Merged
markbac merged 1 commit into
mainfrom
claude/gracious-ride-1x1cpi
Oct 15, 2026
Merged

markbac merged 1 commit into
mainfrom
claude/gracious-ride-1x1cpi

Conversation

@markbac

@markbac markbac commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Summary

Command help

  • py-doc docx, slides and lint show their own name in the usage line (they showed py-doc2docx, py-doc2slides, py-doclint). The old commands keep their own names.
  • build and migrate have a description line. py-doc --help ends by pointing to py-doc COMMAND --help and the user guide.
  • Examples at the end of build, migrate, new, lint, docx and slides.
  • template uses the same -q/-v wording as every other command; template check says -v also shows the INFO findings.
  • new --prefix and migrate --from explain themselves.

py-doc lint takes several targets

py-doc lint docs README.md checks each Markdown file once, overlapping targets included, and reports them together. DocLinter.lint_paths does the work; lint_path calls it with one target. Settings come from the py-doc.yml nearest the first target unless --config names one. Vale's base folder is the targets' common folder (the first target's on different Windows drives).

Allowed lists in doc-numbers.yml

The register may list prefixes, types and classifications:

  • With a list, the value must be one of it. Case does not matter and the list's spelling is kept. The wizard shows the list and asks again after a wrong or empty answer; a wrong option is an error that names the list.
  • Without a list, anything goes. --prefix now sets the prefix of any document, not only when the register is made; the register's prefix stays the default.
  • The lists are kept when the register is saved.

Docs

  • Reference: a table of the wizard's questions with their options and defaults, and the register lists.
  • Lint guide: several targets and which py-doc.yml applies.
  • Options that were in neither the README nor the guide: new --author, --classification, --description, migrate --from, setup --distro, tools build --no-cache, c4 export --formats. A script that reads every command's --help now finds every option documented.

Testing

  • tests/test_new.py: listed values with the register's spelling, refused values for each list and a missing type, the wizard re-asking, free values and a per-document prefix without lists.
  • tests/test_lint_cli.py: files and folders as one report with each file once, a bad target among several, the help.
  • tests/test_app.py: usage line, description and examples of docx, slides, lint, build, migrate, new and py-doc; the old commands keep their names.
  • Full suite passes except the 7 tests/test_examples.py failures that also occur on main here (no Graphviz, Mermaid or PlantUML in this environment). ruff check and py-doc lint docs/guide README.md --strict are clean (Vale is not installed here; CI runs it).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ket2UPXgz46XKSUqpuPixk


Generated by Claude Code

…y-doc new

Help:
- docx, slides and lint show py-doc docx/slides/lint in their usage line;
  the old py-doc2docx, py-doc2slides and py-doclint keep their own names.
- build and migrate have a description; py-doc --help points to
  py-doc COMMAND --help and the guide.
- Examples on build, migrate, new, lint, docx and slides.
- template: the same -q/-v wording as the other commands; check says that
  -v also shows the INFO findings.
- new --prefix and --from explain themselves.

lint takes any number of files and folders, checks each Markdown file once
and reports them together. Settings come from the py-doc.yml nearest the
first target.

py-doc new: doc-numbers.yml may list the allowed prefixes, types and
classifications. A value must then be one of the list (any case; the list's
spelling is kept): the wizard shows the list and asks again, an option is
an error naming it. Without a list anything goes, and --prefix now sets the
prefix of any document, not only when the register is made.

Guide: the wizard questions with their options and defaults, the register
lists, lint with several targets, and the options it lacked (new --author,
--classification, --description; migrate --from; setup --distro;
tools build --no-cache; c4 export --formats).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ket2UPXgz46XKSUqpuPixk
@markbac
markbac merged commit 517ad7d into main Oct 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants