What happened
Recipes in a path-rooted sub-analysis execute from the project root, but lc init scaffolds a per-sub-analysis scripts/ dir and the engine renders {output} as root-relative (e.g. analyses/reconstruction/results/<universe>/<output_id>). A recipe authored the natural way — python scripts/run_reconstruction.py, with the script reading cwd-relative paths like ../../data/... — fails because there is no scripts/ at the project root and the relative data path does not resolve. The scaffold/docs treat a sub-analysis as a self-contained unit (cwd = the sub-analysis dir), but the executor runs every recipe from the project root with no cd into the analysis_path.
Error
python: can't open file '<project_root>/scripts/run_reconstruction.py': [Errno 2] No such file or directory
Reproduction
- Create a path-rooted sub-analysis (
analyses/<name>/ with its own astra.yaml and scripts/).
- Author a recipe:
command: python -u scripts/foo.py --output {output}.
lc run <name>.<output_id> from the project root.
- Resolved command runs from project root: the script path and any cwd-relative reads (
../../data/...) fail.
The engine renders {output} root-relative (analyses/<name>/results/...) yet runs from the project root — internally inconsistent with sub-analysis-relative authoring.
Suggested resolution: either cd into the path-rooted sub-analysis dir and render {output} relative to it, or document/scaffold that ALL recipe paths must be project-root-relative.
Environment
- ASTRA (astra-spec): 0.0.7
- lightcone-cli: 0.3.0
- Python: 3.11.14
- OS: Linux 6.4.0 (NERSC Perlmutter)
What happened
Recipes in a path-rooted sub-analysis execute from the project root, but
lc initscaffolds a per-sub-analysisscripts/dir and the engine renders{output}as root-relative (e.g.analyses/reconstruction/results/<universe>/<output_id>). A recipe authored the natural way —python scripts/run_reconstruction.py, with the script reading cwd-relative paths like../../data/...— fails because there is noscripts/at the project root and the relative data path does not resolve. The scaffold/docs treat a sub-analysis as a self-contained unit (cwd = the sub-analysis dir), but the executor runs every recipe from the project root with nocdinto the analysis_path.Error
Reproduction
analyses/<name>/with its ownastra.yamlandscripts/).command: python -u scripts/foo.py --output {output}.lc run <name>.<output_id>from the project root.../../data/...) fail.The engine renders
{output}root-relative (analyses/<name>/results/...) yet runs from the project root — internally inconsistent with sub-analysis-relative authoring.Suggested resolution: either cd into the path-rooted sub-analysis dir and render
{output}relative to it, or document/scaffold that ALL recipe paths must be project-root-relative.Environment