@@ -26,10 +26,9 @@ commands within `sh.scoped(...)`, and inspect `CommandResult.exit_code`,
2626catalogues in a project module, while standalone scripts and tests should keep
2727local catalogues scoped to the programs they need.
2828
29- The generated documentation should signpost
30- ` docs/scripting-standards.md ` from contributor-facing instructions so script
31- authors find the ` cuprum ` , ` Cyclopts ` , ` pathlib ` , and ` cmd-mox ` conventions
32- before adding automation.
29+ The generated documentation should signpost ` docs/scripting-standards.md ` from
30+ contributor-facing instructions so script authors find the ` cuprum ` , ` Cyclopts ` ,
31+ ` pathlib ` , and ` cmd-mox ` conventions before adding automation.
3332
3433## Alternatives considered
3534
@@ -45,9 +44,9 @@ allowlist without enforcing scoped command construction across the script.
4544` plumbum ` also makes observability a convention layered around command calls.
4645Common logging, tracing, and command auditing would need bespoke wrappers, and
4746those wrappers would be easy to bypass when a script author reaches directly for
48- ` local[...] ` or an imported command object. That is acceptable for small private
49- scripts, but it is a poor template default because generated projects inherit
50- the convention without the local context that produced it.
47+ ` local[...] ` or an imported command object. That is acceptable for small
48+ private scripts, but it is a poor template default because generated projects
49+ inherit the convention without the local context that produced it.
5150
5251Finally, ` plumbum ` raises on non-zero exits by default. That can be convenient
5352for short scripts, but it encourages exception-driven control flow for command
@@ -57,10 +56,10 @@ observable values that tests can assert directly with `cmd-mox`.
5756### Use subprocess directly
5857
5958The standard library ` subprocess ` module avoids a dependency, but it leaves
60- command allowlisting, argument construction, result handling, observability, and
61- test-double integration to each script. That would make the template guidance
62- longer and less consistent while still failing to provide a central enforcement
63- point for external program access.
59+ command allowlisting, argument construction, result handling, observability,
60+ and test-double integration to each script. That would make the template
61+ guidance longer and less consistent while still failing to provide a central
62+ enforcement point for external program access.
6463
6564## Consequences
6665
@@ -71,9 +70,8 @@ place to attach logging or auditing, and keeps command results testable as data.
7170
7271Scripts no longer rely on exception-driven handling of non-zero command exits;
7372they must check ` CommandResult.exit_code ` directly. This is slightly more
74- verbose than ` plumbum ` for trivial calls, but it makes success and failure paths
75- clear in both production scripts and tests that mock external executables.
73+ verbose than ` plumbum ` for trivial calls, but it makes success and failure
74+ paths clear in both production scripts and tests that mock external executables.
7675
77- The template documentation now includes migration guidance for legacy
78- ` plumbum ` usage, but the preferred path for new and updated scripts is
79- ` cuprum ` .
76+ The template documentation now includes migration guidance for legacy ` plumbum `
77+ usage, but the preferred path for new and updated scripts is ` cuprum ` .
0 commit comments