Skip to content

Saving dtypes as metadata for roundtrip consistency#262

Open
yfukai wants to merge 12 commits intoroyerlab:mainfrom
yfukai:from_other_roundtrip
Open

Saving dtypes as metadata for roundtrip consistency#262
yfukai wants to merge 12 commits intoroyerlab:mainfrom
yfukai:from_other_roundtrip

Conversation

@yfukai
Copy link
Contributor

@yfukai yfukai commented Feb 17, 2026

This is a follow-up on the dtype, assuming #260 has been merged.
In this PR, the graphs store the dtypes of the fields as metadata, enabling robust recovery of the original dtypes during round-trip from_other conversions.

@yfukai yfukai marked this pull request as draft February 17, 2026 06:42
@yfukai
Copy link
Contributor Author

yfukai commented Feb 17, 2026

Notes:

  • I should also store the default values. Serializing the polars dataframes is useful to store the values?
  • The roles of AttrSchema overlap with the current metadata. This could be SQLGraph-specific machinery.

@yfukai
Copy link
Contributor Author

yfukai commented Feb 18, 2026

Both tasks are done. I'll review the code for SQLgraph and mark this open for review.

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 81.74274% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.70%. Comparing base (e10d8c3) to head (cc55976).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/tracksdata/graph/_base_graph.py 72.97% 18 Missing and 2 partials ⚠️
src/tracksdata/utils/_dtypes.py 71.83% 11 Missing and 9 partials ⚠️
src/tracksdata/graph/_graph_view.py 66.66% 2 Missing ⚠️
src/tracksdata/graph/_sql_graph.py 98.57% 1 Missing ⚠️
src/tracksdata/nodes/_regionprops.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #262      +/-   ##
==========================================
- Coverage   88.18%   87.70%   -0.48%     
==========================================
  Files          56       56              
  Lines        4308     4531     +223     
  Branches      749      781      +32     
==========================================
+ Hits         3799     3974     +175     
- Misses        319      356      +37     
- Partials      190      201      +11     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Comments