-
Notifications
You must be signed in to change notification settings - Fork 28
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 arguments for API query parameters when fetching all Dandisets; support creating embargoed Dandisets #1414
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1414 +/- ##
==========================================
+ Coverage 88.58% 88.61% +0.02%
==========================================
Files 77 77
Lines 10499 10527 +28
==========================================
+ Hits 9301 9328 +27
- Misses 1198 1199 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a test or two.
ATM we do not really test/deal much with embargoed dandisets seems to me, primarily since we do not even expose embargo
option:
dandi/dandiapi.py: def create_dandiset(self, name: str, metadata: dict[str, Any]) -> RemoteDandiset:
So let's as part of this PR expose that option, create also embargoed dandiset and test listing here for a set of query parameters to see that they map correctly to the API call (as you mentioned -- requests would simply ignore if we do not change them from None
)
What exactly should be tested? Should there just be a test for each Note that there can't be a test that checks the entirety of the |
I didn't realize that -- I thought that we just have a fixture to populate a number of dandisets and then test on them.
I think testing for that would suffice. Fixture could ensure to populate at least one dandiset to satisfy each criteria, then (with the light of above) - we could test that there is at least one dandiset satisfying the desired criteria. |
Thank you! |
🚀 PR was released in |
Closes #1413.