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

Commits on Feb 29, 2024

  1. Fix astropy warning with timespan calculation

    The offset was meant to be "offset * (n + 1)" not an offset
    of n minutes plus one day.
    timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    8463586 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9436a4f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5577301 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3d50705 View commit details
    Browse the repository at this point in the history
  5. Update HSC test data to new universe version, add day_obs.

    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.
    TallJimbo authored and timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    5087188 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5cdd6f3 View commit details
    Browse the repository at this point in the history
  7. Make day_obs a first-class dimension.

    TallJimbo authored and timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    6b99675 View commit details
    Browse the repository at this point in the history
  8. Update HSC test data again.

    This updates the YAML file to have day_obs as a dimension rather than
    rely on the import-time migration, which warns.
    TallJimbo authored and timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    350499c View commit details
    Browse the repository at this point in the history
  9. Ensure that for import we insert records in the correct order

    This ensures we do not try to load exposure before we've loaded
    day_obs.
    timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    c65644e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    153f101 View commit details
    Browse the repository at this point in the history
  11. Ensure that derived serialized dimension record name has no underscores

    We want SpecificSerializedDimensionRecordDayObs and not
    SpecificSerializedDimensionRecordDay_obs.
    timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    4d1b36b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e7a6c74 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    140b60c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4806c87 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    91931b5 View commit details
    Browse the repository at this point in the history
  16. Add a change log for the dimension universe

    Only back to version 1.
    timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    e5ca19c View commit details
    Browse the repository at this point in the history
  17. Add a test reading a version 0 export YAML file

    This required that code is added to derive day_obs from the
    datetime_begin field (something which should have been added
    long ago when universe version 1 came out).
    timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    c60899f View commit details
    Browse the repository at this point in the history
  18. Add news fragment

    timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    7d91994 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    300b7fe View commit details
    Browse the repository at this point in the history
  20. Use uv for pip install

    timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    c099812 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    a5baa5a View commit details
    Browse the repository at this point in the history
  22. Remove day_obs_offset from instrument record

    Instead always try to get the offset from the attached
    instrument class's metadata translator.
    timj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    58e02cb View commit details
    Browse the repository at this point in the history