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

643 potential removal of dependencies #663

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

chlebowa
Copy link
Contributor

@chlebowa chlebowa commented Feb 21, 2024

Closes #643

@chlebowa chlebowa linked an issue Feb 21, 2024 that may be closed by this pull request
8 tasks
@chlebowa chlebowa removed the blocked label Feb 22, 2024
@chlebowa chlebowa marked this pull request as ready for review February 22, 2024 12:18
@chlebowa chlebowa marked this pull request as draft February 22, 2024 12:21
@chlebowa chlebowa marked this pull request as ready for review February 22, 2024 12:38
@m7pr
Copy link
Contributor

m7pr commented Feb 22, 2024

Just to summarize main changes

  • magrittr::%>% is substittuted with dplyr::%>% hence magrittr is removed from Imports
  • teal.data is upgraded from Suggests to Imports as teal.data::datanames() is widely used (e.g. srv_front_page)
  • shinyTree is downgraded from Depends to Imports as it is used in ui_viewer of tm_file_viewer
  • methods is removed from Suggests
  • library(nestcolor) is changed to require(nestcolor) in examples so that nestcolor can remain in Suggests and we do not loose all examples (if we apply @examplesIf requireNamespace and nestcolor is not installed in examples)

@m7pr
Copy link
Contributor

m7pr commented Feb 22, 2024

Will take a look on my own now.

@m7pr
Copy link
Contributor

m7pr commented Feb 22, 2024

  • MASS::fitdistr is used in srv_distribution of tm_g_distribution but it's only in Suggests - should we upgrade to Imports?
  • colourpicker::colourInput is used in tm_g_scatterplot but it's only in Suggests - should we upgrade to Imports?
  • tools::file_ext is used in tm_file_viewer but not in neither Suggests, Imports nor Depends - should we add to Imports?

All 3 packages would be caught if we did not use prefixes but would go with the other school that uses @imporfFrom manually for every foreign function in the package : D

@m7pr
Copy link
Contributor

m7pr commented Feb 22, 2024

I actually used your code @chlebowa from here https://github.com/insightsengineering/idr-tasks/issues/632#issuecomment-1708247088 to detect MASS, colourpicker and tools not being added to Imports.

@chlebowa
Copy link
Contributor Author

tools is an oversight and should be added to Imports, thank you. The other ones are covered by if(requireNamespace), if I am not mistaken.

@chlebowa
Copy link
Contributor Author

Funny that checks had passed without Imports: tools. Perhaps because tools is always installed as part of r-base?

@m7pr
Copy link
Contributor

m7pr commented Feb 22, 2024

tools is an oversight and should be added to Imports, thank you. The other ones are covered by if(requireNamespace), if I am not mistaken.

Sorry that I missed colourpicker and MASS : D they are used in requireNamespace with a Filter and vector input lol

  extra_packages <- c("ggpmisc", "ggExtra", "colourpicker")
  missing_packages <- Filter(function(x) !requireNamespace(x, quietly = TRUE), extra_packages)

@m7pr
Copy link
Contributor

m7pr commented Feb 22, 2024

Funny that checks had passed without Imports: tools. Perhaps because tools is always installed as part of r-base?

Maybe, but R sometimes warns about stats or grDevice or methods which are a part of R Base, so not sure tbh.

@m7pr
Copy link
Contributor

m7pr commented Feb 22, 2024

Ok, so besides tools, this is good to go. R CMD does not warn about it so I think we can skip it,

@chlebowa chlebowa merged commit 57a1122 into pre-release@main Feb 22, 2024
@chlebowa chlebowa deleted the 643_review_dependencies@pre-release@main branch February 22, 2024 14:32
@chlebowa chlebowa restored the 643_review_dependencies@pre-release@main branch February 22, 2024 14:34
@pawelru pawelru linked an issue Feb 22, 2024 that may be closed by this pull request
DESCRIPTION Show resolved Hide resolved
chlebowa added a commit that referenced this pull request Feb 22, 2024
missed commit

---------

Signed-off-by: Aleksander Chlebowski <[email protected]>
@m7pr m7pr mentioned this pull request Mar 1, 2024
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-release activities - Potential removal of dependencies Move shinyTree from Depends into Imports
3 participants