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

How do you determine which GitHub package uses name #47

Open
muschellij2 opened this issue Feb 28, 2019 · 4 comments
Open

How do you determine which GitHub package uses name #47

muschellij2 opened this issue Feb 28, 2019 · 4 comments
Labels
feature a feature request or enhancement

Comments

@muschellij2
Copy link

I love the package, but find it hard to find which overlaps exist. For example, I wanted to make sure the name adept wasn't taken, and I searched and found it on GitHub (it's the package I was working on). But to find the link to the GitHub, I needed to know which slot github was. Is there an accessor function or should I send a PR with named list elements for output of available?

res = available::available("adept", browse = FALSE)
#> Warning: 'BiocInstaller' and 'biocLite()' are deprecated, use the 'BiocManager'
#>   CRAN package instead.
res[[4]]
#> Available on GitHub:  ✖
names(res)
#> NULL
slotNames(res)
#> character(0)
names(res[[4]])
#> [1] "available" "close"
unlist(res[[4]])
#>                                    available 
#>                                      "FALSE" 
#>                               close.pkg_name 
#>                                      "adept" 
#>                                  close.title 
#> "Adaptive Empirical Pattern Transformation " 
#>                                    close.url 
#>       "https://github.com/martakarass/adept" 
#>                           close.pkg_location 
#>                          "martakarass/adept" 
#>                                close.pkg_org 
#>                                "martakarass" 
#>                               close.distance 
#>                                          "0"

Created on 2019-02-28 by the reprex package (v0.2.1)

@jimhester
Copy link
Member

It uses an API that crawls GitHub https://github.com/ropenscilabs/available/blob/57c04c32f14ade8eb72b568a434dbbe36c3c9365/R/github.R#L32

http://rpkg.gepuro.net / http://rpkg-api.gepuro.net

I don't know what heuristics it uses, likely just GItHub's repository types, so your package will likely be added to the list at some point soon.

@muschellij2
Copy link
Author

Sorry if I wasn't clear - how do you extract which repo it found on GitHub from the object returned from available::available in R? Can you extract elements from the output list object/available_query object?

@jimhester
Copy link
Member

I guess we could have a github_locations() function to pull this out, or possibly the default print method should just print the first few found by default.

@jimhester jimhester added the feature a feature request or enhancement label Apr 6, 2020
@trickytank
Copy link

You could say the number of github matches next to the cross? Would you like someone to work on a github_locations() function to print this out? I'm available (no pun intended).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants