feat(cli): separate-branches rename, short aliases, clean dry-run
- --normalize-to-one renamed to --separate-branches (no alias; the name now describes the output choice: total spectrum with intensity-normalized branches vs separate branches, each normalized to unit area with intensities left to the data user). SpectrumConfig.normalize_to_one -> separate_branches, CSV header word to_one -> separate. - every long option gains a single-letter alias: -N -i -s -m -o -p -L -d -c -V -S -b (only -v/-q existed before) - dry-run drops the top-level Transition: line — the per-branch list below already reports each branch's transition type - version bumped to 0.4.1 (pyproject, __version__, CSV semantics docstring, TODO roadmap entry)
This commit is contained in:
@@ -66,12 +66,12 @@ def n_points_of(header: List[str]) -> int:
|
||||
class TestCLIJsonFlows:
|
||||
"""Options must propagate through the JSON config flow (D2)."""
|
||||
|
||||
def test_json_honors_normalize_to_one_and_tab_separator(
|
||||
def test_json_honors_separate_branches_and_tab_separator(
|
||||
self, tmp_path: Any
|
||||
) -> None:
|
||||
src = write_json(tmp_path)
|
||||
out = str(tmp_path / "to_one.csv")
|
||||
main([src, "--output", out, "--normalize-to-one", "--csv-separator", "tab"])
|
||||
main([src, "--output", out, "--separate-branches", "--csv-separator", "tab"])
|
||||
|
||||
with open(out) as f:
|
||||
body = "".join(ln for ln in f if not ln.startswith("#"))
|
||||
@@ -136,7 +136,7 @@ class TestCLIDegenerateFlows:
|
||||
out,
|
||||
"--neutrino-mass",
|
||||
"0.35",
|
||||
"--normalize-to-one",
|
||||
"--separate-branches",
|
||||
]
|
||||
)
|
||||
assert exc.value.code == 1
|
||||
@@ -147,9 +147,9 @@ class TestCLIDegenerateFlows:
|
||||
class TestCLIPaceENSDF:
|
||||
"""paceENSDF flow honors the same export options."""
|
||||
|
||||
def test_paceensdf_honors_normalize_to_one(self, tmp_path: Any) -> None:
|
||||
def test_paceensdf_honors_separate_branches(self, tmp_path: Any) -> None:
|
||||
out = str(tmp_path / "p32.csv")
|
||||
main(["P32", "--output", out, "--normalize-to-one"])
|
||||
main(["P32", "--output", out, "--separate-branches"])
|
||||
|
||||
df = read_export(out)
|
||||
assert "total_spectrum" not in df.columns
|
||||
|
||||
Reference in New Issue
Block a user