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

Enable install_github to specify a subdir of github repo to use as package root #64

Closed
lianos opened this Issue Feb 20, 2012 · 7 comments

Comments

Projects
None yet
4 participants
@lianos

lianos commented Feb 20, 2012

Currently, install_github assumes the that the repository named in the params served as the root of the R package.

Adding support for a packge that looks like so would be helpful:

+ my-uber-project
`- C/
|   + C src files that are the core of my library
`- Python/
|  +- Python language bindings
`- R/
   +- DESCRIPTION
   +- NAMESPACE
   +- R/
   +- src/
    ...

Imagine that the R subfolder of my-uber-project repository is CRAN-stallable binding/part/whatever of my-uber-project.

You can imagine calling install_github something like:

install_github('my-uber-package', 'lianos', subdir=c('R''))

Where subdir might support a character vector, eg. c('path', 'to', 'subfolder', 'with', 'R-pkg').

@lianos

This comment has been minimized.

lianos commented Feb 20, 2012

I'll take a shot at forking + provide pull request if others also find this useful -- just wanted to get some feedback on a good way to name/specify the subdir param I'm proposing.

@hadley

This comment has been minimized.

Member

hadley commented Feb 21, 2012

I'd recommend working with install_url - then all other install methods will follow natural. I think subdir is probably an ok param name.

@BrianDiggs

This comment has been minimized.

Contributor

BrianDiggs commented Feb 21, 2012

To give another example where this could be useful: R-Forge subversion repositories also have this structure: the package are not at the root of the repository, but under a pkg directory off the root.

@hadley

This comment has been minimized.

Member

hadley commented Feb 23, 2012

I wonder if we also need an install_rforge function.

@jlehtoma

This comment has been minimized.

jlehtoma commented Mar 4, 2012

@lianos we would definitely find this feature really useful! We're exactly in the situation @BrianDiggs described: maintaining the dev-version in GitHub and pushing the releases to R-Forge for Win and Mac builds. Let me know if there's anything I can do to help.

@hadley

This comment has been minimized.

Member

hadley commented Apr 18, 2012

Anyone have any repos I can test this on?

@jlehtoma

This comment has been minimized.

jlehtoma commented Apr 18, 2012

Thanks for looking into this. Here's one repo you can test with:

https://github.com/louhos/soRvi-dev/

Few notes:

  • Branch rforge-dir-structure is what is on R-forge, so ideally this would work
install_github(repo='soRvi-dev', username='louhos', branch='rforge-dir-structure', subdir='pkg')
  • master is essentially the content of pkg dir in R-Forge; this currently works with install_github
  • Our package currently has (too!) many dependencies, which may cause some trouble

@hadley hadley closed this in 8c40aa7 Apr 18, 2012

@lock lock bot locked and limited conversation to collaborators Sep 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.