-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adds test cases for loop component compatibility with the APIs, Loop component updates to support API #5615
Merged
+1,787
−30
Conversation
This file contains 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
- Renamed 'loop' input to 'loop_input' for clarity. - Simplified logic for checking loop input and aggregating results. - Enhanced type hints for better code readability and maintainability.
dosubot
bot
added
the
size:XXL
This PR changes 1000+ lines, ignoring generated files.
label
Jan 9, 2025
edwinjosechittilappilly
changed the title
feat: add test cases for loop component tests with the API
feat: adds test cases for loop component compatibility with the APIs
Jan 9, 2025
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 9, 2025
ogabrielluiz
requested changes
Jan 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you take a look at the TestBatchRunComponent
test and build these tests using the same structure?
dosubot
bot
added
size:L
This PR changes 100-499 lines, ignoring generated files.
and removed
size:XXL
This PR changes 1000+ lines, ignoring generated files.
labels
Jan 10, 2025
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 10, 2025
ogabrielluiz
force-pushed
the
fix-loop
branch
from
January 10, 2025 15:55
c7d1466
to
a161193
Compare
CodSpeed Performance ReportMerging #5615 will degrade performances by 49.6%Comparing Summary
Benchmarks breakdown
|
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 10, 2025
ogabrielluiz
force-pushed
the
loop-component
branch
from
January 10, 2025 15:56
e839deb
to
2385623
Compare
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 13, 2025
edwinjosechittilappilly
changed the title
feat: adds test cases for loop component compatibility with the APIs
feat: adds test cases for loop component compatibility with the APIs, Loop component updates to support API
Jan 13, 2025
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 13, 2025
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 13, 2025
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 13, 2025
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 14, 2025
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 14, 2025
italojohnny
force-pushed
the
loop-component
branch
from
January 14, 2025 15:05
6ae069a
to
cc080fd
Compare
italojohnny
approved these changes
Jan 14, 2025
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jan 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
size:XXL
This PR changes 1000+ lines, ignoring generated files.
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.
This pull request includes significant changes to the
LoopComponent
class and its associated tests. The most important changes include refactoring theinitialize_data
method, adding new methods for loop control, and updating the test configurations and fixtures.Refactoring and new methods in
LoopComponent
:src/backend/base/langflow/components/logic/loop.py
: Refactoredinitialize_data
to use a new_validate_data
method. Addedevaluate_stop_loop
,done_output
,loop_variables
, andaggregated_output
methods to improve loop control and data handling. [1] [2] [3]Test configuration and fixtures:
src/backend/tests/conftest.py
: Added a new fixturejson_loop_test
and includedpytest.LOOP_TEST
in the test configuration. Changed theblockbuster
fixture to not auto-use. [1] [2] [3] [4]New test cases for
LoopComponent
:src/backend/tests/unit/components/logic/test_loop.py
: Added a new test classTestLoopComponentWithAPI
with test cases for building and running flow loops using the API.Additional method in
CustomComponent
:src/backend/base/langflow/custom/custom_component/custom_component.py
: Added astart
method to complement the existingstop
method for better flow control.