Repository navigation
Better command help, lint takes several targets, register lists for py-doc new - #134
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Command help
py-doc docx,slidesandlintshow their own name in the usage line (they showedpy-doc2docx,py-doc2slides,py-doclint). The old commands keep their own names.buildandmigratehave a description line.py-doc --helpends by pointing topy-doc COMMAND --helpand the user guide.build,migrate,new,lint,docxandslides.templateuses the same-q/-vwording as every other command;template checksays-valso shows the INFO findings.new --prefixandmigrate --fromexplain themselves.py-doc linttakes several targetspy-doc lint docs README.mdchecks each Markdown file once, overlapping targets included, and reports them together.DocLinter.lint_pathsdoes the work;lint_pathcalls it with one target. Settings come from thepy-doc.ymlnearest the first target unless--confignames one. Vale's base folder is the targets' common folder (the first target's on different Windows drives).Allowed lists in
doc-numbers.ymlThe register may list
prefixes,typesandclassifications:--prefixnow sets the prefix of any document, not only when the register is made; the register'sprefixstays the default.Docs
py-doc.ymlapplies.new --author,--classification,--description,migrate --from,setup --distro,tools build --no-cache,c4 export --formats. A script that reads every command's--helpnow 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 ofdocx,slides,lint,build,migrate,newandpy-doc; the old commands keep their names.tests/test_examples.pyfailures that also occur onmainhere (no Graphviz, Mermaid or PlantUML in this environment).ruff checkandpy-doc lint docs/guide README.md --strictare clean (Vale is not installed here; CI runs it).🤖 Generated with Claude Code
https://claude.ai/code/session_01Ket2UPXgz46XKSUqpuPixk
Generated by Claude Code