Skip to content

Commit

Permalink
Minor changes to utility/troubleshooting/convenience script view-port…
Browse files Browse the repository at this point in the history
…al-object.
  • Loading branch information
dmichaels-harvard committed Aug 19, 2024
1 parent 720e68f commit 662e293
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dcicutils/scripts/view_portal_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ def get_metadata_types(path: str) -> Optional[dict]:
nonlocal portal, debug
metadata_types = {}
try:
if debug:
_print(f"Executing separted query to get actual metadata types for raw/inserts query.")
if verbose:
_print(f"Executing separted query to get actual metadata types for raw/inserts query.")
if ((response := portal.get(path)) and (response.status_code in [200, 307]) and
(response := response.json()) and (results := response.get("@graph"))): # noqa
for result in results:
Expand Down Expand Up @@ -356,6 +356,7 @@ def get_metadata_types(path: str) -> Optional[dict]:
result = prune_data(result)
if (subtypes and one_or_more_objects_of_types_exists(portal, subtypes, debug=debug) and
(result_uuid := result.get("uuid"))): # noqa
import pdb ; pdb.set_trace() # noqa
# If we have more than (say) 5 results for which we need to determine that actual result type,
# then get them all at once via separate query (get_metadata_types)) which is not the raw frame.
if (results_total > 5) and (not response_types):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dcicutils"
version = "8.14.0.1b22" # TODO: To become 8.14.1
version = "8.14.0.1b23" # TODO: To become 8.14.1
description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 662e293

Please sign in to comment.