Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v24.5.1 #598

Merged
merged 99 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
67c721c
WIP: add data compliance dashboard back to UI and uncomment the serve…
afwillia Feb 8, 2024
6c36b42
Add dashboard after selecting data type
afwillia Feb 8, 2024
5cc0b81
use schema name instead of direct input to label dashboard
afwillia Feb 8, 2024
6c5d77a
Update schematic REST API functions
afwillia Feb 8, 2024
b1f185a
Update dashboard functions for updated schematic REST API
afwillia Feb 8, 2024
2405502
WIP: update dashboard for schematic API changes
afwillia Feb 8, 2024
dbb528e
Pass schema name to dashboard without ()
afwillia Feb 9, 2024
8a58ba6
Move json_str logic inside an if/else statement
afwillia Feb 9, 2024
9f4e0d4
specify encoding as UTF-8 in manifest download to silence a message.
afwillia Feb 9, 2024
4e01075
Add waiter
afwillia Feb 9, 2024
a537def
WIP: Update validation endpoint for dashboard
afwillia Feb 9, 2024
acab7d4
Write manifest to temp file and send in body of validation request.
afwillia Feb 9, 2024
a49c885
Remove commented code
afwillia Feb 9, 2024
2d96ba3
Hide dashboard by default and show if use_compliance_dashboard env va…
afwillia Feb 12, 2024
4f7370d
Add a js message to enable dashboard based on dcc config.
afwillia Feb 13, 2024
05f103e
update rlang
afwillia Feb 14, 2024
9c48fea
use httr2 to perform syn get with retries
afwillia Feb 14, 2024
6f6bdf2
use httr2 to perform manifest download with retries
afwillia Feb 14, 2024
549da9a
for parallel processing, use available cores minus 1
afwillia Feb 14, 2024
715a28f
download manifests in parallel
afwillia Feb 14, 2024
75a003f
add max retries to syn get and remove throttle
afwillia Feb 14, 2024
cb88371
add max retries to manifest download and remove throttle
afwillia Feb 14, 2024
f458971
run dashboard validation in parallel
afwillia Feb 14, 2024
9cbb92f
suppress column type message when reading manifests in dashboard
afwillia Feb 14, 2024
da6bcbf
Use httr2 for schematic validate and model component endpoints
afwillia Feb 15, 2024
2289448
Run dashboard validation in parallel
afwillia Feb 15, 2024
a584e92
Use anonymous function in pipe instead of _ to avoid R package build …
afwillia Feb 16, 2024
f0446dd
Add test output to validate function
afwillia Feb 19, 2024
8cde135
Hard code schematic endpoint in dashboard
afwillia Feb 19, 2024
8a867fa
Add messaging to validation function. Run serially.
afwillia Feb 19, 2024
bd6cafa
add schematic and venv to Rbuildignore
afwillia Feb 19, 2024
c33b0c3
remove debugging messages from manifest_validate
afwillia Feb 19, 2024
1083faa
Add httr2 to renv.lock
afwillia Feb 19, 2024
64fd3a4
Use mclapply with 1 core for validate
afwillia Feb 19, 2024
a98cb47
Remove cat() debugging statements in dashboard
afwillia Feb 20, 2024
a654407
Use shiny-base release-1.9
afwillia Feb 20, 2024
a535183
Don't run dashboard in parallel
afwillia Feb 20, 2024
829ae32
Edit error handling for manifest download
afwillia Feb 20, 2024
94f1d21
Download manifests in parallel
afwillia Feb 20, 2024
bb54db5
Use rlang backtrace for errors
afwillia Feb 20, 2024
80115b6
Add options to one statement
afwillia Feb 20, 2024
1cfe292
Add more error handling to model_component_requirements
afwillia Feb 20, 2024
4060509
Remove error handling from API wrapper functions, put in other functions
afwillia Feb 20, 2024
3e28afb
Update how validate and component manifest return errors
afwillia Feb 21, 2024
25d9056
Update how dashboard handles missing validation errors
afwillia Feb 21, 2024
20ea386
Update synapse get api call with httr2
afwillia Feb 21, 2024
f4a2ad0
Loop through unique parentIDs in manifest fileview, in case of duplic…
afwillia Feb 22, 2024
a3d937f
Add throttling to validation and manifest download
afwillia Feb 26, 2024
bfbabec
add endpoint for downloading an asset view
afwillia Feb 26, 2024
fcfd7a7
limit the file view query in dashboard
afwillia Feb 26, 2024
4bcfca9
remove throttling from table get
afwillia Feb 27, 2024
4b38506
Merge branch 'develop' into FDS-1632-dashboard
afwillia Feb 27, 2024
2a4e371
Resolve merge conflicts from dev data_model_labels PR-589
afwillia Mar 4, 2024
0e87fd7
Remove extra closing brackets from the last merge.
afwillia Mar 4, 2024
9360ea8
Merge pull request #586 from Sage-Bionetworks/FDS-1632-dashboard
afwillia Mar 4, 2024
8e79740
Add data_model_labels parameter to template config functions
afwillia Mar 4, 2024
54aef64
Pass data_model_labels to get_display_names
afwillia Mar 4, 2024
9e3c689
Instead of raw google sheet URL, display link as metadata type, proje…
afwillia Mar 6, 2024
0b5fd50
Add trivy container scan to end of docker build workflow
afwillia Mar 6, 2024
bae7d0c
Fix bug where app errors after selecting an asset view and project th…
afwillia Mar 6, 2024
78b9df6
show empty folder warning when downloading templates.
afwillia Mar 6, 2024
82f1062
Show warning message for folders that don't contain any files when do…
afwillia Mar 6, 2024
b20010c
Merge pull request #591 from Sage-Bionetworks/FDS-1275-data-model-lab…
afwillia Mar 6, 2024
2e8eed2
Merge branch 'develop' into FDS-1024-clean-google-sheet-url
afwillia Mar 6, 2024
24d91e8
Merge branch 'develop' into FDS-505-empty-folder-warning
afwillia Mar 6, 2024
995b057
Merge branch 'develop' into FDS-1723-fix-asset-view-selection
afwillia Mar 6, 2024
b7d2275
Use the docker image label instead of git tag to reference the contai…
afwillia Mar 6, 2024
8b54f65
Workflow is failing because trivy can't find image. Try adding github…
afwillia Mar 6, 2024
b684f1e
Trivy image scan is case sensitive, set image path to lowercase
afwillia Mar 6, 2024
cd71ff5
give step a name and fix id
afwillia Mar 6, 2024
a108105
Merge branch 'develop' into FDS-1590-container-scan
afwillia Mar 6, 2024
40c6fb8
Remove exit code for containers that have vulnerabilities, since thes…
afwillia Mar 6, 2024
fce3d3f
Merge branch 'FDS-1590-container-scan' of https://github.com/Sage-Bio…
afwillia Mar 6, 2024
57309a8
Update sage logo
afwillia Mar 6, 2024
9cd8a2d
Remove unused logos
afwillia Mar 6, 2024
4039e50
change default logo
afwillia Mar 6, 2024
fcf4348
Merge pull request #592 from Sage-Bionetworks/FDS-1723-fix-asset-view…
afwillia Mar 12, 2024
888397e
Merge branch 'develop' into FDS-1024-clean-google-sheet-url
afwillia Mar 12, 2024
27f2560
Merge pull request #594 from Sage-Bionetworks/FDS-1024-clean-google-s…
afwillia Mar 12, 2024
6a8e35c
Merge branch 'develop' into FDS-1590-container-scan
afwillia Mar 12, 2024
fdf118b
Merge branch 'develop' into FDS-1747-sage-logo
afwillia Mar 12, 2024
0263e69
Merge branch 'develop' into FDS-505-empty-folder-warning
afwillia Mar 12, 2024
bca6f87
Add warning pop up when selected folder does not have any files and t…
afwillia Mar 15, 2024
50eb407
Merge branch 'FDS-505-empty-folder-warning' of https://github.com/Sag…
afwillia Mar 15, 2024
552a65b
Merge pull request #596 from Sage-Bionetworks/FDS-1747-sage-logo
afwillia Mar 15, 2024
bfb31b1
Merge branch 'develop' into FDS-1590-container-scan
afwillia Mar 15, 2024
492465b
Merge pull request #595 from Sage-Bionetworks/FDS-1590-container-scan
afwillia Mar 15, 2024
6614383
Merge branch 'develop' into FDS-505-empty-folder-warning
afwillia Mar 15, 2024
e0d1042
Display empty folder warning immediately after selecting a file-based…
afwillia Mar 15, 2024
5d608a8
Merge branch 'FDS-505-empty-folder-warning' of https://github.com/Sag…
afwillia Mar 15, 2024
0db2674
move empty folder warning to template selection screen
afwillia Mar 15, 2024
42a44f5
Instead of popup, warn users about empty folder with a message under …
afwillia Mar 15, 2024
049d79d
remove commented-out template selection observers
afwillia Mar 15, 2024
a2ca2d9
Merge pull request #593 from Sage-Bionetworks/FDS-505-empty-folder-wa…
afwillia Mar 15, 2024
b374e66
add upload_file_annotaiton param
lakikowolfe Apr 9, 2024
cf32b96
document
lakikowolfe Apr 9, 2024
2185105
add file_annotations_upload to model/submit function calls
lakikowolfe Apr 9, 2024
4de36bd
Merge branch 'develop' into fds-1852-upload-file-annotations
lakikowolfe May 14, 2024
acc8e63
Merge pull request #597 from Sage-Bionetworks/fds-1852-upload-file-an…
afwillia May 14, 2024
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
Prev Previous commit
Next Next commit
Remove commented code
  • Loading branch information
afwillia committed Feb 9, 2024
commit a49c88546ed3766a641525d6954136bbe9cb2cb1
42 changes: 3 additions & 39 deletions R/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,6 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
asset_view = asset_view)),
body=list(file_name=httr::upload_file(file_name))
)
# req <- httr2::request(url) |>
# httr2::req_method("POST") |>
# httr2::req_error(is_error = \(resp) httr2::resp_status(resp) == 510)
# resp <- req |>
# httr2::req_headers(
# Authorization = sprintf("Bearer %s", access_token)
# ) |>
# httr2::req_url_query(
# schema_url=schema_url,
# data_type=data_type,
# restrict_rules=restrict_rules,
# project_scope = project_scope,
# asset_view = asset_view
# ) |>
# httr2::req_body_file(file_name) |>
# httr2::req_perform()
} else {
req <- httr::POST(url,
httr::add_headers(Authorization = sprintf("Bearer %s", access_token)),
Expand All @@ -179,27 +163,9 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
asset_view = asset_view,
json_str = json_str))
)
# req <- httr2::request(url) |>
# httr2::req_method("POST") |>
# httr2::req_error(is_error = \(resp) httr2::resp_status(resp) == 510)
# resp <- req |>
# httr2::req_headers(
# Authorization = sprintf("Bearer %s", access_token)
# ) |>
# httr2::req_url_query(
# schema_url=schema_url,
# data_type=data_type,
# restrict_rules=restrict_rules,
# project_scope = project_scope,
# asset_view = asset_view,
# json_str = json_str
# ) |>
# httr2::req_perform()

}

# Format server error in a way validationResult can handle
#if (httr2::resp_is_error(resp)) {
if (httr::http_error(req)) {
return(
list(
Expand All @@ -214,11 +180,9 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
)
)
}
#httr2::resp_body_json(resp)
httr::content(req)
# check_success(req)
#annotation_status <- httr::content(req)
#annotation_status
check_success(req)
annotation_status <- httr::content(req)
annotation_status
}


Expand Down
42 changes: 3 additions & 39 deletions functions/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,6 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
asset_view = asset_view)),
body=list(file_name=httr::upload_file(file_name))
)
# req <- httr2::request(url) |>
# httr2::req_method("POST") |>
# httr2::req_error(is_error = \(resp) httr2::resp_status(resp) == 510)
# resp <- req |>
# httr2::req_headers(
# Authorization = sprintf("Bearer %s", access_token)
# ) |>
# httr2::req_url_query(
# schema_url=schema_url,
# data_type=data_type,
# restrict_rules=restrict_rules,
# project_scope = project_scope,
# asset_view = asset_view
# ) |>
# httr2::req_body_file(file_name) |>
# httr2::req_perform()
} else {
req <- httr::POST(url,
httr::add_headers(Authorization = sprintf("Bearer %s", access_token)),
Expand All @@ -179,27 +163,9 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
asset_view = asset_view,
json_str = json_str))
)
# req <- httr2::request(url) |>
# httr2::req_method("POST") |>
# httr2::req_error(is_error = \(resp) httr2::resp_status(resp) == 510)
# resp <- req |>
# httr2::req_headers(
# Authorization = sprintf("Bearer %s", access_token)
# ) |>
# httr2::req_url_query(
# schema_url=schema_url,
# data_type=data_type,
# restrict_rules=restrict_rules,
# project_scope = project_scope,
# asset_view = asset_view,
# json_str = json_str
# ) |>
# httr2::req_perform()

}

# Format server error in a way validationResult can handle
#if (httr2::resp_is_error(resp)) {
if (httr::http_error(req)) {
return(
list(
Expand All @@ -214,11 +180,9 @@ manifest_validate <- function(url="http://localhost:3001/v1/model/validate",
)
)
}
#httr2::resp_body_json(resp)
httr::content(req)
# check_success(req)
#annotation_status <- httr::content(req)
#annotation_status
check_success(req)
annotation_status <- httr::content(req)
annotation_status
}


Expand Down