Skip to content

scripts: inject_dataset.py --programs selects the source root's files by program - #661

Merged
rusholme merged 1 commit into
rebuildfrom
scripts/inject-programs
Dec 1, 2026
Merged

rusholme merged 1 commit into
rebuildfrom
scripts/inject-programs

Conversation

@jjencson91

Copy link
Copy Markdown
Contributor

Change: scripts/inject_dataset.py takes --programs (comma-separated program numbers, or all, the default) and passes it to the loop's Selection.parse, whose admits_stem already filters on the stem's program. The dry-run summary already prints the selection's programs. One test: a listing of program 342 and 1049 stems with --programs 342 keeps only the six 342 files.

Reason: flight/ holds 1049's files and other programs' in the same filters as 1062. In catalog mode, a selected file without a catalog source on it is copied byte for byte under <dest>l2/, so the other programs' files would land in flight-1062-inj1 and could not be cleaned out afterwards (Azalee, staging the run). --pointings cannot stand in: a pointing is (visit, exposure), which programs can share.

Docs: Caltech-IPAC/rapid_docs#245 (the flight-1062-inj1 command with --programs 1062). Please merge that first.

Testing: tests/unit/test_inject_dataset.py 12/12 locally; the new test fails without the change.

🤖 Generated with Claude Code

… by program, so flight/'s other programs are not copied into an injected dataset

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rusholme
rusholme merged commit 8351e48 into rebuild Dec 1, 2026
5 checks passed
@rusholme
rusholme deleted the scripts/inject-programs branch December 1, 2026 01:49
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