Skip to content

Commit 63ca5ae

Browse files
committed
rename param json_recipe
1 parent 681e672 commit 63ca5ae

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

cellpack/autopack/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,14 +384,14 @@ def read_text_file(filename, destination="", cache="collisionTrees", force=None)
384384

385385

386386
def load_file(
387-
filename, destination="", cache="geometries", force=None, use_docker=False, recipe_obj=None
387+
filename, destination="", cache="geometries", force=None, use_docker=False, json_recipe=None
388388
):
389-
if recipe_obj is not None:
389+
if json_recipe is not None:
390390
composition = DBRecipeLoader.remove_empty(
391-
recipe_obj.get("composition", {})
391+
json_recipe.get("composition", {})
392392
)
393-
recipe_obj["composition"] = composition
394-
return recipe_obj, None, False
393+
json_recipe["composition"] = composition
394+
return json_recipe, None, False
395395
if is_remote_path(filename):
396396
database_name, file_path = convert_db_shortname_to_url(filename)
397397
if database_name == DATABASE_IDS.GITHUB:

cellpack/autopack/loaders/recipe_loader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class RecipeLoader(object):
3131
# TODO: add all default values here
3232
default_values = default_recipe_values.copy()
3333

34-
def __init__(self, input_file_path, save_converted_recipe=False, use_docker=False, recipe_obj=None):
34+
def __init__(self, input_file_path, save_converted_recipe=False, use_docker=False, json_recipe=None):
3535
_, file_extension = os.path.splitext(input_file_path)
3636
self.current_version = CURRENT_VERSION
3737
self.file_path = input_file_path
3838
self.file_extension = file_extension
3939
self.ingredient_list = []
4040
self.compartment_list = []
4141
self.save_converted_recipe = save_converted_recipe
42-
self.recipe_obj = recipe_obj
42+
self.json_recipe = json_recipe
4343

4444
# set CURRENT_RECIPE_PATH appropriately for remote(firebase) vs local recipes
4545
if autopack.is_remote_path(self.file_path):
@@ -171,7 +171,7 @@ def _migrate_version(self, old_recipe):
171171

172172
def _read(self, resolve_inheritance=True, use_docker=False):
173173
new_values, database_name, is_unnested_firebase = autopack.load_file(
174-
self.file_path, cache="recipes", use_docker=use_docker, recipe_obj=self.recipe_obj
174+
self.file_path, cache="recipes", use_docker=use_docker, json_recipe=self.json_recipe
175175
)
176176
if database_name == "firebase":
177177
if is_unnested_firebase:

cellpack/bin/pack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
def pack(
28-
recipe, config_path=None, analysis_config_path=None, docker=False, validate=True, recipe_str=None
28+
recipe, config_path=None, analysis_config_path=None, docker=False, validate=True, json_recipe=None
2929
):
3030
"""
3131
Initializes an autopack packing from the command line
@@ -40,7 +40,7 @@ def pack(
4040
packing_config_data = ConfigLoader(config_path, docker).config
4141

4242
recipe_data = RecipeLoader(
43-
recipe, packing_config_data["save_converted_recipe"], docker, recipe_str
43+
recipe, packing_config_data["save_converted_recipe"], docker, json_recipe
4444
).recipe_data
4545
analysis_config_data = {}
4646
if analysis_config_path is not None:

docker/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async def run_packing(self, recipe, config, job_id, body=None):
1616
os.environ["AWS_BATCH_JOB_ID"] = job_id
1717
self.update_job_status(job_id, "RUNNING")
1818
try:
19-
pack(recipe=recipe, config_path=config, docker=True, recipe_str=body)
19+
pack(recipe=recipe, config_path=config, docker=True, json_recipe=body)
2020
except Exception as e:
2121
self.update_job_status(job_id, "FAILED", error_message=str(e))
2222

0 commit comments

Comments
 (0)