Skip to content

Commit

Permalink
Update website, fix some docs. Dvidie one article into two separate f…
Browse files Browse the repository at this point in the history
…or repositories and commits.
  • Loading branch information
maciekbanas committed Jan 4, 2024
1 parent e521436 commit bd15a58
Show file tree
Hide file tree
Showing 67 changed files with 4,950 additions and 226 deletions.
8 changes: 1 addition & 7 deletions R/GitStats.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,7 @@ GitStats <- R6::R6Class("GitStats",
#' @description Wrapper over pulling repositories by phrase.
#' @param package_name A character, name of the package.
#' @param only_loading A boolean, if `TRUE` function will check only if package
#' is loaded in repositories, not used as dependencies. This is much faster
#' approach as searching usage only with loading (i.e. library(package)) is
#' based on Search APIs (one endpoint), whereas searching usage as a
#' dependency pulls text files from all repositories (many endpoints). This is
#' a good option to choose when you want to check package usage but guess that
#' it may be used mainly by loading in data scripts and not used as a
#' dependency of other packages.
#' is loaded in repositories, not used as dependencies.
pull_R_package_usage = function(package_name, only_loading = FALSE) {
if (!only_loading) {
repos_with_package_as_dependency <- private$check_R_package_as_dependency(package_name)
Expand Down
15 changes: 5 additions & 10 deletions R/gitstats_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ pull_files <- function(gitstats_obj,
return(invisible(gitstats_obj))
}

#' @title Reset GitStats settings
#' @title Reset all settings
#' @name reset
#' @description Sets all settings to default: search_param to `org`, language to
#' `All` and other to `NULL`s.
Expand Down Expand Up @@ -363,17 +363,12 @@ get_files <- function(gitstats_obj){
#' @title Check package usage across repositories
#' @name pull_R_package_usage
#' @description Wrapper over searching repositories by code blobs related to
#' using package (`library(package)`, `require(package)` and `package::`).
#' loading package (`library(package)` and `require(package)` in all files) or
#' using it as a depndency (`package` in `DESCRIPTION` and `NAMESPACE` files).
#' @param gitstats_obj A GitStats object.
#' @param package_name A character, name of the package.
#' @param only_loading A boolean, if `TRUE` function will check only if package
#' is loaded in repositories, not used as dependencies. This is much faster
#' approach as searching usage only with loading (i.e. library(package)) is
#' based on Search APIs (one endpoint), whereas searching usage as a
#' dependency pulls text files from all repositories (many endpoints). This is
#' a good option to choose when you want to check package usage but guess that
#' it may be used mainly by loading in data scripts and not used as a
#' dependency of other packages.
#' is loaded in repositories, not used as dependencies.
#' @return A table of repositories content.
#' @examples
#' \dontrun{
Expand All @@ -399,7 +394,7 @@ pull_R_package_usage <- function(
}

#' @title Get R package usage
#' @name get_files
#' @name get_R_package_usage
#' @description Retrieves list of repositories that make use of a package.
#' @param gitstats_obj A GitStats object.
#' @return A table with repo urls.
Expand Down
13 changes: 12 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@ url: ~
template:
bootstrap: 5
reference:
- title: Create and setup
- contents:
- matches("create_gitstats")
- starts_with("set_")
- starts_with("reset")
- title: Pull data
- contents:
- starts_with("pull_")
- title: Get results
- contents:
- starts_with("get_")
- starts_with("reset")
- matches("gitstats_plot")
articles:
- title: Articles
navbar: ~
contents:
- get_repository_stats
- get_commits_stats
5 changes: 3 additions & 2 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bd15a58

Please sign in to comment.