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

Drop github dependencies under remotes #32

Open
karthik opened this issue Aug 14, 2019 · 12 comments
Open

Drop github dependencies under remotes #32

karthik opened this issue Aug 14, 2019 · 12 comments

Comments

@karthik
Copy link
Owner

karthik commented Aug 14, 2019

Currently write_compendium_description writes all dependencies together. It would be more useful to separate out remotes and imports.

@datawookie
Copy link

Hi @karthik, I've just encountered an issue like this. My DESCRIPTION file includes a couple of remotes. I had to add these by hand because they were simply included under Depends.

Depends: 
    dplyr,
    forcats,
    gganimate,
    ggplot2,
    here,
    janitor,
    lubridate,
    readr,
    scales,
    scico,
    stringr,
    tidyr,
    tidyverse
Remotes: thomasp85/patchwork,
  hrbrmstr/pluralize

However, these remotes don't seem to be added to the Docker image.

Also, if I do write_install() then they are simply listed as install.packages() entries.

Would be great to get this sorted out.

Otherwise, this is a very magical package indeed. Thank you!

Best regards, Andrew.

@karthik
Copy link
Owner Author

karthik commented Aug 15, 2019

Thanks Andrew! Yes Im aware of these issues and am sorting them out.

@karthik
Copy link
Owner Author

karthik commented Aug 20, 2019

@datawookie Thanks for this issue. I've added this feature in the most recent update. Can you give this a spin and let me know if you run into issues? thanks!

@datawookie
Copy link

@karthik I've just tried that out on my repository and it still does not include those remote libraries. You can take a look at my project here.

@karthik
Copy link
Owner Author

karthik commented Aug 20, 2019

Thank you for sharing your repo. You helped me uncover a new bug that I'm working through now.

@datawookie
Copy link

No problem. Very happy to help with debugging this. Excited to get it working.

@karthik
Copy link
Owner Author

karthik commented Sep 3, 2019

ok @datawookie! I have an update. Try this code:

cd /tmp
git clone https://github.com/datawookie/tidytuesday.git
cd tidytuesday
# Launch R
# Make sure you have a recent version of holepunch
x <- holepunch::get_dependencies(".")
rem <- lapply(x, remotes:::package2remote)
rem[[which(x == "pluralize")]]

Do you see option A

$host
[1] "api.github.com"

$package
NULL

$repo
[1] "pluralize"

$subdir
NULL

$username
[1] "hrbrmstr"

$ref
[1] "master"

$sha
[1] "1c24cd1761d2d57214c2aaeeb234c2c9b7aeba75"

$auth_token
NULL

attr(,"class")
[1] "github_remote" "remote"

or Option B?

$name
[1] "pluralize"

$repos
                      CRAN 
"https://cran.rstudio.com" 

$pkg_type
[1] "both"

$sha
[1] "0.1.0"

attr(,"class")
[1] "cran_remote" "remote"     

I am seeing A on a fresh clone. But earlier I saw B, which made it hard to detect that it was a GitHub only package. On further experimentation I am seeing B when I clone hrbrmstr/pluralize locally and install instead of using remotes::install_github. Does this also happen with you?

@datawookie
Copy link

Hi @karthik,

Glad to know that this is moving forward!

I just followed your directions and ended up with Option A. Can I assume that this was what you were hoping for? :)

Best regards,
Andrew.

@karthik
Copy link
Owner Author

karthik commented Sep 4, 2019

That's right! In that case I will call this issue resolved. Thanks for your help 😄

@karthik karthik closed this as completed Sep 4, 2019
@datawookie
Copy link

datawookie commented Sep 5, 2019

@karthik has this fix been merged into master yet? Reason I ask is that I've just tried rebuilding but still have same issues.

@karthik karthik reopened this Sep 5, 2019
@karthik
Copy link
Owner Author

karthik commented Sep 6, 2019

It works for me on version 0.1.25.9000 which is current master.

@karthik
Copy link
Owner Author

karthik commented Sep 6, 2019

A screencast of how it works for me locally: asciicast

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

2 participants