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-26953: Update ap_verify system for calibration collections #19

Merged
merged 1 commit into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/export.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,18 @@ data:
host: null
timespan_begin: null
timespan_end: null
- type: collection
collection_type: RUN
name: skymaps
host: null
timespan_begin: null
timespan_end: null
- type: collection
collection_type: RUN
name: templates/deep
host: null
timespan_begin: null
timespan_end: null
- type: dataset_type
name: camera
dimensions:
Expand Down
4 changes: 2 additions & 2 deletions preloaded/gen3.sqlite3
Git LFS file not shown
9 changes: 9 additions & 0 deletions scripts/add_gen3_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ def main():
_migrate_gen2_to_gen3(dataset, gen2_repo, gen2_calibs, gen3_repo, mode="copy",
config_file="convertRepo_copied.py")

# ap_verify assumes specific collections are present
log.info("Adding unpopulated collections...")
butler = daf_butler.Butler(gen3_repo, writeable=True)
butler.registry.registerCollection("skymaps", daf_butler.CollectionType.RUN)
butler.registry.registerCollection("templates/deep", daf_butler.CollectionType.RUN)

log.info("Exporting Gen 3 registry to configure new repos...")
_export_for_copy(dataset, gen3_repo)

Expand Down Expand Up @@ -123,6 +129,9 @@ def _export_for_copy(dataset, repo):
# before ingest.
for collection in butler.registry.queryCollections(..., collectionTypes={daf_butler.CollectionType.CALIBRATION}):
contents.saveCollection(collection)
# Export empty template collections
contents.saveCollection("skymaps")
contents.saveCollection("templates/deep")


if __name__ == "__main__":
Expand Down