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

Add functions for validating metadata against JSON Schema and use in tests #338

Merged
merged 3 commits into from
Jan 23, 2021

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Jan 22, 2021

Closes #332.

@jwodder jwodder added the patch Increment the patch version when merged label Jan 22, 2021
@jwodder jwodder requested review from yarikoptic and satra January 22, 2021 19:17
@codecov
Copy link

codecov bot commented Jan 22, 2021

Codecov Report

Merging #338 (603391e) into master (fe3b74e) will increase coverage by 0.31%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #338      +/-   ##
==========================================
+ Coverage   82.37%   82.68%   +0.31%     
==========================================
  Files          55       55              
  Lines        5105     5157      +52     
==========================================
+ Hits         4205     4264      +59     
+ Misses        900      893       -7     
Flag Coverage Δ
unittests 82.68% <100.00%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
dandi/tests/test_validate.py 100.00% <ø> (ø)
dandi/metadata.py 79.48% <100.00%> (+4.72%) ⬆️
dandi/models.py 82.41% <100.00%> (+0.06%) ⬆️
dandi/tests/test_metadata.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe3b74e...603391e. Read the comment docs.

Copy link
Member

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. If I get it right, I think we might need to get back to license to become a list in a conversion code when we try to migrate existing dandiset.yaml s .

@satra -- ok with changes to the model (that TempOptional etc)?

@satra
Copy link
Member

satra commented Jan 22, 2021

we are still using unvalidated in the tests. is that still intended?

just a note that all the tempoptionals are readonly in the sense we expect these to be set on the server side. but perhaps we should insert them in the test data.

@yarikoptic
Copy link
Member

hm, indeed... but may be one step at a time, i.e. get this merged/used and then "re-introduce" them when server is populating them or does it already?

@satra
Copy link
Member

satra commented Jan 22, 2021

i leave it to you.

@yarikoptic yarikoptic merged commit 3749836 into master Jan 23, 2021
@yarikoptic yarikoptic deleted the gh-332 branch January 23, 2021 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add testing that a prototypical dandiset metadata validates using converted to json schema
3 participants