Update batch web status names #2756
Merged
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.
Greptile Summary
This PR standardizes the batch web status names used in the RF/component modeler API from mixed PascalCase/CamelCase formats to consistent snake_case naming. The changes update three key files that handle RF batch task operations:
Status Enum Definition: The
BatchStatus
enum intask_info.py
has been completely updated with all 14 status values converted from formats likeCreated
,Validate_Success
,Run_Failed
todraft
,validate_success
,run_failed
respectively.Task Management Logic: The
BatchTask
class methods intask_core.py
that monitor validation and execution progress have been updated to check for the new snake_case status values in their conditional logic.Web API Integration: The
webapi.py
file has been systematically updated across all RF batch-related functions to use the new status naming convention for validation checks, error handling, progress monitoring, and postprocessing triggers.This change aligns the client-side code with updated backend API expectations that now return status values in snake_case format. The update ensures proper communication between the Tidy3D web client and the RF batch processing services. Some statuses have been consolidated (e.g.,
Run_Diverged
→diverged
) and refined (e.g.,Created
→draft
,Abort
→aborting
) to better represent the actual task states.Important Files Changed
tidy3d/web/core/task_info.py
tidy3d/web/core/task_core.py
tidy3d/web/api/webapi.py
Confidence score: 4/5
Sequence Diagram