-
Notifications
You must be signed in to change notification settings - Fork 13
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-30439: Refactor DataCoordinate #769
base: main
Are you sure you want to change the base?
Commits on Jan 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a2496b4 - Browse repository at this point
Copy the full SHA a2496b4View commit details -
Fix Protocol inheritance ordering.
In all of the PEP-544 examples, Protocols appear last, and the original order confuses pylance.
Configuration menu - View commit details
-
Copy full SHA for aa3b4c7 - Browse repository at this point
Copy the full SHA aa3b4c7View commit details -
Move DataCoordinate container classes to new modules.
This starts a new _containers subpackage that will be extended to include other butler primitives, like DimensionRecords and DatasetRefs.
Configuration menu - View commit details
-
Copy full SHA for 5e08d90 - Browse repository at this point
Copy the full SHA 5e08d90View commit details -
Rework DataCoordinate custom containers.
This renames some existing classes, so it is a breaking API change, but one whose effects should be minimal to nonexistent outside daf_butler. Overall it aligns the hierarchy better with the built-in typing hierarchy, injecting some interfaces that had implementations but no ABCs, and it cleans up the handling of mutability by separating frozenset from set views.
Configuration menu - View commit details
-
Copy full SHA for f348319 - Browse repository at this point
Copy the full SHA f348319View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfcbd04 - Browse repository at this point
Copy the full SHA bfcbd04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 751731a - Browse repository at this point
Copy the full SHA 751731aView commit details -
Configuration menu - View commit details
-
Copy full SHA for eb8ab29 - Browse repository at this point
Copy the full SHA eb8ab29View commit details -
Stop trying to cache DimensionRecord lookup failures.
We've historically treated DimensionRecord lookup failures as a non-error (we just don't return records we didn't find), at least mostly because we allow implied dimension dependencies to be None (e.g. an exposure need not have a physical_filter). But that's actually broken because of DM-21840, and I now think the right solution there is to just make those foreign keys NOT NULL after all. That's a long way of saying that I think we could _probably_ start treating DimensionRecord lookup failures as errors, and simplify a lot of code in the process (though a lot of test would break). I'm not confident enough to try that now and I don't want to deal with fixing the tests, but I am confident enough to say that lookup failures are so rare that we *can* simplify by not caching them, and that's what this commit does. This is relevant because I'm about to reimplement the caching entirely in terms of the new DimensionRecord containers, and I don't want those to have to worry about caching failed lookups. But I wanted to make the (slight) behavioral change a separate commit (this one) from the refactoring one.
Configuration menu - View commit details
-
Copy full SHA for fa5c728 - Browse repository at this point
Copy the full SHA fa5c728View commit details -
Configuration menu - View commit details
-
Copy full SHA for f125bac - Browse repository at this point
Copy the full SHA f125bacView commit details -
Require more consistency in DimensionRecordStorage.fetch.
This is now being used as a callback in the new cache object, and for consistent error-handling there we need these to behave more consistently.
Configuration menu - View commit details
-
Copy full SHA for 60ffbe7 - Browse repository at this point
Copy the full SHA 60ffbe7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e9748f - Browse repository at this point
Copy the full SHA 4e9748fView commit details -
Stop testing behavior that DataCoordinate doesn't advertise.
This was a test for some cleverness that avoids a copy, but I'm not sure all of that cleverness is really worth its weight, and I don't think we should be testing something the user is not supposed to care about.
Configuration menu - View commit details
-
Copy full SHA for decbdc9 - Browse repository at this point
Copy the full SHA decbdc9View commit details -
Move data ID expansion implementation to DataCoordinate.
This adds a new method to Registry and SqlRegistry without a RemoteRegistry implementation, and that's why it isn't decorated with abstractmethod yet. I'll fix that after I make the DimensionRecord containers serializable. This also adds a check to DataCoordinate.standardize that any passed keys are actually dimension names; this addresses a long-standing problem where users would get a keyword argument to some higher-level API wrong, and it would be forwarded as **kwargs down to DataCoordinate.standardize and then silently ignored. And it turns out we were doing that even in our own test utility code!
Configuration menu - View commit details
-
Copy full SHA for 20ae036 - Browse repository at this point
Copy the full SHA 20ae036View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66c40c0 - Browse repository at this point
Copy the full SHA 66c40c0View commit details -
Add logic to recognize non-standard keys in DataCoordinate.
This reimplements some of the special handling of non-standard keys from Butler._findDatasetRef in the hopes of being able to move it all down to Registry (and thus work on many more interfaces). But it's just a start at that; I realized while trying to make Butler._findDatasetRef use the new code that we really need to make queryDatasets work on CALIBRATION collections first. But I think what I've done so far will still be useful eventually, so I'm keeping it.
Configuration menu - View commit details
-
Copy full SHA for 4f55339 - Browse repository at this point
Copy the full SHA 4f55339View commit details