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-44147: Allow alternate dimensions in file template #1009

Merged
merged 5 commits into from
May 2, 2024
Merged

Conversation

timj
Copy link
Member

@timj timj commented May 1, 2024

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes
  • (if changing dimensions.yaml) make a copy of dimensions.yaml in configs/old_dimensions

@timj timj requested a review from TallJimbo May 1, 2024 19:51
Copy link

codecov bot commented May 1, 2024

Codecov Report

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

Project coverage is 89.06%. Comparing base (63962e0) to head (9c7a358).

Files Patch % Lines
python/lsst/daf/butler/datastore/file_templates.py 95.34% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1009   +/-   ##
=======================================
  Coverage   89.06%   89.06%           
=======================================
  Files         347      347           
  Lines       44553    44574   +21     
  Branches     9159     9164    +5     
=======================================
+ Hits        39680    39701   +21     
  Misses       3551     3551           
  Partials     1322     1322           

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

timj added 5 commits May 1, 2024 17:30
This is mainly to allow day_obs/group to be used directly in
templates with newer dimension universes whilst also supporting
older universes.

Now you can say '{exposure|group}' and only use group in the
template if there is no exposure in the dataId. Similarly for
day_obs you can say '{day_obs|visit.day_obs|exposure.day_obs}'
and pick the first relevant one. The alternates can be removed
when we are sure no older universe registries exist.
{exposure.obs_id}_{group} -> {exposure.obs_id|group}
{visit.day_obs}/{exposure.day_obs} -> {day_obs|visit.day_obs|exposure.day_obs}
This required a minor reorganization since TypedDict mandates
literal string fields.
@timj timj merged commit 5008a79 into main May 2, 2024
18 checks passed
@timj timj deleted the tickets/DM-44147 branch May 2, 2024 04:46
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