Open sweep-ai[bot] opened 12 hours ago
Traceback (most recent call last):
File "/app/sweepai/handlers/fix_ci.py", line 249, in fix_ci_failures_once
pending_runs, successful_runs, error_runs = wait_for_ci_failures(pull_request)
ValueError: not enough values to unpack (expected 3, got 2)
not enough values to unpack (expected 3, got 2)
Sweep has encountered a runtime error unrelated to your request. Please let us know via this link or at support@sweep.dev directly.
:book: For more information on how to use Sweep, please read our documentation.
Hey @sweep-ai[bot], here is an example of how you can ask me to improve this pull request:
@sweep Add unit tests for each extracted enum class to verify:
- Character mapping functionality (getChar() and CharMap)
- FIX code conversion (fromFixCode()) for enums that have FIX codes
- Special methods like Side.index(), Side.invertedIndex(), Side.isOutside(), etc.
:book: For more information on how to use Sweep, please read our documentation.
Purpose
This pull request refactors the
Order
class by extracting all enum definitions into their own separate files to improve code organization and maintainability.This pull request was created to solve the following GitHub issue:
Refactor the enums in
Order.java
to separate filesPurpose
Refactor the enums in
Order.java
to separate files to improve code organization and maintainability.Description
Moveg each enum type (like
TimeInForce
,RejectReason
, etc.) fromOrder.java
into its own Java file.Summary
The changes in this pull request include:
src/main/java/com/coralblocks/coralme/
:TimeInForce.java
RejectReason.java
CancelRejectReason.java
CancelReason.java
ReduceRejectReason.java
Type.java
ExecuteSide.java
Side.java
Order.java
to the respective new filesOrder.java
to remove the enum definitions and add import statements for the newly created enum filesExtract Order Enums to Separate Files
Description:
Move each enum from
Order.java
into its own file to improve code organization and maintainability. Each enum will maintain its existing functionality while being housed in a dedicated file.Tasks:
Create new enum files in
src/main/java/com/coralblocks/coralme/
:TimeInForce.java
RejectReason.java
CancelRejectReason.java
CancelReason.java
ReduceRejectReason.java
Type.java
ExecuteSide.java
Side.java
In
Order.java
:For each new enum file:
CharEnum
,CharMap
,StringUtils
)Test:
Description
The following enums have been extracted from the
Order
class into their own files:CancelReason
- Reasons for order cancellationCancelRejectReason
- Reasons for rejecting cancel requestsExecuteSide
- Defines maker/taker execution sidesReduceRejectReason
- Reasons for rejecting reduce requestsRejectReason
- Reasons for rejecting ordersSide
- Buy/Sell order sidesTimeInForce
- Order time in force optionsType
- Order types (Market/Limit)The
Order
class has been simplified by removing these enum definitions while maintaining all existing functionality. All references have been updated to use the new enum files.Summary
Order.java
into separate files incom.coralblocks.coralme
packageCharEnum
interfaceOrder.java
to reference new enum filesOrder.java
CancelReason.java
,CancelRejectReason.java
,ExecuteSide.java
,ReduceRejectReason.java
,RejectReason.java
,Side.java
,TimeInForce.java
,Type.java
Fixes
Fixes #1. Continue the conversation here: https://app.sweep.dev/c/6f07e953-3f49-464d-ba5e-38862d72d621.
To have Sweep make further changes, please add a comment to this PR starting with "Sweep:".
:book: For more information on how to use Sweep, please read our documentation.