Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/RTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
cache: false
working-directory: ./client-api_r/generated
- name: Install Rsirius
- name: Install RSirius
id: rsirius_install
run: |
install.packages("/home/runner/work/sirius-client-openAPI/sirius-client-openAPI/client-api_r/generated", repos = NULL, type = "source")
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Login to SIRIUS
id: login
run: |
library(Rsirius)
library(RSirius)
var_accept_terms <- TRUE
var_account_credentials <- AccountCredentials$new(Sys.getenv('SIRIUS_USER'), Sys.getenv('SIRIUS_PW'))
api_instance <- rsirius_api$new()
Expand All @@ -78,72 +78,72 @@ jobs:
- name: Test Actuator API
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_actuator_api.R", reporter=multi_reporter)
shell: Rscript {0}
- name: Test Info API
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_info_api.R", reporter=multi_reporter)
shell: Rscript {0}
- name: Test Login and Account API
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_login_and_account_api.R", reporter=multi_reporter)
shell: Rscript {0}
- name: Test Projects API
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_projects_api.R", reporter=multi_reporter)
shell: Rscript {0}
- name: Test Compounds API
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_compounds_api.R", reporter=multi_reporter)
shell: Rscript {0}
- name: Test Databases API
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_searchable_databases_api.R", reporter=multi_reporter)
shell: Rscript {0}
- name: Test Features API
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_features_api.R", reporter=multi_reporter)
shell: Rscript {0}
- name: Test Jobs API
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_jobs_api.R", reporter=multi_reporter)
shell: Rscript {0}
- name: Test acceptance
if: always() && steps.api_start.outcome == 'success' && steps.rsirius_install.outcome == 'success' && steps.login.outcome == 'success'
run: |
library(Rsirius)
library(RSirius)
library(testthat)
multi_reporter = MultiReporter$new(reporters=list(SummaryReporter$new(), FailReporter$new()))
test_file("client-api_r/generated/tests/testthat/test_acceptance.R", reporter=multi_reporter)
shell: Rscript {0}
shell: Rscript {0}
2 changes: 1 addition & 1 deletion .updater/config/R/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageName" : "Rsirius",
"packageName" : "RSirius",
"generateWrapper": true,
"library": "httr2",
"hideGenerationTimestamp": true
Expand Down
20 changes: 10 additions & 10 deletions client-api_r/SiriusSDK.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ SiriusSDK <- R6::R6Class(

connect = function(url) {
self$host <- url
self$api_client <- Rsirius::ApiClient$new(self$host)
return(Rsirius::rsirius_api$new(self$api_client))
self$api_client <- RSirius::ApiClient$new(self$host)
return(RSirius::rsirius_api$new(self$api_client))
},

reconnect = function() {
if (!is.null(self$api_client) && !is.null(self$process) && self$process$is_alive()) {
return(Rsirius::rsirius_api(self$api_client))
return(RSirius::rsirius_api(self$api_client))
}
cat("Cannot reconnect, api_client and/or process are NULL or process has terminated.\n")
return(NULL)
Expand Down Expand Up @@ -105,8 +105,8 @@ SiriusSDK <- R6::R6Class(
# check if connection to API client is possible
if (!is.null(self$api_client)) {
tryCatch({
if (Rsirius::ActuatorApi$new(self$api_client)$Health()$status == "UP") {
return(Rsirius::rsirius_api$new(self$api_client))
if (RSirius::ActuatorApi$new(self$api_client)$Health()$status == "UP") {
return(RSirius::rsirius_api$new(self$api_client))
}
}, error = function(e) {
message("Found existing API Client, but could not reach API.")
Expand All @@ -119,8 +119,8 @@ SiriusSDK <- R6::R6Class(
sirius_api <- self$connect(self$host)
self$api_client <- sirius_api$api_client
tryCatch({
if (Rsirius::ActuatorApi$new(self$api_client)$Health()$status == "UP") {
return(Rsirius::rsirius_api$new(self$api_client))
if (RSirius::ActuatorApi$new(self$api_client)$Health()$status == "UP") {
return(RSirius::rsirius_api$new(self$api_client))
}
}, error = function(e) {
message("Found existing port, but could not reach API under this port.")
Expand Down Expand Up @@ -162,8 +162,8 @@ SiriusSDK <- R6::R6Class(
self$api_client <- sirius_api$api_client

tryCatch({
if (Rsirius::ActuatorApi$new(self$api_client)$Health()$status == "UP") {
return(Rsirius::rsirius_api$new(self$api_client))
if (RSirius::ActuatorApi$new(self$api_client)$Health()$status == "UP") {
return(RSirius::rsirius_api$new(self$api_client))
}
}, error = function(e) {
message("Created API client from process_id and port, but could not reach API.")
Expand Down Expand Up @@ -287,7 +287,7 @@ SiriusSDK <- R6::R6Class(
shutdown_sirius = function() {
if (!is.null(self$process)) {
tryCatch({
Rsirius::ActuatorApi$new(self$api_client)$Shutdown()
RSirius::ActuatorApi$new(self$api_client)$Shutdown()
Sys.sleep(3)
if (!self$process$is_alive()) {
cat("Sirius was shut down successfully\n")
Expand Down
2 changes: 1 addition & 1 deletion client-api_r/generated/.Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
^\.openapi-generator$
^docs$
^git_push\.sh$
^Rsirius\.Rcheck$
^RSirius\.Rcheck$
^\.\.Rcheck$
2 changes: 1 addition & 1 deletion client-api_r/generated/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: Rsirius
Package: RSirius
Title: R Package Client for SIRIUS Nightsky API
Version: 6.3.3
Author: person("OpenAPI Generator community", email = "team@openapitools.org", role = c("aut", "cre"))
Expand Down
Loading