Skip to content

Add doctests and integration tests for repeating forms#2

Merged
JuliaSprenger merged 8 commits into
JuliaSprenger:add/imp_expfrom
redcap-tools:pr/210
Mar 24, 2022
Merged

Add doctests and integration tests for repeating forms#2
JuliaSprenger merged 8 commits into
JuliaSprenger:add/imp_expfrom
redcap-tools:pr/210

Conversation

@pwildenhain
Copy link
Copy Markdown

Really grateful for your test cases, they revealed some weak points in the existing code. The doctest/long project xml files/test files have been updated and everything works as expected. Once merging this, you'll be ready to add unit tests (if you want 😉 )

The current setup requires every new endpoint that could be returned as a data frame to be added here. That's bad form, let's just make the default be an empty dict
Similar to the prior change this was hard coded for record and metadata requests. But as this PR is demonstrating there a lot of other endpoints out there that allow imports and we certainly don't want to have to include each one in here. All that really seems to matter is whether or not there _is_ a named index. If there is, we want to keep it when we export. If there's not, then we don't need it.

As you can see from the test, importing from a dataframe will likely still require some finneagling on the part of the user to ensure all the formats are correct.
@pwildenhain
Copy link
Copy Markdown
Author

Just wanted to sneak the docs update in there while I was thinking about it. I def need a checklist for things to do when adding a new category of endpoints 😅

@JuliaSprenger JuliaSprenger merged commit b492a01 into JuliaSprenger:add/imp_exp Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants