langflow/src/backend/tests
Rodrigo Nader 8d902e6c74
feat: Add ParseDataFrameComponent for DataFrame-to-text conversion with tests (#5594)
* add dataframe outputs to vector stores, directory, url, split text

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* add parse dataframe

* [autofix.ci] apply automated fixes

* Refactor: Update DataFrame handling in components

- Added import of DataFrame in directory and url components.
- Renamed variable 'df' to 'dataframe' in ParseDataFrameComponent for clarity.
- Updated method _clean_args and parse_data to use 'dataframe' instead of 'df' for consistency.

These changes enhance code readability and maintainability by standardizing the terminology used for DataFrame objects.

* [autofix.ci] apply automated fixes

* remove parse dataframe

* feat: add parse dataframe component

* [autofix.ci] apply automated fixes

* Refactor: Remove duplicate as_dataframe method in LCVectorStoreComponent

This commit eliminates the redundant as_dataframe method in the LCVectorStoreComponent class, streamlining the code and improving maintainability. The method was previously defined twice, and this change enhances clarity by ensuring only one implementation exists.

* [autofix.ci] apply automated fixes

* Refactor: Standardize DataFrame variable naming in ParseDataFrameComponent

This commit renames the variable 'df' to 'dataframe' in the ParseDataFrameComponent class to improve clarity and consistency. The changes are reflected in the _clean_args and parse_data methods, enhancing code readability and maintainability.

* test: add unit tests for ParseDataFrameComponent

This commit introduces a comprehensive suite of unit tests for the ParseDataFrameComponent, covering various scenarios including successful parsing with default and custom templates, handling of empty dataframes, invalid template keys, and performance on large dataframes. The tests ensure that the component behaves correctly with different data types and separators, and validate its functionality in both synchronous and asynchronous contexts. These additions enhance the reliability and maintainability of the component.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-01-17 23:41:42 +00:00
..
data refactor: add graph utility tests and refactor sorting methods (#5538) 2025-01-09 20:15:24 +00:00
integration ref: Some ruff fixes from preview (#5420) 2024-12-28 21:25:35 +00:00
locust ref: Bump ruff version to 0.8 (#5087) 2024-12-08 11:16:06 +00:00
performance feat: Bump ruff version to 0.9 (#5666) 2025-01-15 15:14:43 +00:00
unit feat: Add ParseDataFrameComponent for DataFrame-to-text conversion with tests (#5594) 2025-01-17 23:41:42 +00:00
.test_durations chore: update test durations (#5736) 2025-01-16 11:06:14 -08:00
__init__.py chore: refactor and add components integration tests (#3607) 2024-09-02 15:21:47 +02:00
api_keys.py ref: Auto-fix ruff rules in tests (#4154) 2024-10-16 15:42:36 +00:00
base.py tests: allow tests to skip version tests if file_names_mapping is empty (#5562) 2025-01-07 12:47:14 +00:00
conftest.py tests: fix tests by clearing service_manager services (#5573) 2025-01-08 13:13:41 +00:00
constants.py chore: Update supported versions in tests constants (#5569) 2025-01-07 15:43:49 +00:00