Context
Follow-up to #372 (duct_main.py breakup). Two constants remain in duct_main.py that are really CLI defaults:
DUCT_OUTPUT_PREFIX - default for --output-prefix
EXECUTION_SUMMARY_FORMAT - default for --summary-format
These should live in cli.py with the argument definitions, not in a separate module.
Proposed Changes
-
Rename constants to clarify they're defaults:
DUCT_OUTPUT_PREFIX → DEFAULT_OUTPUT_PREFIX
EXECUTION_SUMMARY_FORMAT → DEFAULT_SUMMARY_FORMAT
-
Move to cli.py - CLI defaults belong with CLI code
-
Refactor ls.py - Currently imports DUCT_OUTPUT_PREFIX to construct a glob pattern when no paths are given:
pattern = f"{DUCT_OUTPUT_PREFIX[:DUCT_OUTPUT_PREFIX.index('{')]}*"
This creates a circular import if the constant moves to cli.py (cli imports ls).
Solution: Add a --search-prefix (or similar) CLI argument to con-duct ls and pass it as a parameter to the ls() function.
-
Update tests to import from the new location
Blocked By
Context
Follow-up to #372 (duct_main.py breakup). Two constants remain in
duct_main.pythat are really CLI defaults:DUCT_OUTPUT_PREFIX- default for--output-prefixEXECUTION_SUMMARY_FORMAT- default for--summary-formatThese should live in
cli.pywith the argument definitions, not in a separate module.Proposed Changes
Rename constants to clarify they're defaults:
DUCT_OUTPUT_PREFIX→DEFAULT_OUTPUT_PREFIXEXECUTION_SUMMARY_FORMAT→DEFAULT_SUMMARY_FORMATMove to
cli.py- CLI defaults belong with CLI codeRefactor
ls.py- Currently importsDUCT_OUTPUT_PREFIXto construct a glob pattern when no paths are given:This creates a circular import if the constant moves to
cli.py(cli imports ls).Solution: Add a
--search-prefix(or similar) CLI argument tocon-duct lsand pass it as a parameter to thels()function.Update tests to import from the new location
Blocked By