Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
4 of 32 committers (12.5%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
R bindings to the libgit2 library
Basic Info
- Host: GitHub
- Owner: ropensci
- License: gpl-2.0
- Language: R
- Default Branch: main
- Homepage: https://docs.ropensci.org/git2r
- Size: 11.5 MB
Statistics
- Stars: 218
- Watchers: 9
- Forks: 61
- Open Issues: 96
- Releases: 32
Topics
Metadata Files
README.md
Introduction
The git2r package gives you programmatic access to Git repositories
from R. Internally the package uses the libgit2 library which is a
pure C implementation of the Git core methods. For more information
about libgit2, check out libgit2's website
(http://libgit2.github.com).
Suggestions, bugs, forks and pull requests are appreciated. Get in touch.
Installation
To install the version available on CRAN:
coffee
install.packages("git2r")
To install the development version of git2r, it's easiest to use the
devtools package:
```coffee
install.packages("remotes")
library(remotes) install_github("ropensci/git2r") ```
Usage
Repository
The central object in the git2r package is the S3 class
git_repository. The following three methods can instantiate a
repository; init, repository and clone.
Create a new repository
Create a new repository in a temporary directory using init
coffee
library(git2r)
```
> Loading required package: methods
```
```coffee
Create a temporary directory to hold the repository
path <- tempfile(pattern="git2r-") dir.create(path)
Initialize the repository
repo <- init(path)
Display a brief summary of the new repository
repo ```
```
> Local: /tmp/Rtmp7CXPlx/git2r-1ae2305c0e8d/
> Head: nothing commited (yet)
```
```coffee
Check if repository is bare
is_bare(repo) ```
```
> [1] FALSE
```
```coffee
Check if repository is empty
is_empty(repo) ```
```
> [1] TRUE
```
Create a new bare repository
```coffee
Create a temporary directory to hold the repository
path <- tempfile(pattern="git2r-") dir.create(path)
Initialize the repository
repo <- init(path, bare=TRUE)
Check if repository is bare
is_bare(repo) ```
```
> [1] TRUE
```
Clone a repository
```coffee
Create a temporary directory to hold the repository
path <- file.path(tempfile(pattern="git2r-"), "git2r") dir.create(path, recursive=TRUE)
Clone the git2r repository
repo <- clone("https://github.com/ropensci/git2r", path) ```
```
> cloning into '/tmp/Rtmp7CXPlx/git2r-1ae27d811539/git2r'...
> Receiving objects: 1% (24/2329), 12 kb
> Receiving objects: 11% (257/2329), 60 kb
> Receiving objects: 21% (490/2329), 100 kb
> Receiving objects: 31% (722/2329), 125 kb
> Receiving objects: 41% (955/2329), 237 kb
> Receiving objects: 51% (1188/2329), 574 kb
> Receiving objects: 61% (1421/2329), 1014 kb
> Receiving objects: 71% (1654/2329), 1350 kb
> Receiving objects: 81% (1887/2329), 1733 kb
> Receiving objects: 91% (2120/2329), 2614 kb
> Receiving objects: 100% (2329/2329), 2641 kb, done.
```
```coffee
Summary of repository
summary(repo) ```
```
> Remote: @ origin (https://github.com/ropensci/git2r)
> Local: master /tmp/Rtmp7CXPlx/git2r-1ae27d811539/git2r/
>
> Branches: 1
> Tags: 0
> Commits: 320
> Contributors: 3
> Ignored files: 0
> Untracked files: 0
> Unstaged files: 0
> Staged files: 0
```
```coffee
List all references in repository
references(repo) ```
```
> $refs/heads/master
> [6fb440] master
>
> $refs/remotes/origin/master
> [6fb440] origin/master
```
```coffee
List all branches in repository
branches(repo) ```
```
> [[1]]
> 6fb440 (HEAD) master
>
> [[2]]
> 6fb440 master
```
Open an existing repository
```coffee
Open an existing repository
repo <- repository(path)
Workdir of repository
workdir(repo) ```
```
> [1] "/tmp/Rtmp7CXPlx/git2r-1ae27d811539/git2r/"
```
```coffee
List all commits in repository
commits(repo)[[1]] # Truncated here for readability ```
```
> Commit: 6fb440133765e80649de8d714eaea17b114bd0a7
> Author: Stefan Widgren stefan.widgren@gmail.com
> When: 2014-04-22 21:43:19
> Summary: Fixed clone progress to end line with newline
```
```coffee
Get HEAD of repository
repository_head(repo) ```
```
> 6fb440 (HEAD) master
```
```coffee
Check if HEAD is head
ishead(repositoryhead(repo)) ```
```
> [1] TRUE
```
```coffee
Check if HEAD is local
islocal(repositoryhead(repo)) ```
```
> [1] TRUE
```
```coffee
List all tags in repository
tags(repo) ```
```
> list()
```
Configuration
```coffee config(repo, user.name="Git2r Readme", user.email="git2r.readme@example.org")
Display configuration
config(repo) ```
```
> global:
> core.autocrlf=input
> local:
> branch.master.merge=refs/heads/master
> branch.master.remote=origin
> core.bare=false
> core.filemode=true
> core.logallrefupdates=true
> core.repositoryformatversion=0
> remote.origin.fetch=+refs/heads/:refs/remotes/origin/
> remote.origin.url=https://github.com/ropensci/git2r
> user.email=git2r.readme@example.org
> user.name=Git2r Readme
```
Commit
```coffee
Create a new file
writeLines("Hello world!", file.path(path, "test.txt"))
Add file and commit
add(repo, "test.txt") commit(repo, "Commit message") ```
```
> Commit: 0a6af48cedf43208bde34230662280514e0956eb
> Author: Git2r Readme git2r.readme@example.org
> When: 2014-04-22 21:44:57
> Summary: Commit message
```
License
The git2r package is licensed under the GPLv2.
Owner
- Name: rOpenSci
- Login: ropensci
- Kind: organization
- Email: info@ropensci.org
- Location: Berkeley, CA
- Website: https://ropensci.org/
- Twitter: rOpenSci
- Repositories: 307
- Profile: https://github.com/ropensci
GitHub Events
Total
- Create event: 2
- Issues event: 6
- Release event: 2
- Watch event: 5
- Issue comment event: 16
- Push event: 26
- Pull request event: 7
- Fork event: 4
Last Year
- Create event: 2
- Issues event: 6
- Release event: 2
- Watch event: 5
- Issue comment event: 16
- Push event: 26
- Pull request event: 7
- Fork event: 4
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Stefan Widgren | s****n@g****m | 2,569 |
| Karthik Ram | k****m@g****m | 34 |
| Jeroen Ooms | j****s@g****m | 16 |
| John Blischak | j****k@g****m | 13 |
| Gregory Jefferis | j****s@g****m | 11 |
| Elliott Sales de Andrade | q****t@g****m | 10 |
| jennybc | j****y@s****a | 6 |
| Jim Hester | j****r@g****m | 4 |
| Scott Chamberlain | m****s@g****m | 4 |
| Gabor Csardi | c****r@g****m | 3 |
| Thierry Onkelinx | T****O | 3 |
| Christophe Dervieux | c****x@g****m | 2 |
| Peter Meissner | r****r@g****m | 2 |
| Thomas Rosendal | t****l@s****e | 2 |
| Bernie Gray | b****3@g****m | 1 |
| Arni Magnusson | a****a@h****s | 1 |
| Stefan Widgren | s****n@s****) | 1 |
| Sander Maijers | S****s@g****m | 1 |
| Kirill Müller | k****r@i****h | 1 |
| Felipe Balbi | b****i@t****m | 1 |
| Dean Attali | d****n@a****m | 1 |
| Elias Pipping | e****g@f****e | 1 |
| Gregor Lichtner | 3****r | 1 |
| Ian Lyttle | i****e@s****m | 1 |
| Kirill Müller | k****r@m****g | 1 |
| Peter Carbonetto | p****o@g****m | 1 |
| Pierrick Roger | p****r@i****m | 1 |
| Tim D. Smith | g****t@t****s | 1 |
| Tomas Kalibera | k****a | 1 |
| aoles | a****s@g****m | 1 |
| and 2 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 107
- Total pull requests: 26
- Average time to close issues: 5 months
- Average time to close pull requests: 9 days
- Total issue authors: 84
- Total pull request authors: 13
- Average comments per issue: 3.13
- Average comments per pull request: 2.54
- Merged pull requests: 19
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 5
- Pull requests: 7
- Average time to close issues: 7 days
- Average time to close pull requests: 3 days
- Issue authors: 5
- Pull request authors: 3
- Average comments per issue: 2.2
- Average comments per pull request: 0.71
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jdblischak (12)
- ThierryO (5)
- jennybc (3)
- JiaxiangBU (2)
- tdhock (2)
- pat-s (2)
- yli110-stat697 (2)
- rtaph (2)
- ignatenkobrain (1)
- p-phillips (1)
- Miachol (1)
- salim-b (1)
- dave-lovell (1)
- yjqiu (1)
- fenguoerbian (1)
Pull Request Authors
- jdblischak (6)
- glichtner (4)
- stewid (3)
- AleKoure (2)
- cderv (2)
- pkrog (2)
- kalibera (2)
- ThierryO (2)
- benmarwick (1)
- anniew (1)
- daattali (1)
- pcarbo (1)
- jeroen (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- cran 38,833 last-month
- Total docker downloads: 557,412
-
Total dependent packages: 55
(may contain duplicates) -
Total dependent repositories: 465
(may contain duplicates) - Total versions: 73
- Total maintainers: 1
cran.r-project.org: git2r
Provides Access to Git Repositories
- Homepage: https://docs.ropensci.org/git2r/
- Documentation: http://cran.r-project.org/web/packages/git2r/git2r.pdf
- License: GPL-2
-
Latest release: 0.36.2
published 11 months ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/ropensci/git2r
- Documentation: https://pkg.go.dev/github.com/ropensci/git2r#section-documentation
- License: gpl-2.0
-
Latest release: v0.36.2
published 11 months ago
Rankings
conda-forge.org: r-git2r
- Homepage: https://docs.ropensci.org/git2r/
- License: GPL-2.0-only
-
Latest release: 0.30.1
published almost 4 years ago
Rankings
Dependencies
- R >= 3.4 depends
- graphics * imports
- utils * imports
- getPass * suggests
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/check-r-package v1 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- r-lib/actions/setup-r-dependencies v1 composite
