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

change in "Show Contents of a Dataverse" endpoint of Native API #5500

Closed
felliott opened this issue Jan 30, 2019 · 11 comments
Closed

change in "Show Contents of a Dataverse" endpoint of Native API #5500

felliott opened this issue Jan 30, 2019 · 11 comments

Comments

@felliott
Copy link

felliott commented Jan 30, 2019

Hello!

This is a crosspost of IQSS/dataverse-client-python#50 since I don't know if this was an intentional change or not. The python library expects that the objects returned from this endpoint will have protocol, authority, and identifier properties. Recently the OSF has started seeing errors due to receiving objects like the following:

{u'id': 1781, u'title': u'Carl Klarner Dataverse', u'type': u'dataverse'}

Does the library need to be updated to accommodate these, or is this a regression in the API? Thank you very much!

Cheers,
@felliott

@pdurbin
Copy link
Member

pdurbin commented Feb 1, 2019

@felliott hi! I sure hope we didn't introduce a backward compatible change. Can you please test against the following installations of Dataverse?

@landreev
Copy link
Contributor

landreev commented Feb 1, 2019

This is intentional, and I'm pretty sure this has always been the behavior of the API.
The API lists "all the DvObjects" in a dataverse; where a DvObject can be either a dataset, or another dataverse.
Dataset entries (type="dataset") will have the protocol, authority and identifier attributes. Sub-dataverses (type="dataverse") will not have these attributes, because dataverses don't have global identifiers. (but they will have the "title" attribute)
The type value unambiguously identifies which format to expect.

@felliott
Copy link
Author

felliott commented Feb 2, 2019

@pdurbin, our logs show one error against the Harvard DV and one against demo. We have others that are working fine, so maybe it has something to do with the content of the particular dataverse they're trying to connect to? @landreev's comment makes me think that maybe we just haven't encountered the dataverse-within-a-dataverse case yet, especially since the code in the library returns once the dataset is found. That would mean that this would only be triggered if a Dataverse DvObject was encountered before a Dataset DvObject.

@landreev, are the possible types for DvObjects documented anywhere? I searched the NativeAPI docs for DvObject but didn't find anything.

Cheers,
@felliott

@landreev
Copy link
Contributor

landreev commented Feb 2, 2019

@felliott (and everybody):
I was already thinking that we should definitely include some examples of the output, of this and other similar API methods in that guide; I mentioned it to other people here earlier.
The whole idea of a DvObject - that it can be either a Dataverse, or a Dataset or a Datafile; and that dataverses can contain both datasets and other dataverses... but not datafiles - which can only occur in datasets - these are all pretty core ideas behind our application... so we may have never thought of explaining it in the API guide all that clearly. (although it may be explained in other guides).

We should definitely take a good look at the API guide, now that more people who are not necessarily part of the immediate Dataverse community are using it; and make sure things like that are more clear.
(but including more examples showing the expected format of the output should by itself help a lot)

@pdurbin
Copy link
Member

pdurbin commented Feb 27, 2019

Pull request IQSS/dataverse-client-python#51 was just made by @pattisdr from @CenterForOpenScience so I'm dragging this issue to code review at https://waffle.io/IQSS/dataverse

@pdurbin pdurbin changed the title [x-post] change in "Show Contents of a Dataverse" endpoint of Native API change in "Show Contents of a Dataverse" endpoint of Native API Feb 27, 2019
@landreev
Copy link
Contributor

landreev commented Mar 1, 2019

I have approved that PR, in the dataverse-client-python project; it actually makes perfect sense as is.
What do we do with this issue - just close it, or what? OK, let's figure it out on Mon.

@pdurbin
Copy link
Member

pdurbin commented Mar 2, 2019

We should merge IQSS/dataverse-client-python#51 before closing this issue but yes, let's discuss Monday.

@landreev
Copy link
Contributor

landreev commented Mar 4, 2019

So who does the merging of PRs in dataverse-client-python? (@pdurbin? Or is somebody else in charge of maintaining that project now?)

@landreev
Copy link
Contributor

landreev commented Mar 4, 2019

OK, it's been merged - thanks @djbrooke.
@kcondon - I'm assuming we just close this issue, because there are no changes/nothing to qa on the dataverse side...
But I'm moving it for you to decide.

@djbrooke
Copy link
Contributor

djbrooke commented Mar 4, 2019

I merged the PR. I'll close this issue.

@djbrooke djbrooke closed this as completed Mar 4, 2019
@landreev landreev removed their assignment Mar 4, 2019
@landreev
Copy link
Contributor

landreev commented Mar 4, 2019

OK, even better :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants