diff --git a/cellpack/autopack/DBRecipeHandler.py b/cellpack/autopack/DBRecipeHandler.py index 364bb611c..cd5229992 100644 --- a/cellpack/autopack/DBRecipeHandler.py +++ b/cellpack/autopack/DBRecipeHandler.py @@ -609,7 +609,7 @@ def _get_grad_and_obj(obj_data, obj_dict, grad_dict): return obj_dict, grad_dict @staticmethod - def _collect_and_sort_data(comp_data): + def collect_and_sort_data(comp_data): """ Collect all object and gradient info from the downloaded composition data Return autopack object data dict and gradient data dict with name as key @@ -658,7 +658,7 @@ def _collect_and_sort_data(comp_data): return objects, gradients, composition @staticmethod - def _compile_db_recipe_data(db_recipe_data, obj_dict, grad_dict, comp_dict): + def compile_db_recipe_data(db_recipe_data, obj_dict, grad_dict, comp_dict): """ Compile recipe data from db recipe data into a ready-to-pack structure """ diff --git a/cellpack/autopack/loaders/recipe_loader.py b/cellpack/autopack/loaders/recipe_loader.py index e7547f0f5..2025d20c4 100644 --- a/cellpack/autopack/loaders/recipe_loader.py +++ b/cellpack/autopack/loaders/recipe_loader.py @@ -169,10 +169,10 @@ def _migrate_version(self, old_recipe): def _read(self): new_values, database_name = autopack.load_file(self.file_path, cache="recipes") if database_name == "firebase": - objects, gradients, composition = DBRecipeLoader._collect_and_sort_data( + objects, gradients, composition = DBRecipeLoader.collect_and_sort_data( new_values["composition"] ) - new_values = DBRecipeLoader._compile_db_recipe_data( + new_values = DBRecipeLoader.compile_db_recipe_data( new_values, objects, gradients, composition ) recipe_data = RecipeLoader.default_values.copy() diff --git a/cellpack/tests/test_db_recipe_loader.py b/cellpack/tests/test_db_recipe_loader.py index 4c9987541..7d87cdd4f 100644 --- a/cellpack/tests/test_db_recipe_loader.py +++ b/cellpack/tests/test_db_recipe_loader.py @@ -167,7 +167,7 @@ def test_get_grad_and_obj(): @pytest.fixture def sort_data_from_composition(): - return DBRecipeLoader._collect_and_sort_data( + return DBRecipeLoader.collect_and_sort_data( downloaded_data_from_firebase["composition"] ) @@ -186,7 +186,7 @@ def test_collect_and_sort_data(sort_data_from_composition): def test_compile_db_recipe_data(sort_data_from_composition): objects, gradients, composition = sort_data_from_composition - compiled_recipe = DBRecipeLoader._compile_db_recipe_data( + compiled_recipe = DBRecipeLoader.compile_db_recipe_data( downloaded_data_from_firebase, objects, gradients, composition ) assert compiled_recipe == compiled_firebase_recipe_example