Skip to content

Root output re-export (from: sub.output) cannot be used as another root output's input #215

Description

@rpaviot

What happened

In the root astra.yaml, a root output that re-exports a sub-analysis output (from: ia_fits.nla_multipoles)
was declared as an input of another root output with its own recipe (a paper figure using
{inputs.nla_multipoles}). astra validate accepts the spec, but lc run fails while generating the
Snakefile because the re-export is not resolved as a declared input of the consuming output. Moving the
figure/table outputs into a sub-analysis (analyses/paper/, inputs from: ../ia_fits.<id>) and
re-exporting them from the root works, so it seems specific to root-level outputs consuming root-level
re-exports.

Error

File ".../lightcone/cli/commands.py", line 597, in run
    snakefile_path, cfg_path = generate(
File ".../lightcone/engine/snakefile.py", line 421, in generate
    rendered = render_recipe(
File ".../lightcone/engine/snakefile.py", line 104, in render_recipe
    raise KeyError(
KeyError: "Recipe placeholder '{inputs.nla_multipoles}' references an input not declared on this Output"

Reproduction

Root astra.yaml:

outputs:
  - id: nla_multipoles
    from: ia_fits.nla_multipoles
  - id: fig3
    inputs: [nla_multipoles]
    recipe:
      command: python src/plot.py --fits-dir {inputs.nla_multipoles} --out {output}

astra validate astra.yaml -> Validation successful; lc run fig3 -> KeyError above.

Environment

  • ASTRA: 0.2.11
  • lightcone-cli: 0.4.2
  • Python: 3.12.8
  • OS: Linux 4.18 (RHEL 8, SLURM cluster, container runtime: none)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions