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-42636: add group and day_obs first-class dimensions #953

Merged
merged 22 commits into from Feb 29, 2024
Merged

Conversation

TallJimbo
Copy link
Member

@TallJimbo TallJimbo commented Jan 30, 2024

Depends on lsst/astro_metadata_translator#71.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: Patch coverage is 90.52632% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 88.52%. Comparing base (b6936e0) to head (58e02cb).

Files Patch % Lines
python/lsst/daf/butler/transfers/_yaml.py 81.52% 11 Missing and 6 partials ⚠️
...ython/lsst/daf/butler/registry/queries/_structs.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #953      +/-   ##
==========================================
- Coverage   88.53%   88.52%   -0.01%     
==========================================
  Files         313      313              
  Lines       40036    40182     +146     
  Branches     8371     8407      +36     
==========================================
+ Hits        35444    35570     +126     
- Misses       3379     3392      +13     
- Partials     1213     1220       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member Author

@TallJimbo TallJimbo left a comment

Choose a reason for hiding this comment

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

Looks great; I especially appreciate the effort to reconstruct the dimension universe changelog.

(I can't hit approve because I created the PR.)

python/lsst/daf/butler/transfers/_yaml.py Outdated Show resolved Hide resolved
python/lsst/daf/butler/dimensions/_records.py Show resolved Hide resolved
doc/lsst.daf.butler/dimensions.rst Outdated Show resolved Hide resolved
@timj timj force-pushed the tickets/DM-42636 branch 6 times, most recently from e415293 to 26df6f2 Compare February 26, 2024 21:06
Copy link
Member Author

@TallJimbo TallJimbo left a comment

Choose a reason for hiding this comment

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

New changes look good! (Approved again in spirit.)

kfindeisen added a commit to lsst-dm/prompt_processing that referenced this pull request Feb 28, 2024
Previously, the only way to reconstruct the history was to run
git blame on dimensions.yaml. lsst/daf_butler#953 will add
human-curated documentation to the Pipelines docs.
kfindeisen added a commit to lsst-dm/prompt_processing that referenced this pull request Feb 28, 2024
Previously, the only way to reconstruct the history was to run
git blame on dimensions.yaml. lsst/daf_butler#953 will add
human-curated documentation to the Pipelines docs.
kfindeisen added a commit to lsst-dm/prompt_processing that referenced this pull request Feb 28, 2024
Previously, the only way to reconstruct the history was to run
git blame on dimensions.yaml. lsst/daf_butler#953 will add
human-curated documentation to the Pipelines docs.
timj and others added 10 commits February 29, 2024 14:43
The offset was meant to be "offset * (n + 1)" not an offset
of n minutes plus one day.
This file was so old it predated the addition of day_obs to the
exposure and visit dimensions, and that was back before we even had a
dimension universe version.  While it's nice to have the YAML import
code migrate simple things, it has no idea where an instrument is and
hence can't handle this one.

Procedure was:

- make an empty SQLite repo

- import the old file

- query for visit dimensions (there are no exposures in this file)

- make new records with day_obs set, by looking at
  visit.timespan.begin and doing some timezone stuff (HSC is in
  Hawaii, which I just hard-coded here)

- re-insert the new visit recods with replace=True

- export all of the dimension elements in butler.dimensions.elements
  with element.has_own_table=True.
This updates the YAML file to have day_obs as a dimension rather than
rely on the import-time migration, which warns.
This ensures we do not try to load exposure before we've loaded
day_obs.
@timj timj merged commit 7c1f99e into main Feb 29, 2024
18 checks passed
@timj timj deleted the tickets/DM-42636 branch February 29, 2024 22:01
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.

None yet

2 participants