Comments (5)
This would be an easy first PR to pyDataverse, what do you think @pdurbin ?
Just take the upload_file()
function in api.py, copy it and change the query_str and related stuff. :)
from pydataverse.
@skasberger sure, I'll try to make a pull request. Please go ahead an assign this issue to me if you like.
Instead of "upload file" I planned on using "delete dataset" as a starting point:
https://github.com/AUSSDA/pyDataverse/blob/v0.2.1/src/pyDataverse/api.py#L744
from pydataverse.
@skasberger huh. I'm surprised by the Dataverse API behavior. I tried using the pyDataverse "delete dataset" method with a superuser API token on a published dataset and to my surprise the dataset was destroyed!
Here's the code in question: https://github.com/IQSS/dataverse/blob/v4.15/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java#L296
I guess this means that I don't really need a "destroy dataset" method in pyDataverse. I can just use the regular "delete dataset" method as a superuser.
@sekmiller seems to agree with me that the behavior I'm seeing is probably a bug in the Dataverse API. When I use "delete dataset" as a superuser on a published dataset, we think the API should return an error like "Are you sure you want to destroy a published dataset? If so, use the dedicated 'destroy' API endpoint for this!"
The bottom line is that I don't plan to make a pull request for this issue after all. Not anytime soon anyway. Again, I don't need "destroy dataset", surprisingly. 😄
from pydataverse.
So, i can close the issue, right? Will there be any updates on the API side, who will fix this in the nearer future?
from pydataverse.
I'll just close this issue. Again, I don't need any changes in pyDataverse. Most people will probably just try "delete dataset" rather than hunting around for "destroy dataset" like I did.
I'm reluctant to change any APIs in Dataverse itself. Maybe this is because I watched "Spec-ulation" by Rich Hickey: https://www.youtube.com/watch?v=oyLBGkS5ICk . Transcript: https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/Spec_ulation.md
"Now what happens if you just put foo2 next to foo? You can still tell people. They can say, "I am in Bermuda this week, but next week I will try foo2. That sounds awesome." But right now, my web service is going to keep working, because it calls foo, and you did not take it away from me while I was on vacation."
from pydataverse.
Related Issues (20)
- Include guestbook option in full dataset upload? HOT 2
- Posting JSON broken on Dataverse 5.9 HOT 12
- link to dataset-edit-metadata-sample.json is broken
- It is not possible to use the API ignoring the SSL certificate of the dataverse server HOT 1
- Problems with edit.metadata with Pydataverse HOT 1
- How can I delete specific datafile HOT 2
- error: {'status': 'ERROR', 'message': 'Error parsing Json: incorrect typeClass for field kindOfData, should be controlledVocabulary'} HOT 2
- pyDataverse changes the json of a dataset on import too much.
- edit_dataset_metadata replace bug HOT 1
- Add direct datafile upload support (directupload.py) to pyDataverse HOT 1
- pyDataverse conda package HOT 15
- json Validator Fails when License is included HOT 2
- SwordApi Authentications fails and get_service_document throws error HOT 3
- API fails to handle metadataBlocks: "astrophysics" & "biomedical" HOT 5
- Local testing of pyDataverse HOT 6
- problem with replace_datafile HOT 7
- application folders: `click.get_app_dir("app_name")`
- Dataverse PyFilesystem implementation
- when uploading many files: httpcore.ReadTimeout: timed out
- Refactor `api.py` into sub-modules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydataverse.