Skip to content

Conversation

@rugeli
Copy link
Collaborator

@rugeli rugeli commented Nov 25, 2025

Problem

closes AllenCell/cellpack-client#103

Solution

  • added recipe and config data to output folder so users can download them from UI. they will appear as recipe.json and config.json

Note: we send in the full packing_config_data to output folder as a json, regardless of whether the pack used default configs or a config file

Type of change

  • New feature (non-breaking change which adds functionality)

@github-actions
Copy link
Contributor

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@rugeli rugeli requested a review from ascibisz November 26, 2025 00:04
…in path expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

Comment on lines 66 to 67
EXISTING_COMMENT_ID=$(gh pr view ${{ github.event.pull_request.number }} --json comments --jq ".comments[] | select(.body | contains(\"${MARKER}\")) | .id" | head -1 | tr -d '[:space:]')
if [ -n "$EXISTING_COMMENT_ID" ] && [ "$EXISTING_COMMENT_ID" -eq "$EXISTING_COMMENT_ID" ] 2>/dev/null; then
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the workflow to only delete redundant comment when a valid comment id found


output_path = Path(output_folder)

# Normalize the recipe path relative to the recipes base dir
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL was failing due to an unsecured user-provided path, so I accepted the suggested fix in this spot

@rugeli
Copy link
Collaborator Author

rugeli commented Dec 4, 2025

@ascibisz testing for this pr is a bit funky:

  • temporarily set a fake environment id in pack.py Line 81,
    job_id = os.environ.get("AWS_BATCH_JOB_ID", None)
    change None to something like test123, you may hit aws credential issue, switch to batch role by following all the "unset AWS_ACCESS_KEY_ID ..." steps from our server planning google doc

  • pack a recipe with a config file and the docker flag
    pack -r examples/recipes/v2/spheres_on_a_plane.json -c examples/packing-configs/debug.json -d

  • you should see a log like2025-12-04 11:58:08 | root | INFO | FirebaseHandler:108 | set_doc() | successfully uploaded to path: job_status/test123, then go to staging firebase to confirm the outputs directory got uploaded

  • go to the outputs directory, verify the recipe(full recipe data) and config(complete settings) are in the folder as two json files(recipe.json and config.json)

@ascibisz
Copy link
Collaborator

ascibisz commented Dec 9, 2025

I tried running this locally and it works as expected for local config and recipe files, but it doesn't work for firebase config and recipe files (it just tries to read the firebase path as a local file path). Maybe we can discuss potential solutions at pair programming?

ERROR | DBRecipeHandler:650 | upload_packing_results_workflow() | [Errno 2] No such file or directory: '/Users/alli.scibisz/cellpack/firebase:recipes/one_sphere_v_1.0.0'

@rugeli
Copy link
Collaborator Author

rugeli commented Dec 9, 2025

I tried running this locally and it works as expected for local config and recipe files, but it doesn't work for firebase config and recipe files (it just tries to read the firebase path as a local file path). Maybe we can discuss potential solutions at pair programming?

darn I keep forgetting about the firebase path handling, thanks for catching it! I'll get that fixed in this pr before tomorrow.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@rugeli
Copy link
Collaborator Author

rugeli commented Dec 9, 2025

I tried running this locally and it works as expected for local config and recipe files, but it doesn't work for firebase config and recipe files (it just tries to read the firebase path as a local file path). Maybe we can discuss potential solutions at pair programming?

ERROR | DBRecipeHandler:650 | upload_packing_results_workflow() | [Errno 2] No such file or directory: '/Users/alli.scibisz/cellpack/firebase:recipes/one_sphere_v_1.0.0'

@ascibisz Just pushed a fix for firebase recipes! It now checks for firebase recipes and I added a serialized copy of the recipe so we can json dump human readable version instead of having something like "partners": "<cellpack.autopack.interface_objects.partners.Partners object at 0x136618810>" in the json. Let me know if you like this approach, or we can chat about alternatives tomorrow!

@github-actions
Copy link
Contributor

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@github-actions
Copy link
Contributor

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@github-actions
Copy link
Contributor

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@rugeli
Copy link
Collaborator Author

rugeli commented Dec 11, 2025

@ascibisz ready for another round of review! I removed path checks and simplified the logic so we now save recipe data(both local and firebase) directly to the output folder, no re-reading the paths. happy to walk through the changes if you'd prefer, no rush at all!

Sorry for the flood of duplicate reports, this is fixed in a different pr!

Copy link
Collaborator

@ascibisz ascibisz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!! And worked well for me locally

@rugeli rugeli merged commit f60a1d8 into main Dec 17, 2025
10 checks passed
@rugeli rugeli deleted the feature/add-files-to-output branch December 17, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include Recipe and Config Files in Download

3 participants