Skip to content

Commit

Permalink
rename the helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
rugeli committed Jul 17, 2024
1 parent c0ddf2a commit aaf8c27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cellpack/autopack/DBRecipeHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def gradient_list_to_dict(prep_recipe_data):
prep_recipe_data["gradients"] = gradient_dict

@staticmethod
def create_combined_gradient_list(key, obj_data, prep_data):
def resolve_combined_gradient(key, obj_data, prep_data):
"""
When the gradients are combined, fetch and replace gradient data in a list.
key --> the key in the object data that we want to modify its value
Expand All @@ -176,7 +176,7 @@ def resolve_object_data(self, object_data, prep_recipe_data):
object_data[key] = prep_recipe_data[target_dict][object_data[key]]
# combined gradients
elif isinstance(object_data[key], list):
self.create_combined_gradient_list(
self.resolve_combined_gradient(
key, object_data, prep_recipe_data["gradients"]
)

Expand Down Expand Up @@ -516,7 +516,7 @@ def upload_single_object(self, obj_name, obj_data):
obj_data[obj_name]["gradient"] = self.grad_to_path_map[grad_name]
# combined gradients
elif isinstance(obj_data[obj_name]["gradient"], list):
CompositionDoc.create_combined_gradient_list(
CompositionDoc.resolve_combined_gradient(
"gradient", obj_data[obj_name], self.grad_to_path_map
)
object_doc = ObjectDoc(name=obj_name, settings=obj_data[obj_name])
Expand Down

0 comments on commit aaf8c27

Please sign in to comment.