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

Use {roxyglobals} to manage global variables #81

Merged
merged 5 commits into from
Mar 4, 2025

Conversation

joshwlambert
Copy link
Collaborator

This PR addresses #66 by using the @autoglobal roxygen tag to automatically document global variables - due to using {data.table} - in the R/globals.R file.

roxyglobals::use_roxyglobals() sets up the DESCRIPTION file to automatically document @autoglobals when calling devtools::document(). {roxyglobals} is added as a suggested dependency.

.() had to be replaced, for now, to list() in a data.table subset call, because {roxyglobals} didn't detect and document the .().

The utils::globalVariables() call has been removed, with the additional benefit that many of the global variables previously listed were no longer in the package, so by automating the generation of global variables we only list the ones currently used.

@joshwlambert joshwlambert requested a review from sbfnk March 4, 2025 11:31
@joshwlambert joshwlambert added the documentation Improvements or additions to documentation label Mar 4, 2025
@joshwlambert
Copy link
Collaborator Author

.() had to be replaced, for now, to list() in a data.table subset call, because {roxyglobals} didn't detect and document the .().

This change might be temporary if {roxyglobals} can accomodate .() (anthonynorth/roxyglobals#12).

@sbfnk sbfnk added this pull request to the merge queue Mar 4, 2025
Merged via the queue into epiforecasts:main with commit 4e528bb Mar 4, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants