Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-48325: Add cp_verify report to ci_cpp #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions DATA/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ def getVerifyCmdLegacy(stage, expList, pipelineFile, legacyDate="202409"):

return getExecutableCmd("ctrl_mpexec", "pipetask", *args)

# An array to store which collections should be used to make the
# report.
reportCollections = []

# Begin ci_cpp build commands.
# Create the butler, register the instrument, and add calibs.
butler = env.Command([File(os.path.join(REPO_ROOT, "gen3.sqlite3")),
Expand Down Expand Up @@ -470,6 +474,7 @@ if LEGACY_MODE == 0:
getVerifyCmd("linearizer", exposureDict["ptcExposurePairs"], "verifyLinearizer.yaml"),
],
)
reportCollections.append("ci_cpv_linearizer")
env.Alias("linearizer", linearizer)

# Create a ptc and certify/verify.
Expand All @@ -486,6 +491,7 @@ if LEGACY_MODE == 0:
getVerifyCmd("ptc", [exposureDict["ptcExposurePairs"][0]], "verifyPtc.yaml"),
],
)
reportCollections.append("ci_cpv_ptc")
env.Alias("ptc", ptc)

# Create a cti and certify.
Expand Down Expand Up @@ -542,6 +548,7 @@ if LEGACY_MODE == 0:
getVerifyCmd("bias", exposureDict["biasExposures"], "verifyBias.yaml"),
],
)
reportCollections.append("ci_cpv_bias")
env.Alias("bias", bias)

# Create a dark and certify/verify.
Expand All @@ -558,6 +565,7 @@ if LEGACY_MODE == 0:
getVerifyCmd("dark", exposureDict["darkExposures"], "verifyDark.yaml"),
],
)
reportCollections.append("ci_cpv_dark")
env.Alias("dark", dark)

# Create a flat and certify/verify.
Expand All @@ -574,6 +582,7 @@ if LEGACY_MODE == 0:
getVerifyCmd("flat", exposureDict["flatExposures"], "verifyFlat.yaml"),
],
)
reportCollections.append("ci_cpv_flat")
env.Alias("flat", flat)

# Create SpectroFlat
Expand All @@ -598,6 +607,7 @@ if LEGACY_MODE == 0:
getVerifyCmd("defects", exposureDict["scienceExposures"], "verifyDefects.yaml"),
],
)
reportCollections.append("ci_cpv_defects")
env.Alias("defectsVerify", defectsVerify)

# Run a science exposure.
Expand Down Expand Up @@ -625,6 +635,22 @@ if LEGACY_MODE == 0:
)
env.Alias("sky", sky)

# Create the report.
report = env.Command(
[
os.path.join(REPO_ROOT, "report"),
],
[defectsVerify],
[
getExecutableCmd("cp_verify", "cpv_report.py",
"-r", REPO_ROOT,
"-O", os.path.join(REPO_ROOT, "report"),
*[f"-c {collection}" for collection in reportCollections],
)
],
)
env.Alias("report", report)

# Set up test dependencies.
env.Depends(utils.targets["tests"], os.path.join(REPO_ROOT, "LATISS", "calib"))
env.Depends(utils.targets["tests"], os.path.join(REPO_ROOT, "LATISS", "raw"))
Expand All @@ -643,6 +669,7 @@ if LEGACY_MODE == 0:
env.Depends(utils.targets["tests"], os.path.join(REPO_ROOT, "ci_cpp_science"))
env.Depends(utils.targets["tests"], os.path.join(REPO_ROOT, "ci_cpp_sky"))
env.Depends(utils.targets["tests"], os.path.join(REPO_ROOT, "ci_cpv_defects"))
env.Depends(utils.targets["tests"], os.path.join(REPO_ROOT, "report"))

# Set up things to clean.
targets = [
Expand All @@ -661,6 +688,7 @@ if LEGACY_MODE == 0:
science,
sky,
defectsVerify,
report,
]
env.Clean(targets, [y for x in targets for y in x] +
[os.path.join(REPO_ROOT, "calib"), os.path.join(REPO_ROOT, "LATISS")])
Expand Down
Loading