Build expected metadata with the server's DANDI schema version - #1894
Merged
yarikoptic merged 1 commit intoJul 28, 2026
Conversation
`test_update_dandiset_from_doi` builds the expected metadata with the `DANDI_SCHEMA_VERSION` of the client's `dandischema`, while the value in the metadata under test is the server's. The test therefore incidentally requires dandi-cli and the dandi-archive instance to carry the same `DANDI_SCHEMA_VERSION`. Retrieve it from the server's `/info/` instead. Co-Authored-By: Claude Code 2.1.220 / Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1894 +/- ##
==========================================
- Coverage 76.96% 76.94% -0.02%
==========================================
Files 88 88
Lines 12882 12882
==========================================
- Hits 9914 9912 -2
- Misses 2968 2970 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Open
8 tasks
yarikoptic
approved these changes
Jul 28, 2026
yarikoptic
left a comment
Member
There was a problem hiding this comment.
hm, I think it does make more sense this way! Nice find! Most likely we had this test created BEFORE we exposed version of the schema used by the server. So let's proceed this way indeed.
|
🚀 PR was released in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
test_update_dandiset_from_doifills theschemaVersionand@contextof its expected metadata from theDANDI_SCHEMA_VERSIONof the client'sdandischema, but in the served metadata under test both carry the server's. While dandi-cli and the dandi-archive instance are built against the samedandischemathe two coincide and the test passes; once they differ, every parametrization fails on those two fields even when the DOI-derived metadata the test exists to check is correct. The test thus asserts something it was never meant to: that both sides run the sameDANDI_SCHEMA_VERSION.Fix
Build those two fields from the schema version reported by the server's
/info/, as the test already does for the other instance-dependent fields (url,repository,manifestLocation).Where this surfaced
dandi/dandi-schema#419 bumps
DANDI_SCHEMA_VERSIONto0.8.0. In that repo'stest-dandi-climatrix, theschema_install: serverjob installs the branch into the API image only, leaving a released client against a0.8.0server. All five parametrizations then fail, while the other 1001 tests in the job pass:Test plan
dandischema; that is verified by re-running theserverjob of Consolidate Asset/Dandiset models; gate publish validation on datePublished dandi-schema#419 once this is merged.