ropensci / git2r

R bindings to the libgit2 library
https://docs.ropensci.org/git2r
GNU General Public License v2.0
216 stars 58 forks source link

Skip ggplot2 dependency #75

Closed gaborcsardi closed 10 years ago

gaborcsardi commented 10 years ago

This is just something to think about. I think it might be worth separating plotting related functions to another package. ggplot2 has a lot of dependencies, which also makes installing git2r a "heavy" operation.

R packages tend to be heavy, and include a lot of loosely related functionality. I think this is a bad thing for maintenance, and it is better to have lighter packages.

karthik commented 10 years ago

Agreed. Perhaps we could move it to suggests?

gaborcsardi commented 10 years ago

Suggests is specifically for packages that you need to R CMD check and/or for running the examples and the vignettes, so personally I would not even include it there.

karthik commented 10 years ago

Good point. So do away with the S3 methods we have altogether? I find commits by week/month really useful. It would be nice to have it as an add on feature that doesn't burden the main package with too many dependencies.

gaborcsardi commented 10 years ago

You have a better understanding of the package, I am not sure what belongs to the plotting functionality. A just looked quickly, and it seemed that the stuff in plot.r could go to another package, and then you do not need the ggplot2 dependency.

But I understand that there might be other opinions about this, and I don't think leaving it as it is is a bad decision.

krlmlr commented 10 years ago

How about Enhances: ggplot2? Not strictly correct, but probably the closest match to Debian's "Recommended:".

gaborcsardi commented 10 years ago

Well, I think Enhances is also misleading. What we would need is something like Debian's Suggests (or, as you say, Recommends), but R's Suggests means something else....

krlmlr commented 10 years ago

For Debian, I keep mixing up "Suggests" and "Recommends", too.

From the docs:

Finally, the ‘Enhances’ field lists packages “enhanced” by the package at hand, e.g., by providing methods for classes from these packages, or ways to handle objects from these packages ...

I think that's pretty much what autoplot does...

gaborcsardi commented 10 years ago

Exactly. It seems good for autoplot, but I would not say that git2r enhances or even Enhances ggplot2. It just uses ggplot2 for plotting, really. So the Imports is fine, and the other option would be to put it in another package.

stewid commented 10 years ago

@gaborcsardi I think it's a very good suggestion to drop the ggplot2 dependency to facilitate maintenance and focus on the core functionality. I second the idea of creating another package for visualization of a git repository. I'll add an issue to drop ggplot2.

karthik commented 10 years ago

What should we call this helper package? git2rextras?

gaborcsardi commented 10 years ago

I would be more specific and call it or something that refers to visualization or plotting, like gitviz (not a very good name, though).

To me git2extras a bit sounds like a package that contains a lot of random git related stuff. (I am not saying that it would necessarily.)

karthik commented 10 years ago

Having something like git2rextras allows us to move all non-essential functionality into that package. Right now it's only the viz routines but if there are other enhancements, it protects core users from extraneous stuff but allows others to benefit by installing this one.

stewid commented 10 years ago

No need to add another issue, since this is the issue...

I think git2rextras is to long

karthik commented 10 years ago

That was just a suggestion. I am not pushing for it.

gaborcsardi commented 10 years ago

@karthik: still, I think being more specific is better, git2extras is too loose for me.

If it turns out that you want to build a database engine on top of git, that would go in a gitdb package, not into gitextras.

stewid commented 10 years ago

How about combining git and graphics - gig

karthik commented 10 years ago

agreed

karthik commented 10 years ago

fine by me. Shall I start a new repo and start moving stuff over?

gaborcsardi commented 10 years ago

I think gig is a good name, although it is hard to guess that it is related to git. Hot about ggit?

karthik commented 10 years ago

:+1: for ggit

stewid commented 10 years ago

:+1: for ggit

@karthik please start a new repo and drop ggplot2 from git2r

stewid commented 10 years ago

Btw @gaborcsardi I'm working on a database engine on top of git2r using the Xapian search engine https://github.com/stewid/gix

gaborcsardi commented 10 years ago

@stewid Cool.

karthik commented 10 years ago

@stewid Done https://github.com/ropensci/ggit I'll start moving the ggplot stuff out of git2r.

stewid commented 10 years ago

@karthik I have moved the plot code from git2r to ggit. We need to add a couple of files to ggit to make it a working package.

stewid commented 9 years ago

Have implemented the plot method with base plot.

repo <- repository("git2r")
plot(repo)

image