-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add proper migration for "Organization" -> "Affiliation" change #276
Comments
ok, the migrate takes dict and returns dict, so we should "manually" code up removal of those extra fields from |
Per @yarikoptic suggestion, generate a basic table that go through all the public dandisets and print the validation statuses of both before and after the |
Diffs of validation before and after migration are available at |
candleindark
added a commit
to candleindark/dandi-archive
that referenced
this issue
Feb 10, 2025
Provide solution to correct the corruption of `Affiliation` JSON objects documented in dandi/dandi-schema#276
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In #266 (comment) @candleindark identified oddity in our metadata records, that Affiliation records include fields which are not part of the Affiliation model, e.g.
https://api.dandiarchive.org/api/dandisets/000029/versions/draft/info/ ATM has
after doing archeological metadata expedition we figured that it is 99% likely due to
released in 0.2.0 version of the library corresponding to schema-0.4.0
where affiliations got their own Affiliation class. But
migrate()
function was not adjusted to filter them out somehow... but here we do not even need explicit migration since pydantic likely to do the right thing:and here is with the full
so the hypothesis that absence of metadata migration on dandi-archive side, ref:
keeps old metadata versions present, and it is so:
which would forbid us to validate using more strict models such as the ones disallowing for extra fields, but also potentially simply having "bugs" due to migration not carried out at all.
On the side of dandi-schema I would like us to check what would happen if we
.migrate()
metadata records for dandisets -- would they succeed/fail and get rid of those irrelevant values.The text was updated successfully, but these errors were encountered: