-
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
Add integration test to download a file by filename #2
Comments
I just pushed a quick hack of this based on SWORD as f785083. Basically, it retrieves the SWORD statement, looks for the filename among the named files, retrieves the associated fileId, and then uses the data access API to download the file based on that ID. |
@monogan take note! Thanks, @leeper ! Oh, we've talked about setting up Travis for continuous integration over in Python land at IQSS/dataverse-client-python#19 I also suggested using the Python client to test each deployment to https://apitest.dataverse.org - IQSS/dataverse-client-python#10 . However, we could use the R client for this too. :) If any this is of interest, please let me know how I can help! |
@pdurbin Travis would be great! I think I can set it up if I get admin Running tests through the package would be cool. We could probably set up a
|
@leeper I just made you ( by way of https://github.com/orgs/IQSS/teams/dataverse-client-r ) an admin on this repo: If there's anything else you need from me, please let me know! |
Excellent! Thanks! Thomas J. Leeper On Tue, Nov 10, 2015 at 3:55 PM, Philip Durbin notifications@github.com
|
@leeper @pdurbin This all looks very encouraging. If you want me to try some "user testing," please let me know. Also, if you want some target data to play with, feel free to use mine: http://dx.doi.org/10.7910/DVN/ARKOTI |
@leeper all this sounds great. Would it be ok if we add an issue in this repo specifically about what our goals would be? Do we want to run the R client against every commit/build of Dataverse? Or is that too ambitious? Please see this related issue I just opened: IQSS/dataverse#2746 |
@pdurbin Yes, let's open a new issue on this repo and then brainstorm best way to do tests. Every commit would probably be simplest to configure but might be overkill. Maybe we could just have daily builds? |
@leeper maybe. When you have a chance, perhaps you could join me in http://chat.dataverse.org and we could brainstorm about this. I'm glad you're into it! :) |
@leeper I was just talking to @izahn about this. He might be interested in at least kicking the tires on the Dataverse R package/client. Also, some news on my end is that I've set up a new test server at http://phoenix.dataverse.org (so called because on every build I drop its database etc. and start fresh) that we could use for integration testing from the R client. I've been working on tests in Java as I mentioned on the the mailing list but the test suite is quite incomplete (and I'm kind of being pulled into other projects). Mostly it's hitting the SWORD API. I'm going to try to get other developers excited about writing API tests in a talk next week (I'm working on slides at http://bl.ocks.org/pdurbin/raw/814fd29916749523db9a and you're welcome to come @izahn) but it would be awesome to have a test suite (in R perhaps!) that exercises more of the Dataverse API. Basically, what I'm suggesting is that we could set up a Jenkins job similar to https://build.hmdc.harvard.edu:8443/job/phoenix.dataverse.org-apitest-4.2.3/ that uses the R client rather than Java. It would hit the phoenix server (unreleased Dataverse code). And maybe another job that hits https://apitest.dataverse.org (stable, released Dataverse code). |
@pdurbin This all looks awesome. I'm putting this all on my agenda for late next week (when I'll be trapped at home, due to impending London tube strike). I bet I can get this finished really quickly, if I just sit down with it for a few hours and crank through it. |
@leeper fantastic. Fingers crossed that Jenkins will "just work" with the output of an R test suite (make fancy graphs and all the rest, trends) but please let me know if you need any plugins installed. Also, I'll need advice on how to execute the tests... something like https://github.com/IQSS/dataverse-client-python#testing please. |
@leeper heads up that this just got a lot easier since the fix for IQSS/dataverse#1837 made it into Dataverse 4.3. Now you can use DOIs in your requests: curl https://dataverse.harvard.edu/api/datasets/:persistentId?persistentId=doi:10.7910/DVN/ARKOTI | jq '.data.latestVersion.files[1]'
Docs at http://guides.dataverse.org/en/4.3/api/native-api.html#datasets |
@leeper just a heads up that I mentioned https://apitest.dataverse.org several times in comments above but we are shutting this server down per IQSS/dataverse#3345 To test the latest release of Dataverse https://demo.dataverse.org should be used. We can talk about maybe using http://phoenix.dataverse.org to test upcoming releases. Please ping me first. 😄 |
Sounds good. I saw your note and plan to write some tests using the "demo" server. |
I'm opening this issue because I just opened and equivalent issue for the Python client: IQSS/dataverse-client-python#29
What I'm really after is a way to address this issue that @monogan opened at IQSS/dataverse#2700 in which he's trying to figure out what to write in a book about R with regard to how to download files.
Ideally (in my mind), the R package for Dataverse would provide some insulation between the readers of his book and the Dataverse APIs. The book would say, "Install the dataverse package from CRAN and download the file by..." That way, even if the APIs change a bit, future readers of his book will download the latest version of the R package from CRAN and it will still "just work".
I think that the only things users should need to download a file is the DOI of the dataset and the filename. The dataverse package can do the rest. :) It would be way cleaner than my hack: IQSS/dataverse@812424a .
The text was updated successfully, but these errors were encountered: