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 #1792 multiple summary vars #2124

Merged
merged 12 commits into from
Oct 9, 2023

Conversation

bundfussr
Copy link
Collaborator

@bundfussr bundfussr commented Sep 25, 2023

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. 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.

  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
  • Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
  • Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Address any updates needed for vignettes and/or templates
  • 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)
  • Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
  • Address or fix all lintr warnings and errors - lintr::lint_package()
  • Run R CMD check locally and address all errors and warnings - devtools::check()
  • Link the issue in the Development Section on the right hand side.
  • Address all merge conflicts and resolve appropriately
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

@github-actions
Copy link

github-actions bot commented Sep 25, 2023

Code Coverage

Package Line Rate Health
admiral 98%
Summary 98% (4388 / 4457)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did I see in your function re-work document a recommendation to deprecate this function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, if we add the dataset_add argument to derive_summary_records(), we can deprecate or supersede get_summary_records().

Copy link
Collaborator

@zdz2101 zdz2101 left a comment

Choose a reason for hiding this comment

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

Where are the changes from admiraldev::331_allow_grouped affecting the code base/should we merge in that PR first? I saw there isn't too much changed:

image

@bundfussr
Copy link
Collaborator Author

Where are the changes from admiraldev::331_allow_grouped affecting the code base/should we merge in that PR first? I saw there isn't too much changed:

image

I cancelled the update in admiraldev because at the end I did not need it.

Copy link
Collaborator

@zdz2101 zdz2101 left a comment

Choose a reason for hiding this comment

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

Address merge conflicts, otherwise looks good

NEWS.md Outdated
@@ -1,3 +1,21 @@
# admiral 0.12.0.9000
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should have admiral (development version) instead of the number. I think usethis::use_version("dev") will update for you

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated, although use_version("dev") did not work well (it increased to 0.12.0.9001 and added an additional heading in NEWS.md and the commit failed). I think we should call use_version("dev") once directly after each release.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe every time we merge into main while developing this will be incremented. @zdz2101 @ddsjoberg

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would keep it simple and always stay at x.x.x.9000. Even in the "R packages" book it is suggested to increment the development version only in exceptional cases:

Increment the development version, e.g. from 9000 to 9001, if you’ve added an important feature and you (or others) need to be able to detect or require the presence of this feature. For example, this can happen when two packages are developing in tandem. This is generally the only reason that we bother to increment the development version. This makes in-development versions special and, in some sense, degenerate. Since we don’t increment the development component with each Git commit, the same package version number is associated with many different states of the package source, in between releases.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree it will make it a lot easier on us if we don't have to change this every time we merge into main. Seems like this will cause a lot of tedious merge conflicts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This does seem to make more sense, I'll remove the running of the line from the PR template, and it can be added as a standard post-release task

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems like the admiral family often makes updates that affect downstream dependencies. With that in mind, incrementing the version number will make it easy for these downstream dependencies to ensure the min dev version is installed. @cicdguy created a workflow to increment the dev version number with each PR, and I think it's a good addition to include in admiral

#' specified by variables.
#' The expressions on the left hand sides of `new_vars` are evaluated by the
#' specified variables. The resulting values are merged to the input dataset
#' (`dataset`) by the specified by variables.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#' (`dataset`) by the specified by variables.
#' (`dataset`) by the specified **by variables**.

I got confused

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The by variables are used twice. I have emphasized both.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I also added more details to "Details".

@bms63
Copy link
Collaborator

bms63 commented Oct 8, 2023

@bundfussr once you catch up from your vacay - can you resolve merge conflicts please.

@bundfussr bundfussr merged commit 6b5e037 into main Oct 9, 2023
20 checks passed
@bundfussr bundfussr deleted the 1792_multi_sum_vars@331_allow_grouped branch October 9, 2023 13:05
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: Enable deriving more than one variable by derive_summary_records()
4 participants