-
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
issue with download #557
Comments
It appears that the asset metadata on the server was changed to store the asset ID in an |
Eh, too many ids ;) I think this one has nothing to do with |
@yarikoptic That patch is doing entirely the wrong thing. The root of the problem in this issue is that the asset structures returned by |
do you see a straightforward way to support both and add a test for both end points? |
@yarikoptic My preferred solution would be for the API to make its return values consistent (e.g., by making |
I've changed the title because it looks like it's indeed different than #550. But I believe it shows my point I was making about the tests -- the |
that would be unnecessarily expensive since the idea IIRC was to not return metadata in the listing, and return metadata only for for individual asset endpoint. And since the URL in the original issue description is the one which users would copy-paste from the browser, we better support it in the dandi-cli. But I am not sure why it has anything to do with what API returns @jwodder? we should use those urls only to parse them up to identify the dandiset and possibly assets (i.e. a singular asset for such a URL) to download. Then based on that parsed information we compose the download urls (possibly reconstructing the original url in this case). So it seems that we just do not correctly identify that it is a URL for a singular asset (and not a path with multiple assets) |
well -- we (tried to?;-)) decoupled the 1. parsing of url, 2. operation on what was parsed, so we do not need to test full combinatorial combination of parse + operation. parsing has its own tests and operations are tested on some set of URLs. In this particular case (didn't check though) I think parsing is buggy and missing test for this usecase. |
@yarikoptic - decoupling is great, but I would still vote for adding any tests for |
@yarikoptic I can change the code to get the asset ID directly from the URL when present, but the difference in return structures from |
Fix & test for downloading by asset ID URL
I'm not able to reopen an issue so opening a new one
@yarikoptic - I followed your instruction, clicking copy-paste etc, and I succeeded to get the url, but I have the same error as in #550:
edit
It's the same error, but it's different than #550
The text was updated successfully, but these errors were encountered: