Conversation
Add cleed_phaseshifts.py to wrap phsh.py, emit a provenance manifest, and document the workflow in the phsh docs.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideAdds a new cleed_phaseshifts helper CLI that wraps the phaseshifts phsh.py script to generate CLEED phase shift files into CLEED_PHASE (or a specified output directory) while writing a JSON manifest with metadata and hashes, and documents the workflow in the phaseshifts auxiliary program docs. Sequence diagram for cleed_phaseshifts CLI execution flowsequenceDiagram
actor User
participant cleed_phaseshifts as cleed_phaseshifts_py
participant phsh_py as phsh_py
participant filesystem as FileSystem
User->>cleed_phaseshifts: Invoke with --bulk, --slab, --output-dir
cleed_phaseshifts->>cleed_phaseshifts: build_parser
cleed_phaseshifts->>cleed_phaseshifts: parse_args
cleed_phaseshifts->>filesystem: Check bulk file exists
filesystem-->>cleed_phaseshifts: Exists or error
cleed_phaseshifts->>filesystem: Check slab file exists
filesystem-->>cleed_phaseshifts: Exists or error
cleed_phaseshifts->>filesystem: Create output_dir if missing
cleed_phaseshifts->>cleed_phaseshifts: resolve_phsh(phsh)
cleed_phaseshifts->>filesystem: Check phsh_py in PATH or at given path
filesystem-->>cleed_phaseshifts: Found or error
cleed_phaseshifts->>phsh_py: subprocess.run(-g -b bulk -i slab -f format ...)
phsh_py->>filesystem: Read bulk and slab
phsh_py->>filesystem: Write *.phs to CLEED_PHASE
phsh_py-->>cleed_phaseshifts: Exit code
cleed_phaseshifts->>filesystem: List *.phs in output_dir
cleed_phaseshifts->>filesystem: Read bulk for sha256sum
cleed_phaseshifts->>filesystem: Read slab for sha256sum
cleed_phaseshifts->>filesystem: Write phaseshifts_manifest_json
cleed_phaseshifts-->>User: Print paths and exit status
Class diagram for cleed_phaseshifts helper module structureclassDiagram
class cleed_phaseshifts_module {
+sha256sum(path Path) str
+phaseshifts_version() str
+resolve_phsh(binary str) str
+build_parser() ArgumentParser
+main() int
}
class Path
class ArgumentParser
cleed_phaseshifts_module ..> Path : uses
cleed_phaseshifts_module ..> ArgumentParser : builds
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Clarifications for #44:
|
Codacy's Analysis Summary4 new issues (≤ 0 issue) Review Pull Request in Codacy →
|
|



Problem
Issue #44 asks for a reproducible phaseshifts integration so users can generate phase shift files and run CLEED without manual file munging.
Solution
src/scripts/cleed_phaseshifts.py, a wrapper aroundphsh.pythat writes output toCLEED_PHASE(or--output-dir) and records a JSON manifest with hashes + versions.doc/aux_programs/phsh.rst.Testing
Follow-ups
cleedships as a package.Summary by Sourcery
Add a command-line helper to generate CLEED phase shift files using the phaseshifts package and record outputs in a JSON manifest.
New Features:
Documentation: