Commit 8b6dee0
fix(cli): strip .github/workflows/ from workspace-bundled sample module (#149)
* fix(cli): strip .github/workflows/ from workspace-bundled sample module
`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
* test(cli): fold .github strip assertion into existing workspace-layout 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
* refactor(cli): tighten the workspace-mode .github strip
- 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
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6c0a620 commit 8b6dee0
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
| |||
0 commit comments