fix(cli): keep user's name form in scaffold READMEs (#139) - #143
Merged
antosubash merged 1 commit intoMay 13, 2026
Merged
Conversation
Owner
Author
|
Not auto-merged in this batch — this PR is in a CI on the head commit is green (12/12), so once rebased onto current Generated by Claude Code |
`smpy new simple_module_chat` created the directory with underscores
but produced a README header and tree diagram using `simple-module-chat`
(hyphens), because `create_workspace` substituted `{{HOST_NAME}}` with
the PyPI-normalized form everywhere.
Split the template placeholder: `{{HOST_NAME}}` is now the user-typed
display form (used in README heading + tree); `{{HOST_PYPI_NAME}}` is
the kebab-case PEP 503 form (used in `pyproject.toml` and `package.json`
`name` fields). `smpy new` validates the input up front — rejecting
mixed case, leading digits, and mixed `_`/`-` separators that have no
canonical display form — and prints a one-line "Normalizing PyPI name
to ..." notice when the two forms diverge.
antosubash
force-pushed
the
feature/feat-scaffold-mixes-simple-module-chat-underscores-simple-23d40
branch
from
May 13, 2026 16:13
38e70f5 to
8aed074
Compare
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
smpy new simple_module_chatwas creating the directory with underscores but emitting# simple-module-chatin the README heading + tree diagram, becausecreate_workspacesubstituted{{HOST_NAME}}with the PyPI-normalized form everywhere.{{HOST_NAME}}is now the user-typed display form (used in README heading + tree);{{HOST_PYPI_NAME}}is the kebab-case PEP 503 form (used inpyproject.tomlandpackage.jsonnamefields).smpy newvalidates the input up front — rejecting mixed case (MyApp), leading digits (1chat), and mixed_/-separators (foo_bar-baz) that have no canonical display form — and prints a one-lineNormalizing PyPI name to '...'.notice when the two forms diverge.Fixes #139.
Test plan
uv run pytest framework/cli/tests/— 112 passed (7 new regression tests intest_cli_new_regressions.py)uv run ruff check+uv run ty checkon the changed files — cleansmpy new simple_module_chat --yes --no-install: directorysimple_module_chat/, README heading# simple_module_chat, treesimple_module_chat/, workspace pyprojectname = "simple-module-chat", host pyprojectname = "simple-module-chat-host", CLI prints the normalization noticesmpy new simple-module-chat --yes --no-install: everything usessimple-module-chat, no normalization noticesmpy new simple_module_chat --flat --yes --no-install: flat layout consistent (README + directory both underscored, pyproject normalized)