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

Closes #151 - Metadata includes verbose option #199

Merged
merged 18 commits into from
Jan 29, 2024
Merged

Conversation

EeethB
Copy link
Collaborator

@EeethB EeethB commented Dec 5, 2023

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 compliant xpt 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

  • Adds a verbose option to xportr_metadata()
  • Defaults verbose to NULL in all other functions
  • Chooses verbose value in this priority order:
    • Explicit value set in function call
    • Value set in earlier call to xportr_metadata()
    • Option value: _xportr.[type|length|order|label]_verbose_

Task List

  • The spirit of xportr is met in your Pull Request
  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Summary of changes filled out in the above Changes Description. Can be removed or left blank if changes are minor/self-explanatory.
  • Code is formatted according to the tidyverse style guide. Use styler package and functions to style files accordingly.
  • Updated relevant unit tests or have written new unit tests. See our Wiki for conventions used in this package.
  • Creation/updated relevant roxygen headers and examples. See our Wiki for conventions used in this package.
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Run pkgdown::build_site() and check that all affected examples are displayed correctly and that all new/updated functions occur on the "Reference" page.
  • Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
  • Make sure that the pacakge version in the NEWS.md and DESCRIPTION file is same. Don't worry about updating the version because it will be auto-updated using the vbump.yaml CI.
  • Address any updates needed for vignettes and/or templates
  • Link the issue Development Panel so that it closes after successful merging.
  • Fix merge conflicts
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

@EeethB EeethB force-pushed the 151_metadata_verbose branch from 0bb0ef8 to ab82633 Compare December 5, 2023 21:59
@EeethB EeethB changed the title 151 metadata verbose Closes #151 Dec 5, 2023
@EeethB EeethB changed the title Closes #151 Closes #151 - Metadata includes verbose option Dec 5, 2023
@EeethB EeethB force-pushed the 151_metadata_verbose branch from 0a582b1 to a0d83b7 Compare December 6, 2023 22:32
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c0dd2f0) 100.00% compared to head (9d91212) 100.00%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #199   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          612       627   +15     
=========================================
+ Hits           612       627   +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EeethB EeethB marked this pull request as ready for review December 6, 2023 22:44
@EeethB EeethB requested a review from bms63 December 7, 2023 16:34
Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to create a test-metadata.R file and move al the metadata related tests into that file. Just to help keep things organized and findable

NEWS.md Outdated Show resolved Hide resolved
@EeethB
Copy link
Collaborator Author

EeethB commented Jan 4, 2024

Is it possible to create a test-metadata.R file and move al the metadata related tests into that file. Just to help keep things organized and findable

I made this change, let me know what you think!

@averissimo averissimo mentioned this pull request Jan 16, 2024
14 tasks
@bms63
Copy link
Collaborator

bms63 commented Jan 16, 2024

Hey - @EeethB when you get a chance can you fixt these merge conflicts please

@EeethB
Copy link
Collaborator Author

EeethB commented Jan 16, 2024

Hey - @EeethB when you get a chance can you fixt these merge conflicts please

@bms63 merge conflicts fixed

@EeethB EeethB requested a review from bms63 January 16, 2024 23:54
@EeethB EeethB requested a review from bms63 January 19, 2024 22:09
Copy link
Collaborator

@averissimo averissimo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also a bit concerned about the effect of calling xportr_metadata multiple times with different arguments.

It might overwrite previously set metadata / verbose (started a discussion on #224)

We can discuss and deal with it in that issue.

Comment on lines +58 to +59
`_xportr.df_metadata_` = metadata,
`_xportr.df_verbose_` = verbose
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use quotes ", instead of backticks

Suggested change
`_xportr.df_metadata_` = metadata,
`_xportr.df_verbose_` = verbose
"_xportr.df_metadata_" = metadata,
"_xportr.df_verbose_" = verbose

@@ -51,5 +54,8 @@ xportr_metadata <- function(.df, metadata = NULL, domain = NULL) {

## End of common section

structure(.df, `_xportr.df_metadata_` = metadata)
structure(.df,
Copy link
Collaborator

@averissimo averissimo Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very very optional. I would think that {styler} or {lintr} didn't like this indentation

Suggested change
structure(.df,
structure(
.df,

@bms63
Copy link
Collaborator

bms63 commented Jan 25, 2024

@EeethB Ping me after you fix these merge conflicts and I can take a look

@averissimo
Copy link
Collaborator

@EeethB I merged the main branch to correct the conflicts cause by #190 (trying to save you the trouble)

Additionally, the placement of the inferrement of the verbose from attributes was causing tests to fail and I moved it to the common section.

Sorry about this 😕.

@EeethB
Copy link
Collaborator Author

EeethB commented Jan 29, 2024

@averissimo thanks for doing all that! It looks like all the checks are passing now, @bms63 I think this is ready for one more review?

Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thank yous @EeethB and @averissimo for helping to see this PR/issue through!!

@bms63 bms63 merged commit eb3428d into main Jan 29, 2024
13 checks passed
@bms63 bms63 deleted the 151_metadata_verbose branch January 29, 2024 18:30
bms63 added a commit that referenced this pull request Jan 29, 2024
Merge remote-tracking branch 'origin/main' into 91-max-length

# Conflicts:
#	R/length.R
#	man/metadata.Rd
#	man/xportr_length.Rd
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.

Feature Request: xportr_metadata() should allow passing of verbose as well
3 participants