feat(import): give each merged file a view filtered to it (improvise-lpzu)
A CSV merge now records each file's columns, and the build adds one view per file: File on Filter at that file's item, its own categories seated as a fresh import seats them, the rest on None, and other files' measures hidden. The merged Default view stays the initial view. The headless and wizard paths both carry the sources. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
committed by
Edward Langley
parent
e65d87fda9
commit
bb505f8faf
@@ -653,6 +653,18 @@ fn a_headless_import_of_a_folder_merges_its_csv_files_and_repeats_byte_for_byte(
|
||||
assert!(doc.lines().any(|l| l == line), "{line} missing from\n{doc}");
|
||||
}
|
||||
assert!(!doc.contains("README"), "{doc}");
|
||||
let views: Vec<&str> = doc.lines().filter(|l| l.starts_with("## View: ")).collect();
|
||||
assert_eq!(
|
||||
views,
|
||||
[
|
||||
"## View: Default",
|
||||
"## View: abs-churn",
|
||||
"## View: age",
|
||||
"## View: coupling"
|
||||
]
|
||||
);
|
||||
assert!(doc.lines().any(|l| l == "File: filter, coupling"), "{doc}");
|
||||
assert!(doc.contains("Initial View: Default"), "{doc}");
|
||||
|
||||
// The output now sits in the folder; a second run must not read it.
|
||||
let second = run_import(&dir, &out_path, &[]);
|
||||
|
||||
Reference in New Issue
Block a user