Project data relocation¶
Status: completed. update_project exposes typed global and per-scope root
mappings, validates the complete relocation before writing, preserves the
ordinary metadata-only route when no mapping is supplied, and writes a new
project rather than modifying the input. The user-facing procedure is in
doc/relocating_project_data.md.
Contract¶
Create a new SIMPLE project whose stored dataset paths point from an old storage root to an existing new storage root.
old_rootandnew_rootdefine a global mapping.mic_old_rootandmic_new_rootoverride it for micrograph paths.ptcl_old_rootandptcl_new_rootoverride it for particle-stack paths.cavg_old_rootandcavg_new_rootoverride it for class-average paths.vol_old_rootandvol_new_rootoverride it for volume paths.projfile_outoptionally names the new project; by default the command writes<input>_remapped.simplebeside the input project.
Each old/new pair is atomic. A scoped pair overrides the global pair for its scope.
Path ownership¶
- Micrographs:
mic.movie,mic.intg, andmic.boxfile. - Particles:
stk.stkandstk.boxfile. - Class averages:
out.stk,out.stkpath,out.frcsforfrc2D, andout.sigma2. - Volumes:
out.vol,out.fsc, andout.frcsforfrc3D.
Safety requirements¶
- Match the old root only on a complete path-component boundary.
- Refuse an empty old or new root, a filesystem root as the old root, or equal old and new roots.
- Validate the new root and every proposed target before writing.
- Require an explicitly supplied scoped mapping to match at least one path.
- Never modify the input project or overwrite an existing output project.
- Do not write any output project when validation fails.
Landed implementation¶
- The arguments are registered in the typed
parameterslifecycle and theupdate_projectUI metadata. - The project-domain helper maps supported segment fields and validates all targets before the commander publishes a result.
- The opt-in relocation branch leaves the existing metadata-only branch unchanged.
- Focused project tests cover global and independently scoped mappings, and the user guide documents the CLI contract and safety behavior.