Skip to content

DM-48896 : Create yaml for ComCam#223

Merged
BrunoSanchez merged 4 commits intomainfrom
tickets/DM-48896
Aug 15, 2025
Merged

DM-48896 : Create yaml for ComCam#223
BrunoSanchez merged 4 commits intomainfrom
tickets/DM-48896

Conversation

@BrunoSanchez
Copy link
Member

@BrunoSanchez BrunoSanchez commented Feb 19, 2025

This has evolved and now it is scoped for replacing all pipeline creation

@BrunoSanchez BrunoSanchez force-pushed the tickets/DM-48896 branch 3 times, most recently from 47989eb to c47b45a Compare May 29, 2025 10:15
.gitignore Outdated

# Dynamically generated source injection pipelines
pipelines/_ingredients/ApPipeWithFakes.yaml
python/*.dist-info/ No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing end-of-line.

SConstruct Outdated
from lsst.sconsUtils import scripts
scripts.BasicSConstruct("ap_pipe", disableCc=True)
from lsst.sconsUtils.state import env
from lsst.sconsUtils import targets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts, targets merged into above.

SConstruct Outdated
)

subset_names = "apPipe,prompt"
subset_description = "Post injection diffim analysis tasks"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't being used right now, but may become irrelevant following a proposed API change in source_injection.

@BrunoSanchez BrunoSanchez force-pushed the tickets/DM-48896 branch 3 times, most recently from d2d6c6f to 379ef9f Compare July 31, 2025 09:11
SConstruct Outdated
[
libraryLoaderEnvironment(),
f"make_injection_pipeline -t preliminary_visit_image -r $SOURCE -f $TARGET "
f"-a {additional_fakes_tasks} -s "+" -s ".join(subset_names),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should -s be used twice here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not, it is rendered correctly, since the .join string method uses the string instance as an intermediate link for the iterable elements. If there is no "first" -s then the .join method doesn't provide it and the command fails.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if subset_names is length zero, this still prints a single -s then? Is that an issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would add an empty string, but since this is a script, and the previous instruction defines subset_names to not be zero, then I assumed it was OK to add it this way. If we need to make it more robust I can change it though we will have to include a command building instruction before this, so we can take all cases into consideration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the hard-coding of subset_names above will always resolve this, but it may read a little confusingly to the casual observer. How about this instead?

" ".join(f"-s {subset_name}" for subset_name in subset_names)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adopted! Thanks

Copy link
Contributor

@leeskelvin leeskelvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question inside the SConstruct, but otherwise LGTM!

@BrunoSanchez BrunoSanchez merged commit a1ecd02 into main Aug 15, 2025
5 checks passed
@BrunoSanchez BrunoSanchez deleted the tickets/DM-48896 branch August 15, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants