@@ -84,7 +84,7 @@ def get_scoped_key(self, obj: GufeTokenizable, scope: Scope) -> ScopedKey:
8484 )
8585
8686 if scope .specific ():
87- return ScopedKey (gufe_key = obj .key , ** scope .dict ())
87+ return ScopedKey (gufe_key = obj .key , ** scope .to_dict ())
8888 else :
8989 raise ValueError (
9090 "Scope for a ScopedKey must be specific; it cannot contain wildcards."
@@ -143,11 +143,11 @@ def create_network(
143143
144144 state = NetworkStateEnum (state )
145145
146- sk = ScopedKey (gufe_key = network .key , ** scope .dict ())
146+ sk = ScopedKey (gufe_key = network .key , ** scope .to_dict ())
147147
148148 def post ():
149149 keyed_chain = KeyedChain .gufe_to_keyed_chain_rep (network )
150- data = dict (network = keyed_chain , scope = scope .dict (), state = state .value )
150+ data = dict (network = keyed_chain , scope = scope .to_dict (), state = state .value )
151151 return self ._post_resource ("/networks" , data , compress = compress )
152152
153153 if visualize :
@@ -286,7 +286,7 @@ def query_networks(
286286 if isinstance (state , NetworkStateEnum ):
287287 state = state .value
288288
289- params = dict (name = name , ** scope .dict (), state = state )
289+ params = dict (name = name , ** scope .to_dict (), state = state )
290290
291291 return self ._query_resource ("/networks" , params = params )
292292
@@ -304,7 +304,7 @@ def query_transformations(
304304 if scope is None :
305305 scope = Scope ()
306306
307- params = dict (name = name , ** scope .dict ())
307+ params = dict (name = name , ** scope .to_dict ())
308308
309309 return self ._query_resource ("/transformations" , params = params )
310310
@@ -322,7 +322,7 @@ def query_chemicalsystems(
322322 if scope is None :
323323 scope = Scope ()
324324
325- params = dict (name = name , ** scope .dict ())
325+ params = dict (name = name , ** scope .to_dict ())
326326
327327 return self ._query_resource ("/chemicalsystems" , params = params )
328328
@@ -723,7 +723,7 @@ def create_tasks(
723723
724724 """
725725 if extends :
726- extends = extends .dict ()
726+ extends = extends .to_dict ()
727727
728728 data = dict (extends = extends , count = count )
729729 task_sks = self ._post_resource (f"/transformations/{ transformation } /tasks" , data )
@@ -801,7 +801,7 @@ def query_tasks(
801801 if scope is None :
802802 scope = Scope ()
803803
804- params = dict (status = status , ** scope .dict ())
804+ params = dict (status = status , ** scope .to_dict ())
805805
806806 return self ._query_resource ("/tasks" , params = params )
807807
@@ -1139,7 +1139,7 @@ def action_tasks(
11391139 will be returned in its place.
11401140
11411141 """
1142- data = dict (tasks = [t .dict () for t in tasks ], weight = weight )
1142+ data = dict (tasks = [t .to_dict () for t in tasks ], weight = weight )
11431143 actioned_sks = self ._post_resource (f"/networks/{ network } /tasks/action" , data )
11441144
11451145 return [ScopedKey .from_str (i ) if i is not None else None for i in actioned_sks ]
@@ -1169,7 +1169,7 @@ def cancel_tasks(
11691169 be returned in its place.
11701170
11711171 """
1172- data = dict (tasks = [t .dict () for t in tasks ])
1172+ data = dict (tasks = [t .to_dict () for t in tasks ])
11731173 canceled_sks = self ._post_resource (f"/networks/{ network } /tasks/cancel" , data )
11741174
11751175 return [ScopedKey .from_str (i ) if i is not None else None for i in canceled_sks ]
@@ -1246,7 +1246,7 @@ async def _set_task_status(
12461246 self , tasks : list [ScopedKey ], status : TaskStatusEnum
12471247 ) -> list [ScopedKey | None ]:
12481248 """Set the statuses for many Tasks"""
1249- data = dict (tasks = [t .dict () for t in tasks ], status = status .value )
1249+ data = dict (tasks = [t .to_dict () for t in tasks ], status = status .value )
12501250 tasks_updated = await self ._post_resource_async (
12511251 "/bulk/tasks/status/set" , data = data
12521252 )
@@ -1290,7 +1290,7 @@ def set_tasks_status(
12901290
12911291 async def _get_task_status (self , tasks : list [ScopedKey ]) -> list [TaskStatusEnum ]:
12921292 """Get the statuses for many Tasks"""
1293- data = dict (tasks = [t .dict () for t in tasks ])
1293+ data = dict (tasks = [t .to_dict () for t in tasks ])
12941294 statuses = await self ._post_resource_async ("/bulk/tasks/status/get" , data = data )
12951295 return statuses
12961296
@@ -1319,7 +1319,7 @@ def get_tasks_status(
13191319 async def _set_task_priority (
13201320 self , tasks : list [ScopedKey ], priority : int
13211321 ) -> list [ScopedKey | None ]:
1322- data = dict (tasks = [t .dict () for t in tasks ], priority = priority )
1322+ data = dict (tasks = [t .to_dict () for t in tasks ], priority = priority )
13231323 tasks_updated = await self ._post_resource_async (
13241324 "/bulk/tasks/priority/set" , data = data
13251325 )
@@ -1360,7 +1360,7 @@ def set_tasks_priority(
13601360
13611361 async def _get_task_priority (self , tasks : list [ScopedKey ]) -> list [int ]:
13621362 """Get the priority for many Tasks"""
1363- data = dict (tasks = [t .dict () for t in tasks ])
1363+ data = dict (tasks = [t .to_dict () for t in tasks ])
13641364 priorities = await self ._post_resource_async (
13651365 "/bulk/tasks/priority/get" , data = data
13661366 )
0 commit comments