-
Notifications
You must be signed in to change notification settings - Fork 53
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
PTV-1810 fix obj input 3 #3322
PTV-1810 fix obj input 3 #3322
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #3322 +/- ##
============================================
+ Coverage 5.62% 29.25% +23.63%
============================================
Files 496 496
Lines 50486 50512 +26
============================================
+ Hits 2841 14779 +11938
+ Misses 47645 35733 -11912
... and 326 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@@ -7,7 +7,7 @@ This is built on the Jupyter Notebook v6.4.12 and IPython 8.5.0 (more notes will | |||
## Unreleased | |||
- PTV-1875 - fix public data paging issue by removing paging from workspace data sources | |||
- UIP-28 - update Google Analytics tags to GA4 properties | |||
- PTV-1810 - address object name display issues in the View Configure tab of app cells. | |||
- PTV-1810 - address object name display issues in the View Configure tab of app cells. This now saves all app inputs as UPAs in the cell. It also includes an update to input transforms to properly convert from UPAs <-> names or references as appropriate before starting the app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
src/biokbase/narrative/app_util.py
Outdated
|
||
if is_path: | ||
return ";".join(obj_info["paths"][0]) | ||
if transform_type == "ref" or transform_type == "unresolved-ref": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it'd be marginally more readable as
if transform_type in ["ref", "unresolved-ref"]:
Probably not enough to make it worth changing.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -292,7 +292,7 @@ | |||
"widget_info": { | |||
"name": "no-display", | |||
"params": { | |||
"obj_ref": "18836/5/1", | |||
"obj_ref": "62425/2/12", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were put in place (I think) because the mocker was switching them around to the one true mock UPA.
Switching them back to the correct UPA seems to have fixed the tests.
@@ -401,7 +401,7 @@ | |||
"widget_info": { | |||
"name": "no-display", | |||
"params": { | |||
"obj_ref": "18836/5/1", | |||
"obj_ref": "62425/2/12", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing as above. The mocked upas were bleeding over into the returned test data.
num_objects = len(params.get("objects", [0])) | ||
return {"infos": infos * num_objects, "paths": paths * num_objects} | ||
paths = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjusts the mock so if a test calls get_object_info3
with an N-step reference path, like:
{"objects": [{"ref": "ws1/obj1;ws2/obj2"}]}
It returns:
{
"infos": standard mocked object info stuff,
"paths": [["1/1/1", "2/2/2", ... "N-1/N-1/N-1", "18836/5/1"]] (the mocked upa)
}
Really, this should get factored into a pytest fixture and take expected ins and outs, but that's a bigger project.
Description of PR purpose/changes
Actually go through the code to update how object inputs get matched here.
There's a few minor details and code styling yet to do on
app_util.transform_param_value
, but this is ready for GHA testing / review.The goal, as mentioned elsewhere (#3320) is to update the
transform_param_value
function to effectively take any form of object input and transform it appropriately. Previously, it was implicitly assumed that input values were always object names, and transforms were only done whentarget_type_transform
was present. Now, however, inputs can be of any format, and combinations oftarget_type_transform
are used to infer what's required.target_type_transform
not present = object name string outputtarget_type_transform
= "ref" or "unresolved-ref" = ws_name/obj_name formattarget_type_transform
= "resolved-ref" or "upa" (not officially supported, but should be) = upa / path formatTODO:
Jira Ticket / Issue
Related Jira ticket: https://kbase-jira.atlassian.net/browse/PTV-1810
DATAUP-69 Adds a PR template
)Testing Instructions
Dev Checklist:
Updating Version and Release Notes (if applicable)