-
Notifications
You must be signed in to change notification settings - Fork 25
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
get_dandisets: Expose options (embargoed, empty, draft) of the /dandisets/ endpoint #1413
Comments
@jjnesbitt @mvandenburgh The "draft" and "user" query parameters to @yarikoptic Should the names of the arguments to the |
I am ok with your judgement on this matter: it seems we would be inconsistent either way. Ideally here or in dandi/dandi-archive#1228 (comment) we arrive at the target -- e.g. I propose: let's make it order vs ordering is pretty much "equal match" within dandi-archive but in dandi-cli we have only (and many of) `order`❯ git grep -p '\<order\> *[:=]'
dandiapi/api/views/asset.py=class AssetFilter(filters.FilterSet):
dandiapi/api/views/asset.py: order = filters.OrderingFilter(fields=['created', 'modified', 'path'])
dandiapi/api/views/version.py=class VersionFilter(filters.FilterSet):
dandiapi/api/views/version.py: order = filters.OrderingFilter(fields=['created'])
web/src/rest.ts=const dandiRest = {
web/src/rest.ts: const versions = await this.versions(identifier, { page_size: 1, order: '-created' });
❯ git grep -p '\<ordering\> *[:=]'
dandiapi/api/admin.py=class UserAdmin(BaseUserAdmin):
dandiapi/api/admin.py: @admin.display(ordering='metadata__status')
dandiapi/api/models/dandiset.py=class Dandiset(TimeStampedModel):
dandiapi/api/models/dandiset.py: ordering = ['id']
dandiapi/api/views/dandiset.py=class DandisetFilterBackend(filters.OrderingFilter):
dandiapi/api/views/dandiset.py: ordering = orderings[0]
web/src/components/DandisetsPage.vue=export default defineComponent({
web/src/components/DandisetsPage.vue: const ordering = ((sortDir.value === -1) ? '-' : '') + sortField.value;
web/src/views/DandisetLandingView/DandisetLandingView.vue=async function fetchNextPage() {
web/src/views/DandisetLandingView/DandisetLandingView.vue: const ordering = ((sortDir === -1) ? '-' : '') + sortField;
❯ cd ../dandi-cli-master
CHANGELOG.md LICENSE README.md build/ coverage.xml dandi.egg-info/ docs/ pyproject.toml setup.py* tox.ini versioneer.py
DEVELOPMENT.md MANIFEST.in __pycache__/ codeql.yml dandi/ dist/ lgtm.yml setup.cfg tools/ venvs/
❯ git grep -p '\<ordering\> *[:=]'
❯ git grep -p '\<order\> *[:=]'
dandi/dandiapi.py=class RemoteDandiset:
dandi/dandiapi.py: def get_versions(self, order: str | None = None) -> Iterator[Version]:
dandi/dandiapi.py: for v in self.get_versions(order="-created"):
dandi/dandiapi.py: def get_assets(self, order: str | None = None) -> Iterator[RemoteAsset]:
dandi/dandiapi.py: self, path: str, order: str | None = None
dandi/dandiapi.py: self, pattern: str, order: str | None = None
dandi/dandiarchive.py=class ParsedDandiURL(ABC):
dandi/dandiarchive.py: self, client: DandiAPIClient, order: str | None = None, strict: bool = False
dandi/dandiarchive.py=class DandisetURL(ParsedDandiURL):
dandi/dandiarchive.py: self, client: DandiAPIClient, order: str | None = None, strict: bool = False
... many more ... Ideally in dandi-archive we deprecate WDYT @dandi/archive-maintainers ? |
Thanks for pointing this out @jwodder, I made a PR on dandi-archive to improve the Swagger descriptions for this endpoint - #1875.
You are correct about
I agree we should make these consistent. |
Add arguments for API query parameters when fetching all Dandisets; support creating embargoed Dandisets
🚀 Issue was released in |
I thought that as long as I authenticate I would also get embargoed datasets listed, as I believe is done in web UI. But I found no Embargoed dandisets in returned list. Looking at our
get_dandisets
- apparently we do not expose any of the query parametersfor
Immediate need is to get
embargoed
dandisets. I generally would not mind even adding "search" parameter.The text was updated successfully, but these errors were encountered: