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

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

@lianos
Copy link

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
Copy link
Author

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
Copy link
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
Copy link
Contributor

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
Copy link
Member

hadley commented Feb 23, 2012

I wonder if we also need an install_rforge function.

@jlehtoma
Copy link

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
Copy link
Member

hadley commented Apr 18, 2012

Anyone have any repos I can test this on?

@jlehtoma
Copy link

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 as completed 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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants