Closed hyanwong closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.04%. Comparing base (
1d45c0c
) to head (0273cf8
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I would rather we just skipped this and used the permissive json schema instead. Keeping schemas up to date is more trouble than it's worth.
Happy to use permissive_json, but don't we still want to warn if we are stomping on existing data. Having a defined schema is a nice way to do that.
Also, it's useful in tsdate because we are using short, non-intuitive names ("mn" and "vr") for the posterior means and variances, so documenting them is pretty useful IMO.
Sure, whatever is the shortest path here. Note that the schema is only one thing - if you want to truly check that you're not clobbering then you'd have to check the actual metadata items on the way in, because the existing schema may not declare all the fields.
Thanks. I think we should allow clobbering, but only if it's clear that the field was originally put in by tsinfer anyway. Checking the description is a reasonable way to do that (but actually, we should check the whole definition field, so I'll adjust this PR.). I think we warn when clobbering if the definition matches, but error out if the definition does not match.
I'm happy with throwing a warning in this case.
Great. Just made a minor change. Ready to review and hopefully merge @benjeffery ?
Fixes #929