Skip to content

Commit

Permalink
remove gh dependency, replace by curl & jsonlite
Browse files Browse the repository at this point in the history
  • Loading branch information
richetyann committed Oct 23, 2023
1 parent a8e9041 commit f9d4408
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Description: Binding to Funz <https://funz.github.io/> parametric computing envi
Also provide function to deal with Funz setup (eg. install plugin/binding to simulation software, algorithms, ...).
License: Apache License (>= 2)
Encoding: UTF-8
Imports: rJava (>= 1.0-0), Rserve (>= 1.8), xml2, utils, foreach, parallel, processx, gh
Imports: rJava (>= 1.0-0), Rserve (>= 1.8), xml2, utils, foreach, parallel, processx, curl, jsonlite
SystemRequirements: Java (>= 8)
URL: https://github.com/Funz/Funz.R
RoxygenNote: 7.2.3
6 changes: 4 additions & 2 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ installed.Models <- function() {
#' }
available.Models <- function(refresh_repo = F) {
if (refresh_repo | any(is.na(.github_repos)))
.github_repos <- gh::gh("/orgs/Funz/repos",.token=NA, per_page=100)
.github_repos <- jsonlite::fromJSON(readLines(curl::curl("https://api.github.com/orgs/Funz/repos?per_page=100")))
# not working behind some proxy: gh::gh("/orgs/Funz/repos",.token=NA, per_page=100)

gsub("plugin-","",
unlist(lapply(.github_repos,
Expand Down Expand Up @@ -270,7 +271,8 @@ installed.Designs <- function() {
#' }
available.Designs <- function(refresh_repo = F) {
if (refresh_repo | any(is.na(.github_repos)))
.github_repos <- gh::gh("/orgs/Funz/repos",.token=NA, per_page=100)
.github_repos <- jsonlite::fromJSON(readLines(curl::curl("https://api.github.com/orgs/Funz/repos?per_page=100")))
# not working behind some proxy: gh::gh("/orgs/Funz/repos",.token=NA, per_page=100)

gsub("algorithm-","",
unlist(lapply(.github_repos,
Expand Down

0 comments on commit f9d4408

Please sign in to comment.