Skip to content

first draft diagram#455

Draft
rugeli wants to merge 3 commits intofeature/server-passed-recipe-jsonfrom
doc/workflow-diagram
Draft

first draft diagram#455
rugeli wants to merge 3 commits intofeature/server-passed-recipe-jsonfrom
doc/workflow-diagram

Conversation

@rugeli
Copy link
Collaborator

@rugeli rugeli commented Mar 5, 2026

BEFORE: Original Server Workflow

graph TD
    A[Client Request] --> B[POST /start-packing]
    B --> C{Check recipe param}
    C -->|Missing| D[Return 400 Error]
    C -->|Present| E[Generate UUID for job_id]
    E --> F[Create Background Task]
    F --> G[Return job_id immediately]
    F --> H[run_packing with recipe path]
    H --> I[pack with docker enabled]
    I --> J[Load recipe from file path]
    J --> K[Execute packing]
    K --> L{Packing succeeds?}
    L -->|Success| M[S3: Upload outputs to S3]
    L -->|Failure| N[Firebase: Update job status to FAILED]
    
    style A fill:#e1f5fe
    style G fill:#c8e6c9
    style M fill:#fff3e0
    style N fill:#ffcdd2
Loading

AFTER: Enhanced Server Workflow with JSON Recipe Support

graph TD
    A[Client Request] --> B[POST /start-packing]
    B --> C{Check inputs}
    C -->|No recipe param + No body| D[Return 400 Error]
    C -->|Has recipe param + config| E[Generate UUID for job_id]
    C -->|Has JSON body + config| F[Generate hash from JSON]
    F --> G{Job exists?}
    G -->|Yes| H[Return existing job_id]
    G -->|No| I[Use hash as job_id]
    E --> J[Create Background Task]
    I --> J
    J --> K[Return job_id immediately]
    J --> L[pack with docker enabled and hash]
    L --> M{Input type?}
    M -->|Recipe path| N[Load recipe from file path]
    M -->|JSON body| O[Load recipe from JSON dict]
    N --> P[Execute packing in pack function]
    O --> P
    P --> Q{Packing succeeds?}
    Q -->|Success| R[S3: Upload outputs to S3]
    Q -->|Failure| S[Firebase: Update job status to FAILED]
    
    style A fill:#e1f5fe
    style K fill:#c8e6c9
    style R fill:#fff3e0
    style S fill:#ffcdd2
    style G fill:#ffeb3b
    style H fill:#4caf50
Loading

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

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

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.

2 participants