
Upgrade a scenario folder to the current on-disk layout
Source:R/save-scenario.R
upgrade_scenario_layout.RdMigrates a scenario directory in place to layout 3 with the current run structure. Idempotent — running it on an up-to-date folder changes nothing. It handles, in one pass:
layout 2: each
script/<solver>/directory (recognized by itssolvercsv) becomesruns/<solver>/solver/with a backfilledrun.yml(status: "legacy", solver identity from the csv, timestamps from file modification times); the top-levelmodOut/store moves under the active run. Transient timestamp directories are left where they are.interim layout 3 (early builds): the
runs/default/<solve>/wrapper is flattened toruns/<solve>/, and each run'sscript/working dir is renamed tosolver/.
The scenario object is re-saved with rebased paths, scenario.yml (with
its default: run) and the layout marker are written, and the project
registry is updated.