langflow/tests/unit
Gabriel Luiz Freitas Almeida d28fe8eedc
fix: Improve vertex filtering and update is_vertex_runnable logic (#2612)
* feat: improve is_vertex_runnable method in RunnableVerticesManager

This commit improves the `is_vertex_runnable` method in the `RunnableVerticesManager` class. It adds an additional parameter `activated_vertices` to the method signature and updates the logic to check if a vertex is runnable based on the presence of activated vertices. This enhancement improves the accuracy of determining whether a vertex is runnable or not.

* fix: add predecessors to vertices_to_run

* style: fix lint issues

* feat: optimize vertex filtering in useFlowStore

This commit optimizes the vertex filtering logic in the `useFlowStore` function in `flowStore.ts`. It introduces a more efficient way to filter out vertices that are already being built, resulting in improved performance and accuracy.

* refactor: add is_active method to Vertex class

This commit adds the `is_active` method to the `Vertex` class in the `base.py` file. The `is_active` method checks if the state of the vertex is set to `ACTIVE` and returns a boolean value accordingly. This enhancement improves the readability and maintainability of the codebase.

* refactor: improve is_vertex_runnable method in RunnableVerticesManager

* refactor: improve find_runnable_predecessors_for_successors method in Graph class

* refactor: move test_create_function
2024-07-10 07:40:16 -03:00
..
__init__.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_api_key.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_cache.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_cli.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_custom_component.py (test_custom_component.py): update test_custom_component_get_function_entrypoint_args to reflect correct number of arguments in build method 2024-06-18 22:41:57 -03:00
test_data_class.py refactor: Rename test_record.py to test_data_class.py and update imports and references accordingly 2024-06-20 21:27:37 -03:00
test_data_components.py refactor: Update test_data_components.py to assert file_dict instead of result.text in test_directory_without_mocks 2024-06-21 15:46:17 -03:00
test_database.py fix: "Flow" object has no field "last_tested_version" when loading flows from dir (#2221) 2024-06-19 18:15:50 +02:00
test_files.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_frontend_nodes.py merge dev into two_edges 2024-06-17 10:01:28 -03:00
test_graph.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_helper_components.py feat: Add CreateListComponent for creating a list of texts 2024-07-01 13:53:55 -03:00
test_initial_setup.py refactor: Rename test_record.py to test_data_class.py and update imports and references accordingly 2024-06-20 21:27:37 -03:00
test_kubernetes_secrets.py mock kube-config 2024-06-21 20:55:42 -07:00
test_loading.py refactor: move langflow api tests into integration tests (#2469) 2024-07-01 15:25:56 -07:00
test_login.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_messages.py fix: stream option is not working with tracing enabled (#2602) 2024-07-09 13:37:47 +00:00
test_process.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_setup_superuser.py test: add astra integration test (#2189) 2024-06-15 19:50:38 -07:00
test_template.py Refactor build_template_from_class function to remove unused code and improve readability 2024-06-17 10:55:50 -03:00
test_validate_code.py fix: Improve vertex filtering and update is_vertex_runnable logic (#2612) 2024-07-10 07:40:16 -03:00
text_experimental_components.py fix: the pythonfunction test error (#2572) 2024-07-08 15:48:33 +00:00