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-41114: Add dimension record containers #911

Closed
wants to merge 9 commits into from
Closed

Conversation

TallJimbo
Copy link
Member

Checklist

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

@timj
Copy link
Member

timj commented Nov 27, 2023

Somehow pydantic 1.10 is being installed.

Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 65 lines in your changes are missing coverage. Please review.

Comparison is base (ee20ead) 87.82% compared to head (1dd8413) 87.90%.

Files Patch % Lines
...sst/daf/butler/timespan_database_representation.py 88.81% 9 Missing and 8 partials ⚠️
python/lsst/daf/butler/column_spec.py 89.89% 9 Missing and 1 partial ⚠️
python/lsst/daf/butler/dimensions/_config.py 56.52% 8 Missing and 2 partials ⚠️
python/lsst/daf/butler/dimensions/_schema.py 90.14% 5 Missing and 2 partials ⚠️
python/lsst/daf/butler/dimensions/_record_table.py 91.17% 4 Missing and 2 partials ⚠️
python/lsst/daf/butler/dimensions/_elements.py 90.47% 3 Missing and 1 partial ⚠️
python/lsst/daf/butler/_compat.py 0.00% 3 Missing ⚠️
python/lsst/daf/butler/dimensions/_database.py 90.00% 2 Missing ⚠️
python/lsst/daf/butler/dimensions/_governor.py 88.23% 2 Missing ⚠️
python/lsst/daf/butler/dimensions/_record_set.py 99.03% 0 Missing and 1 partial ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #911      +/-   ##
==========================================
+ Coverage   87.82%   87.90%   +0.08%     
==========================================
  Files         295      301       +6     
  Lines       38379    39173     +794     
  Branches     8115     8279     +164     
==========================================
+ Hits        33707    34436     +729     
- Misses       3476     3534      +58     
- Partials     1196     1203       +7     

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

When we convert the dimensions.yaml config into a DimensionUniverse,
we've been converting the rather limited set of types supported in the
configuration into just a few of the very specific types used by
SQLAlchemy (in the ddl.FieldSpec objects), and that makes it hard to
write a mapping from the Python form of that information to some other
schema system (like Pydantic or Arrow).

The new ColumnSpce objects map more directly to what's in the config
(they're Pydantic models; this is one tiny step towards making
dimensions.yaml Pydantic-validated), and while right now they live
alongside the ddl objects everywhere, eventually I'd like to replace
the ddl stuff entirely with direct usage of SQLAlchemy Table and
Column objects.  Fully removing the ddl stuff will require an RFC as
well, since they leak into the public interface a bit via
RecordClass.fields.
It should be safe to revert this commit once we require Pydantic v2.
@TallJimbo
Copy link
Member Author

Closing this draft in favor of #928 .

@TallJimbo TallJimbo closed this Dec 17, 2023
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