inbo / iassetR

Interact with the iAsset api using R
https://inbo.github.io/iassetR/
Other
0 stars 1 forks source link

21 convert data from answercode to answer #26

Closed PietrH closed 8 months ago

PietrH commented 9 months ago

Todo

SanderDevisscher commented 8 months ago

@PietrH can I test this ?

SanderDevisscher commented 8 months ago

PS it works

PietrH commented 8 months ago

Thanks for having a look at it Sander, I'm not ready with this branch yet. I've added a todo list to this PR.

Sorry it's been dragging on. Do you have any experience writing tests with testthat?

SanderDevisscher commented 8 months ago

Sorry no experience with testthat, however I'm willing to learn.

PietrH commented 8 months ago

No worries, we can get together about that at some point. There is some information about it in the R packages book: https://r-pkgs.org/testing-basics.html

PietrH commented 8 months ago

I'll take care of the unit tests for this PR though, don't worry!

SanderDevisscher commented 8 months ago

No worries, we can get together about that at some point. There is some information about it in the R packages book: https://r-pkgs.org/testing-basics.html

thanks

PietrH commented 8 months ago

The failure state when you enter the wrong username isn't very elegant:

get_records(access_token = get_access_token(username = "pieter.huybrechts@inbo.be"))

#>Error: access_token is not a string (a length one character vector).
PietrH commented 8 months ago

Select fields are recoded, currently radio and select fields are treated equally.

PietrH commented 8 months ago

I've decided tests are for a seperate PR, in the context of #7 because it'll require a bit more tooling. I'd like to avoid mocking or vcr if at all possible.

PietrH commented 8 months ago

The failure state when you enter the wrong username isn't very elegant:

get_records(access_token = get_access_token(username = "pieter.huybrechts@inbo.be"))

#>Error: access_token is not a string (a length one character vector).

27

PietrH commented 8 months ago

Issue for optionally returning verbatim field names as iAsset: #28

PietrH commented 8 months ago

PS it works

I'm interpreting this as a positive review, and merging to main. If it's broken, please open an issue.