Python example to add a dataset?

51 views
Skip to first unread message

Mark London

unread,
Jun 8, 2017, 12:05:18 AM6/8/17
to Dataverse Users Community
I'm looking for an example code that uses the python dataverse library to add a dataset.   Thanks very much!

Mark London 
MIT PSFC

Philip Durbin

unread,
Jun 8, 2017, 6:21:31 AM6/8/17
to dataverse...@googlegroups.com
Hi! Unfortunately dataverse-client-python is not maintained at the moment, but that doesn't mean it's necessarily broken. I ran the test suite on my laptop a year or two ago and it worked fine.

The code was mostly contributed by the Center for Open Science (thanks again!) who still use it to deposit data from the Open Science Framework (OSF) to Dataverse. You might want to try using their version of the library, which I *think* is more or less the same. I think this is where they keep that code: https://github.com/CenterForOpenScience/osf.io/tree/develop/addons/dataverse/tests

if there is anyone out there who loves Python and Dataverse and wants to help maintain the library, please get in touch! The first task I'd put you on is getting the Travis builds passing again: https://github.com/IQSS/dataverse-client-python/issues/32

All that said about dataverse-client-python I know there are other folks in the community who have written Python code to create datasets in Dataverse but I don't have any links handy. I use Java and Bash (curl) in my testing. Here's a link to a Bash script I used to create datasets (it creates datasets both via the SWORD API and "native" API) using curl:

https://github.com/IQSS/dataverse/blob/v4.6.2/scripts/search/tests/create-all-and-test

For more context, this script is called every time I run integration tests from here:

https://github.com/IQSS/dataverse/blob/v4.6.2/scripts/deploy/phoenix.dataverse.org/post

I hope this helps!

Phil

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/9e46cd56-8f94-4e8e-824e-7e37c69db10f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Mark London

unread,
Jun 8, 2017, 8:48:15 AM6/8/17
to Dataverse Users Community, philip...@harvard.edu
Thanks for the info!   If I can't figure out how to get the python client to work, I'll fall back and use  PycURL and add the dataset using the curl commands.   Much appreciated! - Mark 


On Thursday, June 8, 2017 at 6:21:31 AM UTC-4, Philip Durbin wrote:
Hi! Unfortunately dataverse-client-python is not maintained at the moment, but that doesn't mean it's necessarily broken. I ran the test suite on my laptop a year or two ago and it worked fine.

The code was mostly contributed by the Center for Open Science (thanks again!) who still use it to deposit data from the Open Science Framework (OSF) to Dataverse. You might want to try using their version of the library, which I *think* is more or less the same. I think this is where they keep that code: https://github.com/CenterForOpenScience/osf.io/tree/develop/addons/dataverse/tests

if there is anyone out there who loves Python and Dataverse and wants to help maintain the library, please get in touch! The first task I'd put you on is getting the Travis builds passing again: https://github.com/IQSS/dataverse-client-python/issues/32

All that said about dataverse-client-python I know there are other folks in the community who have written Python code to create datasets in Dataverse but I don't have any links handy. I use Java and Bash (curl) in my testing. Here's a link to a Bash script I used to create datasets (it creates datasets both via the SWORD API and "native" API) using curl:

https://github.com/IQSS/dataverse/blob/v4.6.2/scripts/search/tests/create-all-and-test

For more context, this script is called every time I run integration tests from here:

https://github.com/IQSS/dataverse/blob/v4.6.2/scripts/deploy/phoenix.dataverse.org/post

I hope this helps!

Phil
On Thu, Jun 8, 2017 at 12:05 AM, Mark London <markr...@gmail.com> wrote:
I'm looking for an example code that uses the python dataverse library to add a dataset.   Thanks very much!

Mark London 
MIT PSFC

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse...@googlegroups.com.

Vyacheslav Tikhonov

unread,
Jun 8, 2017, 6:37:40 PM6/8/17
to Dataverse Users Community, philip...@harvard.edu
Hi Mark,

We did the conversion of metadata and deposited datasets to Dataverse in one of our projects, you can find it here:

Best,
Slava
DataverseNL application manager
Reply all
Reply to author
Forward
0 new messages