Skip to content

Commit

Permalink
Update model/validate call to accept dataset_scope
Browse files Browse the repository at this point in the history
  • Loading branch information
afwillia committed Oct 2, 2024
1 parent 5230938 commit f30212f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions R/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
access_token,
asset_view = NULL,
json_str = NULL,
data_model_labels = "class_label") {
data_model_labels = "class_label",
dataset_scope = NULL) {

flattenbody <- function(x) {
# A form/query can only have one value per name, so take
Expand Down Expand Up @@ -175,7 +176,8 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
restrict_rules=restrict_rules,
project_scope = project_scope,
data_model_labels = data_model_labels,
asset_view = asset_view
asset_view = asset_view,
dataset_scope = dataset_scope
) |>
httr2::req_body_multipart(file_name=curl::form_file(file_name)) |>
httr2::req_perform()
Expand All @@ -191,7 +193,8 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
project_scope = project_scope,
asset_view = asset_view,
data_model_labels = data_model_labels,
json_str = json_str
json_str = json_str,
dataset_scope = dataset_scope
) |>
#httr2::req_retry(
# max_tries = 3,
Expand Down
9 changes: 6 additions & 3 deletions functions/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
access_token,
asset_view = NULL,
json_str = NULL,
data_model_labels = "class_label") {
data_model_labels = "class_label",
dataset_scope = NULL) {

flattenbody <- function(x) {
# A form/query can only have one value per name, so take
Expand Down Expand Up @@ -175,7 +176,8 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
restrict_rules=restrict_rules,
project_scope = project_scope,
data_model_labels = data_model_labels,
asset_view = asset_view
asset_view = asset_view,
dataset_scope = dataset_scope
) |>
httr2::req_body_multipart(file_name=curl::form_file(file_name)) |>
httr2::req_perform()
Expand All @@ -191,7 +193,8 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
project_scope = project_scope,
asset_view = asset_view,
data_model_labels = data_model_labels,
json_str = json_str
json_str = json_str,
dataset_scope = dataset_scope
) |>
#httr2::req_retry(
# max_tries = 3,
Expand Down

0 comments on commit f30212f

Please sign in to comment.