-
Notifications
You must be signed in to change notification settings - Fork 9
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 length check <=200 bytes #194
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #194 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 588 595 +7
=========================================
+ Hits 588 595 +7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!! Thanks for doing this one!!
For #189 are you going to implement that in here or in another PR? I see it tagged on the side |
@bms63 thanks for the review!
we used from SAS help doc:
|
I see that the issue #91 is also tagged but there are other elements to consider regarding the length in this issue. We could have another PR for it or do it in this one; I am not sure of the best approach, but I prefer the issue not to be closed until the following points are handled:
What to do in case these lengths are different:
Note: The FDA requests trimming the variable across datasets. For example, if AVISIT data length = 40 in ADLB and AVISIT length = 30 in ADVS, the AVISIT length should be 40 for all datasets. In this case, the metadata length will be different from the data length. I don’t think we can check this scenario, but maybe we could mention this point in the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the implementation; it looks great. I've just added a small comment.
Since the 200-bytes limitation is a technical constraint, I also believe that users don't need to choose between nchar (type = bytes) and nchar (type = chars).
Shall we mention the byte/character issue in the documentaion for |
Hi @kaz462 , thanks for the updates and sorry for late reply.
|
Thanks @siye6 for providing a detailed example :) That's a good finding for For xportr_write(
df,
path = "test.xpt",
label = "这是一段文字,用来测试在XPTversion5中作为数据集label是否会被截断"
)
Error in `xportr_write()`:
! `label` cannot contain any non-ASCII, symbol or special characters.
Run `rlang::last_trace()` to see where the error occurred. |
Hi @kaz462 , thanks for update the warning message, regarding the |
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
@siye6 Thanks for the further information! I've created two issues below - |
Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Thank you for your Pull Request!
We have developed a Pull Request template to aid you and our reviewers. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the xportr codebase remains robust and consistent.
The scope of
{xportr}
{xportr}
's scope is to enable R users to write out submission compliantxpt
files that can be delivered to a Health Authority or to downstream validation software programs. We see labels, lengths, types, ordering and formats from a dataset specification object (SDTM and ADaM) as being our primary focus. We also see messaging and warnings to users around applying information from the specification file as a primary focus. Please make sure your Pull Request meets this scope of {xportr}. If your Pull Request moves beyond this scope, please get in touch with the{xportr}
team on slack or create an issue to discuss.Please check off each task box as an acknowledgment that you completed the task. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the
devel
branch until you have checked off each task.Changes Description
(descriptions of changes)
Task List
devel
branch, Pull Requests tomain
should use the Release Pull Request Templatestyler
package and functions to style files accordingly.devtools::document()
so all.Rd
files in theman
folder and theNAMESPACE
file in the project root are updated appropriatelypkgdown::build_site()
and check that all affected examples are displayed correctly and that all new/updated functions occur on the "Reference" page.