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

add different functions that users/developers can use to install a package #98

Closed
2 tasks
k-doering-NOAA opened this issue Sep 27, 2022 · 6 comments
Closed
2 tasks
Assignees
Milestone

Comments

@k-doering-NOAA
Copy link
Member

k-doering-NOAA commented Sep 27, 2022

Is your feature request related to a problem? Please describe.
Specify the differences between remotes::install_github(), devtools::install_local(), and devtools::load_all() and also - we can speed up install off r-universe and should make this clear to users with the following README text and a badge showing the deployed version: https://ropensci.org/blog/2021/06/22/setup-runiverse/

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Tasks

Preview Give feedback
@ChristineStawitz-NOAA
Copy link
Contributor

also @Bai-Li-NOAA @Cole-Monnahan-NOAA discovered you can't install from a branch from runiverse so this should be included in the instructions we write up

@k-doering-NOAA
Copy link
Member Author

also @Bai-Li-NOAA @Cole-Monnahan-NOAA discovered you can't install from a branch from runiverse so this should be included in the instructions we write up

Technically, we could tell R universe to build a branch instead of the default branch, but I'm not sure if you could have a branch (or branches) and main available, so I agree with Bai and Cole that it isn't really feasible.

Another note is R universe only offers the current version of the software and does not archive any older versions.

@JonBrodziak
Copy link
Contributor

It would be helpful to provide rationale on which installation method best fits a particular user scenario.

@iantaylor-NOAA
Copy link
Contributor

As discussed during seaside chat, the command to install from R-universe
remotes::install_cran("FIMS", repos = "https://noaa-fims.r-universe.dev/")

@kellijohnson-NOAA
Copy link
Collaborator

How to install the package should be in the user guidance not development guidelines. If we want people to install from R universe instead of GitHub, it should be the instructions on the readme. I do agree that a badge for the R universe presence would be great.

We already have a note in the handbook for using devtools::load_all() here.

kellijohnson-NOAA pushed a commit that referenced this issue Jun 21, 2024
Clearly define user versus developer install instructions and move
developer instructions from NOAA-FIMS/FIMS/README to the collaborative
workflow in the developers section. In exchange for adding how to install
from R-universe on the same readme as these instructions do not require
compiling. Many breadcrumbs were left in the workflow explaining where
users and developers can find relevant information for install and
codespaces.

All work was done by @k-doering-NOAA with suggestions from
@kellijohnson-NOAA and @iantaylor-NOAA.

Close #122
Close #98
Close #93
Close #117
kellijohnson-NOAA pushed a commit to NOAA-FIMS/FIMS that referenced this issue Jun 21, 2024
For users and developers, where the information for the latter was
moved to the collaborative workflow see
NOAA-FIMS/collaborative_workflow#146.

A badge for R-universe was placed in the list of all badges!

Work was done by @k-doering-NOAA with suggestions by @kellijohnson-NOAA

Part of NOAA-FIMS/collaborative_workflow#98
kellijohnson-NOAA pushed a commit to NOAA-FIMS/FIMS that referenced this issue Jun 21, 2024
For users and developers, where the information for the latter was
moved to the collaborative workflow see
NOAA-FIMS/collaborative_workflow#146.

A badge for R-universe was placed in the list of all badges!

Work was done by @k-doering-NOAA with suggestions by @kellijohnson-NOAA

Part of NOAA-FIMS/collaborative_workflow#98
@kellijohnson-NOAA
Copy link
Collaborator

We should NOT use devtools::load_all() for FIMS ever. It leads to an unclean space and things going out of scope. Thanks to @msupernaw finding this explanation of shims, which is causing the problem.

load_all() also inserts shim functions into the imports environment of the loaded package. It presently adds a replacement version of system.file which returns different paths from base::system.file. This is needed because installed and uninstalled package sources have different directory structures. Note that this is not a perfect replacement for base::system.file.

All guidance regarding the use of load_all() needs to be removed from the collaborative workflow and a warning that it should not be used should be explicitly included somewhere.

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

No branches or pull requests

5 participants