IQSS / dataverse-client-r

R Client for Dataverse Repositories
https://iqss.github.io/dataverse-client-r
61 stars 25 forks source link

Steal tests from pyDataverse #29

Open wibeasley opened 4 years ago

wibeasley commented 4 years ago

@skasberger kindly offered assistance to the package and its tests (@skasberger, I have it on record so you can't back out).

Tests of uploading to Dataverse

From my initial look, it appears that I could port/translate a lot of the tests and flat-out steal a lot of the json that's fed to the tests.

Tests of downloading from Dataverse

@skasberger, are there pyDataverse tests that compare data returned from Dataverse against an expected set of values?

If not, maybe that set of expected values is something that the R & Python libraries could build together. The R data.frame/list could be serialized to json, and compared against a json file; but that's probably too reliant on the R & Python json libraries from producing the exact same plain-text file.

Alternatively, the json expected files (that are common between Python & R) could be read into the languages' dict/list objects (e.g., by Python's json and R's jsonlite) and compared there. I'm guessing this approach is less brittle and more reusable across languages?


To @skasberger & anyone else, I'm not very familiar with Dataverse or Python package development, and I'm open to any ideas how to do things differently or leverage each package's efforts more efficiently.

(builds on #4 & possibly #22)

pdurbin commented 4 years ago

@wibeasley in addition to the generous offer to help by @skasberger I'd like to point out that the newest Dataverse client library, dataverse-client-javascript, is currently under very active development. And I see a bunch of tests at https://github.com/IQSS/dataverse-client-javascript/tree/master/test that you might be able to draw inspiration from.

Also, I'd be very happy to work with you on #22 and can probably rope @donsizemore into that effort as well. :smile: