Skip to content
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

Suggested export options #119

Merged
merged 18 commits into from
Nov 18, 2019
Merged

Suggested export options #119

merged 18 commits into from
Nov 18, 2019

Conversation

PatrickRWright
Copy link
Collaborator

@PatrickRWright PatrickRWright commented Nov 14, 2019

Pretty straight forward function to help people troubleshoot why "things" may not be working or train people what type of exports to request.

I would like to add the function call after read_secuTrial_raw() in read_secuTrial() to warn people if they use the wrapper. What do you think @aghaynes @markomi ?

Also I realized that we do not seem to be tracking the export format currently since we assume its always either "CSV format" or "CSV format for MS Excel". I think we should track this export option and catch it if e.g. SAS, CDISC, SPSS is specified. I have added this to the PR too.

closes #17

@PatrickRWright PatrickRWright requested review from markomi and aghaynes and removed request for markomi November 14, 2019 15:28
@codecov-io
Copy link

codecov-io commented Nov 15, 2019

Codecov Report

Merging #119 into master will increase coverage by 0.12%.
The diff coverage is 95.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
+ Coverage   95.09%   95.22%   +0.12%     
==========================================
  Files          24       25       +1     
  Lines        1142     1173      +31     
==========================================
+ Hits         1086     1117      +31     
  Misses         56       56
Impacted Files Coverage Δ
R/read_export_options.R 94.14% <100%> (+0.53%) ⬆️
R/check_export_options.R 100% <100%> (ø)
R/read_secuTrial.R 92.59% <71.42%> (-2.87%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 385e5dc...da8ecd2. Read the comment docs.

@PatrickRWright
Copy link
Collaborator Author

Adding check_export_options() to read_secuTrial() created quite a few warnings in the test suite (as expected). This should not be too hard to remedy. However, before I do that I would like to know if you both agree with running the check.

@aghaynes
Copy link
Member

we do not seem to be tracking the export format currently since we assume its always either "CSV format" or "CSV format for MS Excel". I think we should track this export option and catch it if e.g. SAS, CDISC, SPSS is specified.

The first part (tracking the format) we certainly do... this gets the file extension which is saved in export_options as extension

file_extension <- unique(sapply(strsplit(files$Name[-study_options_file_idx], ".", fixed = TRUE), function(x) x[2]))
I dont remember whether we check it though...

Seems like a reasonable idea on the whole though

@PatrickRWright
Copy link
Collaborator Author

PatrickRWright commented Nov 15, 2019

@aghaynes so any changes(?), or can I go ahead and adjust the tests accordingly so we don't have 24 warnings?

README.md Outdated Show resolved Hide resolved
@markomi
Copy link
Collaborator

markomi commented Nov 18, 2019

For me the addition of the warnings to read_secuTrial() would be fine. I'd also be OK with converting the warning to a message, if you prefer.

@aghaynes
Copy link
Member

Its ok with me

@markomi
Copy link
Collaborator

markomi commented Nov 18, 2019

@PatrickRWright should I merge now, or do you want to add something?

@PatrickRWright
Copy link
Collaborator Author

PatrickRWright commented Nov 18, 2019

I will go over the tests and remove the warnings if possible. Edit: Actually, I will change the warnings to messages as suggested by @markomi

Also, how about having "English" as suggested language? Edit: I will do this.

@PatrickRWright
Copy link
Collaborator Author

I'm done.

@markomi
Copy link
Collaborator

markomi commented Nov 18, 2019

Thanks @PatrickRWright! This will save us a lot of troubleshooting time. I'm merging.

@markomi markomi merged commit ade1e8e into SwissClinicalTrialOrganisation:master Nov 18, 2019
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.

recommended export options
4 participants