fix(cli): strip .github/workflows/ from workspace-bundled sample module - #149
Merged
Conversation
`smpy create-module` ships .github/workflows/{ci.yml, publish.yml} so
authors who publish a module as its own repo get CI + PyPI trusted
publishing out of the box. But `smpy new` calls create_module() to drop
a sample `hello` module under modules/hello/ in a workspace — GitHub only
reads workflows from the repo root, so the bundled copies were dead
files masquerading as active CI.
Strip the sample's .github/ tree after scaffolding, mirroring how
_strip_workspace_owned_files drops host files the workspace root owns.
https://claude.ai/code/session_01LfX6sdezX5NFAH3v1eixUq
…t test The dedicated test pushed test_cli_new.py past the 300-line cap. Move the regression assertion next to the other "files we don't ship at host/" assertions in test_sm_new_default_lays_down_workspace_layout — both check the same workspace-mode trimming behavior. https://claude.ai/code/session_01LfX6sdezX5NFAH3v1eixUq
Deploying simple-module-python with
|
| Latest commit: |
bc8e71f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://92954713.simple-module-python.pages.dev |
| Branch Preview URL: | https://claude-fix-workflow-location.simple-module-python.pages.dev |
- Trim the 4-line comment to one line covering only the non-obvious WHY (workflows under a sub-path don't run). - Drop ignore_errors=True — the template guarantees .github/ exists immediately after create_module(), so silent error-swallowing only hides real OS-level failures. https://claude.ai/code/session_01LfX6sdezX5NFAH3v1eixUq
antosubash
marked this pull request as ready for review
May 13, 2026 06:30
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 create-modulelegitimately ships.github/workflows/{ci.yml, publish.yml}— modules published as their own repo need CI + PyPI trusted publishing on day one.But
smpy newalso callscreate_module()to drop a samplehellomodule undermodules/hello/inside a workspace. GitHub Actions only reads workflows from the repo root (<app>/.github/workflows/), so<app>/modules/hello/.github/workflows/ends up being dead files masquerading as active CI — confusing for anyone learning the layout.This PR strips the sample's
.github/tree after scaffolding, mirroring how_strip_workspace_owned_filesalready drops host files the workspace root owns. The standalonesmpy create-modulepath is untouched.Test plan
test_sm_new_strips_sample_module_github_workflowsassertsmodules/hello/.github/is absent aftersmpy newtest_scaffold_ships_github_workflows(and the other publish.yml/ci.yml tests intest_scaffolding_module.py) still pass — standalonesmpy create-modulestill ships workflowsuv run pytest framework/cli/tests/test_cli_new.py framework/cli/tests/test_scaffolding_module.py→ 33 passedruff check+ruff format --checkclean on changed fileshttps://claude.ai/code/session_01LfX6sdezX5NFAH3v1eixUq
Generated by Claude Code