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-41326: remove DimensionGraph and related interfaces #1036

Merged
merged 4 commits into from
Jul 25, 2024

Conversation

TallJimbo
Copy link
Member

@TallJimbo TallJimbo commented Jul 10, 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

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 83.76623% with 25 lines in your changes missing coverage. Please review.

Project coverage is 89.55%. Comparing base (fd5547a) to head (73ae713).

Files Patch % Lines
python/lsst/daf/butler/dimensions/_coordinate.py 76.74% 7 Missing and 3 partials ⚠️
python/lsst/daf/butler/_dataset_type.py 66.66% 2 Missing and 1 partial ⚠️
...daf/butler/dimensions/_data_coordinate_iterable.py 71.42% 2 Missing ⚠️
...on/lsst/daf/butler/direct_butler/_direct_butler.py 60.00% 1 Missing and 1 partial ⚠️
python/lsst/daf/butler/dimensions/_group.py 75.00% 0 Missing and 1 partial ⚠️
python/lsst/daf/butler/dimensions/_packer.py 75.00% 1 Missing ⚠️
python/lsst/daf/butler/dimensions/_records.py 0.00% 1 Missing ⚠️
...hon/lsst/daf/butler/direct_query_driver/_driver.py 66.66% 0 Missing and 1 partial ⚠️
...ython/lsst/daf/butler/registry/obscore/_records.py 0.00% 1 Missing ⚠️
...ython/lsst/daf/butler/registry/queries/_results.py 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1036      +/-   ##
==========================================
+ Coverage   89.37%   89.55%   +0.18%     
==========================================
  Files         359      358       -1     
  Lines       45583    45277     -306     
  Branches     9378     9276     -102     
==========================================
- Hits        40738    40548     -190     
+ Misses       3539     3433     -106     
+ Partials     1306     1296      -10     

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

@TallJimbo TallJimbo force-pushed the tickets/DM-41326 branch 2 times, most recently from 53f1611 to 8a99594 Compare July 18, 2024 13:57
Copy link
Member

@timj timj 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. Impressive amount of cleanup work.

doc/changes/DM-41326.removal.md Outdated Show resolved Hide resolved
@@ -748,8 +742,6 @@ def from_simple(
match simple.dimensions:
Copy link
Member

Choose a reason for hiding this comment

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

Seems like match is now overkill if this is now doing:

if simple.dimensions is None:
    raise(...)
dimensions = universe.conform(simple.dimensions)

@@ -109,8 +109,6 @@ def direct(
match dimensions:
Copy link
Member

Choose a reason for hiding this comment

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

serialized_dimensions = dimensions if dimensions else None

? Or are you worried that the type really might not be correct?

I think the type annotation for this method needs to remove the dict now.

@@ -59,7 +59,7 @@ class SerializedDatasetType(BaseModel):

name: StrictStr
storageClass: StrictStr | None = None
dimensions: SerializedDimensionGraph | list[StrictStr] | None = None
dimensions: list[StrictStr] | None = None
Copy link
Member

Choose a reason for hiding this comment

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

I see that this leads to any SerializedDatasetType JSON we have lying around being incompatible if it had the graph in it. People shouldn't have that anywhere (not even in older graphs?) but it probably means that we need to ensure the butler server deployments are updated so they don't send back the wrong form of SerializedDatasetType.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's right, but we've been writing this with list for a while now, so butler server should be fine, and I figured any graphs old enough to suffer from this would probably be impossible to read already due to other incompatibilities (though I don't think I can prove that in general).

@timj
Copy link
Member

timj commented Jul 18, 2024

I see there is a failure:

FAILED tests/test_packages.py::PackagesFormatterTestCase::testPackages - TypeError: expected string or bytes-like object, got 'NoneType'

which is great because Fabio reported that failure this morning when building the new weekly. This means there is a chance it can be debugged more easily.

@TallJimbo TallJimbo force-pushed the tickets/DM-41326 branch 2 times, most recently from e36c185 to 43d8e5f Compare July 23, 2024 17:57
@TallJimbo TallJimbo merged commit cdbbd14 into main Jul 25, 2024
17 of 18 checks passed
@TallJimbo TallJimbo deleted the tickets/DM-41326 branch July 25, 2024 14:51
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.

2 participants