-
Notifications
You must be signed in to change notification settings - Fork 214
Refactor documentation and test nomenclature #1694
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
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n use_git_config(scope = "project", "core.autocrlf" = "false")
… this function will not error with a character vector of length > 1 (string is usually reserved for length = 1 (?))
…hiny is required + a prompt is sent to user if shiny is not installed.
…n files (to have them loading with `load_all()` easier workflow; test lints.
This is monumental work! I am super impressed so far (and it's okay that this touches so many files, it has to). |
Thanks for your interest! I pushed another chunk of changes to go around rough edges. |
rich-iannone
approved these changes
Jun 7, 2024
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.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sorry.. this got out of hand again. Please let me know if you agree with this. If not, I can send smaller separate PRs of the relevant bits!
TL;DR: The goal is basically to simplify the
x()
function tox()
where applicable as recommended in the documentation tidyverse style guide. (only the function bullet)This PR started as a follow-up to #1683 as I wanted to make clarifications and improved some things I did there after taking a fresh look.
cbb1dca and 018b232 do this. I finally discovered the way to avoid spurious (snapshot git diffs while working on Windows: Set Posix line ending in Rproj (13b2666). Used https://www.tidyverse.org/blog/2020/03/roxygen2-7-1-0/ as ref too.
I'd like to get your views on how I edited the shiny related functions docs 64e80b3. (I removed details that felt redundant? Let me know if you agree. Otherwise, I will rework it!
Changes
Renamed
is_non_empty_string()
tois_non_empty_chr()
for clarity (accepts length > 1) e0c4a10 (string is usually for character + length = 1)renamed tests to use the convention ab0ed09
Moved some test helper functions into own test helper files to improve testing workflow (i.e. functions are loaded with
load_all()
af9cdd6Removed duplicate definition of test helper in tests/testthat/helper.R bcbb80d
Removed the check for xml2 installation since it is import now (I may do a follow-up where I remove
check_suggests()
with appropriateskip_if_not_installed()
bcbb80dDid minor test refactoring where I saw it useful bcbb80d
simplified some dplyr expressions in examples d2aa113, bc70cdb
I verified that they are all correct with this code
Other considerations:
When I noticed it, avoid self-reference, and 2 cross-refs to the same function in the same paragrah.
The diff is large because I reflowed roxygen comments to be about 80 characters long.