-
Notifications
You must be signed in to change notification settings - Fork 0
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
Enhancement/run app via package installation #172
Enhancement/run app via package installation #172
Conversation
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.
Hi @m-kolomanski , I went through and checked all the features, and everything seems to be working the same as when I was going through the cloned version. So I am happy to approve!
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.
Thanks for doing this! I did the next review, let me know if anything else is needed from my side:
- Local installation by cloning works fine
- Installation with
pak 0.8.0.1
also works - Main apps functionalities are not affected. Seems all packages are being imported.
I only made some comments to the README with potential improvements. But I guess the README won't create big crashes if we merge!
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.
I tested it in docker according to the instruction and everything seems to work fine. Awesome work, and thank you so much for finding time to bring the stale PR back to life! 🎉
I have only one general thought that I also had when originally working on this PR: it feels sketchy to include a package into DESCRIPTION but not to have a single @import or @importFrom instruction in the code. I mean, it makes sense to all of us now, but if a new contributor joins the project it might not make sense to them. Personally, I'd be surprised and would want to "clean up" the DESCRIPTION file 😄
Maybe a line of caution in the README would make sense, or maybe you think this worry is superficial?
Hey, instead of in the README do you think would it make sense to include this line of caution in the CONTRIBUTING.md and/or as a comment in the DESCRIPTION file? |
@Gero1999 I'm not sure if comments are allowed in the DESCRIPTION file, but CONTRIBUTING.md is a great idea! 💡 |
thank you for the feedback! I have had the same thought, but decided to leave it as-is, since I believe that before publishing the package on CRAN we should go through all dependencies and cut down on the number. We have been adding dependencies, but I do not think we have been removing any - so there is a change we are requiring unused packages. Before publishing we should remove those unused dependencies, plus see if we can replace any with either base functions or more prominent packages. Nevertheless, this entry to the |
Issue
Closes #122
Description
This PR supersedes #123. The old PR was done on a very outdated branch, I have decided to implement changes to the most up-to-date version of the app instead of dealing with conflicts.
This changes brings ability to run the app after installing the package - without cloning the repository.
Changes:
...
to the signature to be able to pass arguments toshiny::runApp()
such as host, port, etcrequire()
insider the function to load all required librariesDefinition of Done
pak::pak("pharmaverse/aNCA")
aNCA::run_app()
How to test
Single command to test the app via package installation (requires docker):
docker run --rm -it -p 3838:3838 rocker/r-ver:latest bash -c "apt update && apt install libcurl4-openssl-dev && Rscript -e \"install.packages('pak'); pak::pak('pharmaverse/aNCA@enhancement/run-app-via-package-installation2')\" && Rscript -e \"aNCA::run_app(host='0.0.0.0',port=3838)\""
Alternatively, install the package in your environment via pak from this branch:
If you are installing the package without docker, please use some sort of virtual environment management system (like
renv
) OR make sure to start with a clean slate and remove the current installation that is present in your global library by runningremove.packages('aNCA')
.Contributor checklist
Notes to reviewer
Please perform the functional testing rigorously. I have performed a simple analysis and clicked through all the options, but there is a high probability that I have missed something. There might be a chance that some packages were not properly put into the NAMESPACE, and due to that are not loaded in the app.
In addition, if you notice any packages that are loaded but should not due to being outdated / deprecated / superseded / changed for something else and mistakenly not removed from the
NAMESPACE
file, please do let me know.