From ff215cdcec1ec5130389a75a4b636b3f615d7e4a Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Fri, 14 Aug 2026 17:32:50 +0000 Subject: [PATCH 1/2] [SYNPY-1896] Add SearchIndex to operations/utility_operations.py Registers SearchIndex alongside VirtualTable/MaterializedView in the find_entity_id, onweb, and print_entity Union type hints and TYPE_CHECKING import, completing its rollout across the operations/ factory layer. --- .../operations/utility_operations.py | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/synapseclient/operations/utility_operations.py b/synapseclient/operations/utility_operations.py index 8e0168b6d..a7f7fb79f 100644 --- a/synapseclient/operations/utility_operations.py +++ b/synapseclient/operations/utility_operations.py @@ -18,6 +18,7 @@ MaterializedView, Project, RecordSet, + SearchIndex, SubmissionView, Table, VirtualTable, @@ -38,6 +39,7 @@ def find_entity_id( "MaterializedView", "Project", "RecordSet", + "SearchIndex", "SubmissionView", "Table", "VirtualTable", @@ -52,9 +54,9 @@ def find_entity_id( Arguments: name: Name of the entity to find. parent: An Entity object (Dataset, DatasetCollection, EntityView, File, - Folder, Link, MaterializedView, Project, RecordSet, SubmissionView, - Table, VirtualTable) or the Id of an entity as a string. Omit if - searching for a Project by name. + Folder, Link, MaterializedView, Project, RecordSet, SearchIndex, + SubmissionView, Table, VirtualTable) or the Id of an entity as a + string. Omit if searching for a Project by name. synapse_client: If not passed in and caching was not disabled by `Synapse.allow_client_caching(False)` this will use the last created instance from the Synapse class constructor. @@ -141,6 +143,7 @@ async def find_entity_id_async( "MaterializedView", "Project", "RecordSet", + "SearchIndex", "SubmissionView", "Table", "VirtualTable", @@ -155,9 +158,9 @@ async def find_entity_id_async( Arguments: name: Name of the entity to find. parent: An Entity object (Dataset, DatasetCollection, EntityView, File, - Folder, Link, MaterializedView, Project, RecordSet, SubmissionView, - Table, VirtualTable) or the Id of an entity as a string. Omit if - searching for a Project by name. + Folder, Link, MaterializedView, Project, RecordSet, SearchIndex, + SubmissionView, Table, VirtualTable) or the Id of an entity as a + string. Omit if searching for a Project by name. synapse_client: If not passed in and caching was not disabled by `Synapse.allow_client_caching(False)` this will use the last created instance from the Synapse class constructor. @@ -380,6 +383,7 @@ def onweb( "MaterializedView", "Project", "RecordSet", + "SearchIndex", "SubmissionView", "Table", "VirtualTable", @@ -394,7 +398,8 @@ def onweb( Arguments: entity: Either an Entity object (Dataset, DatasetCollection, EntityView, File, Folder, Link, MaterializedView, Project, RecordSet, - SubmissionView, Table, VirtualTable) or a Synapse ID string. + SearchIndex, SubmissionView, Table, VirtualTable) or a Synapse + ID string. subpage_id: (Optional) ID of one of the wiki's sub-pages. synapse_client: If not passed in and caching was not disabled by `Synapse.allow_client_caching(False)` this will use the last created @@ -470,6 +475,7 @@ async def onweb_async( "MaterializedView", "Project", "RecordSet", + "SearchIndex", "SubmissionView", "Table", "VirtualTable", @@ -484,7 +490,8 @@ async def onweb_async( Arguments: entity: Either an Entity object (Dataset, DatasetCollection, EntityView, File, Folder, Link, MaterializedView, Project, RecordSet, - SubmissionView, Table, VirtualTable) or a Synapse ID string. + SearchIndex, SubmissionView, Table, VirtualTable) or a Synapse + ID string. subpage_id: (Optional) ID of one of the wiki's sub-pages. synapse_client: If not passed in and caching was not disabled by `Synapse.allow_client_caching(False)` this will use the last created @@ -728,6 +735,7 @@ def print_entity( "MaterializedView", "Project", "RecordSet", + "SearchIndex", "SubmissionView", "Table", "VirtualTable", @@ -742,8 +750,8 @@ def print_entity( Arguments: entity: Either an Entity object (Dataset, DatasetCollection, EntityView, File, Folder, Link, MaterializedView, Project, RecordSet, - SubmissionView, Table, VirtualTable), a Synapse ID string, or a - dictionary representation of an entity. + SearchIndex, SubmissionView, Table, VirtualTable), a Synapse ID + string, or a dictionary representation of an entity. ensure_ascii: If True, escapes all non-ASCII characters in the output. Defaults to True. synapse_client: If not passed in and caching was not disabled by @@ -819,6 +827,7 @@ async def print_entity_async( "MaterializedView", "Project", "RecordSet", + "SearchIndex", "SubmissionView", "Table", "VirtualTable", @@ -833,8 +842,8 @@ async def print_entity_async( Arguments: entity: Either an Entity object (Dataset, DatasetCollection, EntityView, File, Folder, Link, MaterializedView, Project, RecordSet, - SubmissionView, Table, VirtualTable), a Synapse ID string, or a - dictionary representation of an entity. + SearchIndex, SubmissionView, Table, VirtualTable), a Synapse ID + string, or a dictionary representation of an entity. ensure_ascii: If True, escapes all non-ASCII characters in the output. Defaults to True. synapse_client: If not passed in and caching was not disabled by From a4ecad856c1d9c822360efaf7e0a056ab772d246 Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Mon, 17 Aug 2026 12:36:40 -0700 Subject: [PATCH 2/2] Add SearchIndex to web services API --- synapseclient/api/web_services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapseclient/api/web_services.py b/synapseclient/api/web_services.py index 363942824..6763e1d20 100644 --- a/synapseclient/api/web_services.py +++ b/synapseclient/api/web_services.py @@ -17,6 +17,7 @@ MaterializedView, Project, RecordSet, + SearchIndex, SubmissionView, Table, VirtualTable, @@ -35,6 +36,7 @@ async def open_entity_in_browser( "MaterializedView", "Project", "RecordSet", + "SearchIndex", "SubmissionView", "Table", "VirtualTable",