Skip to content

Commit

Permalink
Merge pull request #597 from Sage-Bionetworks/fds-1852-upload-file-an…
Browse files Browse the repository at this point in the history
…notations

Fds 1852 add file_annotations_upload to model/submit
  • Loading branch information
afwillia authored May 14, 2024
2 parents a2ca2d9 + 4de36bd commit acc8e63
Show file tree
Hide file tree
Showing 18 changed files with 238 additions and 35 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Authors: Rongrong Chai, Xengie Doan, Milen Nikolov, Sujay Patil, Robert Allaway,
License: file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Imports: httr, dplyr, jsonlite, shinyjs, yaml, promises, readr
Suggests:
covr
20 changes: 16 additions & 4 deletions R/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,18 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
#' @param schema_url URL to a schema jsonld
#' @param data_type Type of dataset
#' @param dataset_id Synapse ID of existing manifest
#' @param access_token Synapse login cookie, PAT, or API key.
#' @param csv_file Filepath of csv to validate
#' @param restrict_rules Default = FALSE
#' @param access_token Synapse login cookie, PAT, or API key
#' @param json_str Json string to submit
#' @param asset_view Synapse fileview
#' @param manifest_record_type Default = "table_and_file"
#' @param file_name Name of file
#' @param table_manipulation Default = "replace"
#' @param hide_blanks Default = FALSE
#' @param table_column_names Default = "class_and_label"
#' @param annotation_keys Default = "class_and_label"
#' @param data_model_labels Default = "class_and_label"
#' @param upload_file_annotations Default = TRUE
#'
#' @returns TRUE if successful upload or validate errors if not.
#' @export
Expand All @@ -240,7 +250,8 @@ model_submit <- function(url="http://localhost:3001/v1/model/submit",
hide_blanks=FALSE,
table_column_names="class_label",
annotation_keys="class_label",
data_model_labels="class_label") {
data_model_labels="class_label",
file_annotations_upload=TRUE) {
req <- httr::POST(url,
httr::add_headers(Authorization = sprintf("Bearer %s", access_token)),
query=list(
Expand All @@ -255,7 +266,8 @@ model_submit <- function(url="http://localhost:3001/v1/model/submit",
table_column_names=table_column_names,
annotation_keys=annotation_keys,
data_model_labels=data_model_labels,
hide_blanks=hide_blanks),
hide_blanks=hide_blanks,
file_annotations_upload=file_annotations_upload),
body=list(file_name=httr::upload_file(file_name))
#body=list(file_name=file_name)
)
Expand Down
4 changes: 2 additions & 2 deletions man/get_asset_view_table.Rd

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

20 changes: 20 additions & 0 deletions man/get_synapse_table_names.Rd

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

13 changes: 7 additions & 6 deletions man/manifest_generate.Rd

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

5 changes: 3 additions & 2 deletions man/manifest_populate.Rd

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

12 changes: 8 additions & 4 deletions man/manifest_validate.Rd

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

3 changes: 2 additions & 1 deletion man/model_component_requirements.Rd

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

41 changes: 34 additions & 7 deletions man/model_submit.Rd

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

4 changes: 2 additions & 2 deletions man/storage_dataset_files.Rd

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

4 changes: 2 additions & 2 deletions man/storage_project_datasets.Rd

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

4 changes: 2 additions & 2 deletions man/storage_projects.Rd

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

22 changes: 22 additions & 0 deletions man/synapse_download_file_handle.Rd

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

42 changes: 42 additions & 0 deletions man/synapse_entity_children.Rd

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

22 changes: 22 additions & 0 deletions man/synapse_get_project_scope.Rd

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

22 changes: 22 additions & 0 deletions man/synapse_projects_user.Rd

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

Loading

0 comments on commit acc8e63

Please sign in to comment.