Skip to content

Commit 3be74a9

Browse files
gescholtclaude
andcommitted
chore: Update analysis modules and add docs gitignore
- Update CampaignAnalysis.jl, ExperimentCollector.jl, ResultsLoader.jl - Add docs/Manifest.toml to .gitignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 20c8d59 commit 3be74a9

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ collected_experiments_*/
5050

5151
# Experimental data (personal analysis, not package code)
5252
collected_experiments_*/
53+
docs/Manifest.toml

src/CampaignAnalysis.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ function aggregate_csv_metrics_by_degree(campaign::CampaignResults)
181181
for exp in campaign.experiments
182182
exp_path = exp.source_path
183183

184-
# Find all CSV files for this experiment
185-
csv_files = filter(f -> startswith(basename(f), "critical_points_deg_"),
184+
# Find all CSV files for this experiment (both new and legacy formats)
185+
csv_files = filter(f -> startswith(basename(f), "critical_points_raw_deg_") ||
186+
startswith(basename(f), "critical_points_deg_"),
186187
readdir(exp_path, join=true, sort=false))
187188

188189
for csv_file in csv_files
@@ -879,8 +880,9 @@ function print_parameter_recovery_table(campaign::CampaignResults)
879880
continue # Skip if no true parameters
880881
end
881882

882-
# Load critical points by degree
883-
csv_files = filter(f -> startswith(basename(f), "critical_points_deg_"),
883+
# Load critical points by degree (both new and legacy formats)
884+
csv_files = filter(f -> startswith(basename(f), "critical_points_raw_deg_") ||
885+
startswith(basename(f), "critical_points_deg_"),
884886
readdir(exp_path, join=true))
885887

886888
if isempty(csv_files)

src/ExperimentCollector.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ function validate_experiment(exp_path::String)::ValidationResult
155155
files = readdir(exp_path)
156156

157157
# Check for critical points CSV files
158-
has_csv = any(f -> startswith(f, "critical_points_deg_") && endswith(f, ".csv"), files)
158+
# Support both new format (critical_points_raw_deg_X.csv) and legacy (critical_points_deg_X.csv)
159+
has_csv = any(f -> endswith(f, ".csv") &&
160+
(startswith(f, "critical_points_raw_deg_") || startswith(f, "critical_points_deg_")), files)
159161

160162
# Check for config file
161163
has_config = "experiment_config.json" in files

src/ResultsLoader.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ function is_single_experiment(path::String)
5151
end
5252

5353
files = readdir(path)
54-
has_csv = any(f -> endswith(f, ".csv") && startswith(f, "critical_points_deg_"), files)
54+
# Support both new format (critical_points_raw_deg_X.csv) and legacy (critical_points_deg_X.csv)
55+
has_csv = any(f -> endswith(f, ".csv") &&
56+
(startswith(f, "critical_points_raw_deg_") || startswith(f, "critical_points_deg_")), files)
5557
has_results = "results_summary.json" in files || "results_summary.jld2" in files
5658

5759
return has_csv || has_results
@@ -389,7 +391,10 @@ function load_critical_points_from_csvs(dir_path::String, data::AbstractDict)
389391
degree_str = replace(string(degree_key), "degree_" => "")
390392
degree = parse(Int, degree_str)
391393

392-
csv_file = joinpath(dir_path, "critical_points_deg_$(degree).csv")
394+
# Try new format first (Phase 2), fall back to legacy format
395+
csv_file_raw = joinpath(dir_path, "critical_points_raw_deg_$(degree).csv")
396+
csv_file_legacy = joinpath(dir_path, "critical_points_deg_$(degree).csv")
397+
csv_file = isfile(csv_file_raw) ? csv_file_raw : csv_file_legacy
393398

394399
if !isfile(csv_file)
395400
continue

0 commit comments

Comments
 (0)