Conversation
|
Contributor
|
Nice catching the root cause, it works! |
rugeli
approved these changes
Aug 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Currently, there's a bug when you try to edit a recipe that has gradients. This is because the gradient's name field has been removed during the process of forming the JSON object from the nested firebase references, and we aren't adding it back in when we upload the edited recipe to the recipes_edited firebase collection. The cellPACK python package expects each gradient to have name field present, so it throws an error.
Solution
While I originally removed the "name" field from gradients, objects, and compositions for displaying in the JSON, along with "id" and "dedup_hash", because that information seemed unnecessary / redundant, I now think we should keep the "name" field displayed.
I originally added "name" back just to solve this bug, but fundamentally I think we should include "name" in general. While "dedup_hash" and "id" are firebase fields that the user really doesn't need to see, "name" is an expected field by cellpack, and if the user were to run a recipe locally, they would need to have the "name" field present. Thus, I think we should display it in the recipe JSON, so the user has an accurate representation of what is being run.
To Test
Go to the preview link, select the
ER_peroxisomerecipe and therules_shapeconfig, then make a change to the recipe. The packing should run and work as expected (previously, it would have failed)