Commit graph

274 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
8415b89bab
ci: integrate retry mechanism in Playwright tests to improve stability and handle potential failures (#3267)
fix: integrate retry mechanism in Playwright tests to improve stability and handle potential failures
2024-08-09 17:06:41 +00:00
Gabriel Luiz Freitas Almeida
881828c4a4
ci: refactor release workflow and Docker build process (#3245)
* feat: update docker-build.yml to conditionally retrieve version and adjust tagging logic for Docker images in workflows

* Refactor release workflow to separate base and main package handling

- Split `release_package` input into `release_package_base` and `release_package_main`
- Add new inputs for building Docker images: `build_docker_base` and `build_docker_main`
- Update conditional checks and job dependencies to reflect new inputs
- Separate Docker build workflows for base and main packages

* Refactor release.yml to introduce separate inputs for base and main packages, enhancing workflow flexibility and clarity

* chore: update release.yml to set default pre-release option to false, reflecting new workflow strategy

* chore: add pre-release check to release.yml to validate version format before proceeding with the workflow

* chore: remove deprecated pre-release workflows, consolidating configuration for cleaner CI/CD process

* chore: modify pre-release check in release.yml to use poetry version for validation, enhancing version format accuracy

* chore: refine pre-release version check in release.yml for improved regex validation, ensuring accurate version detection
2024-08-08 08:04:50 -07:00
Gabriel Luiz Freitas Almeida
4d1c8ad92a
ci: add version check in workflow to skip jobs for unreleased versions of langflow-base (#3244)
feat: add version check in workflow to skip jobs for unreleased versions of langflow-base
2024-08-08 08:04:36 -07:00
Gabriel Luiz Freitas Almeida
bb1bc5c2df
feat: add dump and dumps methods to Graph (#3202)
* feat(utils.py): add escape_json_dump function to escape JSON strings for Edge dictionaries

* refactor(Output): streamline add_types method to prevent duplicate entries in types list for improved type management

* feat(data.py): add classmethod decorator to validate_data for enhanced validation logic when checking data types

* feat(setup.py): implement retry logic for loading starter projects to enhance robustness against JSON decode errors

* fix(input_mixin.py): improve model_config formatting and update field_type alias for clarity and consistency in field definitions

* feat(types.py): refactor vertex constructors to use NodeData and add input/output methods for better component interaction

* feat(schema.py): add NodeData and Position TypedDicts for improved type safety and structure in vertex data handling

* feat(base.py): update Vertex to use NodeData type and add to_data method for better data management and access

* refactor(schema.py): update TargetHandle and SourceHandle models to include model_config attribute

* Add TypedDict classes for graph schema serialization in `schema.py`

* Refactor `Edge` class to improve handle validation and data handling

- Consolidated imports and removed redundant `BaseModel` definitions for `SourceHandle` and `TargetHandle`.
- Added `valid_handles`, `target_param`, and `_target_handle` attributes to `Edge` class.
- Enhanced handle validation logic to distinguish between dictionary and string types.
- Introduced `to_data` method to return edge data.
- Updated attribute names to follow consistent naming conventions (`base_classes`, `input_types`, `field_name`).

* Refactor `Edge` class to improve handle validation and data handling

* Refactor: Standardize attribute naming and add `to_data` method in Edge class

- Renamed attributes to use snake_case consistently (`baseClasses` to `base_classes`, `inputTypes` to `input_types`, `fieldName` to `field_name`).
- Added `to_data` method to return `_data` attribute.
- Updated validation methods to use new attribute names.

* Refactor: Update Edge class to consistently use snake_case for attributes and improve validation logic for handles

* Refactor: Change node argument type in add_node and _create_vertex methods to NodeData for better type safety and clarity

* Refactor: Implement JSON serialization for graph data with `dumps` and `dump` methods, enhancing data export capabilities

* Refactor: Add pytest fixtures for ingestion and RAG graphs, enhance test structure for better clarity and organization

* Refactor: Add pytest fixtures for memory_chatbot_graph tests and improve test structure

* Refactor: Remove unused methods in ComponentVertex class to streamline code and improve readability

* Refactor: Remove unnecessary line in ComponentVertex class to enhance code clarity and maintainability

* Refactor: Update import path for DefaultPromptField to improve code organization and maintainability in api_utils.py

* Refactor: Update import path for DefaultPromptField to enhance code organization and maintainability in prompt.py

* fix: Remove  fixture in test_memory_chatbot.py that blocked db setup

* Refactor: Add durations path for unit tests to improve test reporting

* Refactor: Add splitting algorithm option for unit tests

* Add async option to Makefile for unit tests and update GitHub Actions workflow

- Introduced `async` variable in Makefile to conditionally run unit tests with or without parallel execution.
- Updated `unit_tests` target in Makefile to handle `async` flag.
- Modified GitHub Actions workflow to set `async=false` for unit tests.
2024-08-05 21:00:46 +00:00
Gabriel Luiz Freitas Almeida
8ece1cadf6
ci: update nick-fields/retry dependency to v3 (#3206)
fix: update nick-fields/retry dependency to v3
2024-08-05 20:48:11 +00:00
dependabot[bot]
b4a575b84e
build(deps):(deps): bump install-pinned/ruff from b52a71f70b28264686d57d1efef1ba845b9cec6c to 48a5818c5f7ce30e2822b67fb9c26d3e25d31fab (#3142)
build(deps):(deps): bump install-pinned/ruff

Bumps [install-pinned/ruff](https://github.com/install-pinned/ruff) from b52a71f70b28264686d57d1efef1ba845b9cec6c to 48a5818c5f7ce30e2822b67fb9c26d3e25d31fab.
- [Release notes](https://github.com/install-pinned/ruff/releases)
- [Commits](b52a71f70b...48a5818c5f)

---
updated-dependencies:
- dependency-name: install-pinned/ruff
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 08:18:39 +00:00
Gabriel Luiz Freitas Almeida
1304f852db
ci(workflows): implement retry logic in python_test workflow for unit tests (#3145)
* feat(workflows): add NODE_VERSION to python_test workflow for Node.js setup

Enhanced the CI workflow by including Node.js setup with version 21 to support JavaScript components

* fix(workflows): implement retry logic in python_test workflow for unit tests

Added a retry mechanism to enhance test reliability in CI workflow
2024-08-01 19:07:13 +00:00
Gabriel Luiz Freitas Almeida
15d566618b
fix: update curl command in release workflow to use correct endpoint (#3086) 2024-07-30 18:28:22 +00:00
Gabriel Luiz Freitas Almeida
17d387470a
ci: update cli command (#3084)
* chore: update pip installation command in release workflow

* fix: update pip installation command in release workflow
2024-07-30 18:00:30 +00:00
Gabriel Luiz Freitas Almeida
410cd46c39
ci: update workflow to skip publishing if package already exists (#3082)
fix: Update Makefile to skip publishing if package already exists
2024-07-30 17:25:02 +00:00
Nicolò Boschi
569869e211
ci: improve test jobs titles (#3065) 2024-07-30 05:19:14 -07:00
Nicolò Boschi
4136961155
fix: strict langchain integrations dep (#3063)
* fix: strict langchain vertexai dep

* fix: strict langchain vertexai dep

* fix: strict langchain vertexai dep

* [autofix.ci] apply automated fixes

* chore: update langchain-google-genai dependency to version 1.0.8

* more locks

* ci: improve test jobs titles

* openai 0.1.18

* openai 0.1.17

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-30 12:11:58 +00:00
Gabriel Luiz Freitas Almeida
12e3b51980
ci: update Python version in release workflow and skip release if already released (#3053)
* ci: update Python in release workflow

* ci: skipp release of langflow-base when version is already released
2024-07-30 00:01:29 +00:00
Gabriel Luiz Freitas Almeida
02a879f330
ci: add labeler job to automatically add 'lgtm' label when pull request review is approved (#2963)
* feat(ci.yml): add labeler job to automatically add 'lgtm' label when pull request review is approved

* ci(ci.yml): add dependency on labeler job to ensure it runs before the ci job

* chore(ci.yml): remove unnecessary condition for labeler job in CI workflow

* refactor(ci.yml): remove unnecessary condition for labeler job in CI workflow

* refactor(ci.yml): update CI workflow to include labeled pull requests in the trigger conditions
2024-07-25 20:12:18 +00:00
Gabriel Luiz Freitas Almeida
ca98103af4
ci: add debug info (#2957)
* ci: add debug info

* fix: change echo commands
2024-07-25 16:51:57 +00:00
Gabriel Luiz Freitas Almeida
51b85dbc8e
fix: update path filter condition in ci.yml (#2947)
Update the path filter condition in ci.yml to use strict comparison for the 'should-run-ci' output value. This ensures that the CI job is only executed when the output value is 'true'.
2024-07-25 12:45:30 +00:00
Gabriel Luiz Freitas Almeida
459a80c983
ci: fix set-ci-condition job (#2934)
* chore(ci.yml): refactor CI workflow to include a new job 'set-ci-condition' to determine if CI should run based on conditions such as pull request labels and event type

* refactor: include new job 'set-ci-condition' in CI workflow to determine if CI should run based on conditions
2024-07-24 14:40:33 -07:00
Gabriel Luiz Freitas Almeida
950aac1cce
ci: update CI workflow to include new job 'set-ci-condition' (#2933)
chore(ci.yml): refactor CI workflow to include a new job 'set-ci-condition' to determine if CI should run based on conditions such as pull request labels and event type

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
2024-07-24 14:33:29 -07:00
Cristhian Zanforlin Lousa
ae096a3167
test: add new tests based on new basic examples + vector store tests (#2879)
* 🔧 (.github/workflows/typescript_test.yml): add BRAVE_SEARCH_API_KEY secret to workflow environment variables
 (frontend/src/modals/IOModal/components/chatView/chatMessage/index.tsx): add data-testid attribute to div element for testing purposes
 (frontend/tests/end-to-end/Hierarchical Tasks Agent.spec.ts): add end-to-end test for Hierarchical Tasks Agent
 (frontend/tests/end-to-end/Sequential Tasks Agent.spec.ts): add end-to-end test for Sequential Tasks Agent

* updating hierarchical task json

* 🔧 (.github/workflows/typescript_test.yml): add secrets for ASTRA_DB_APPLICATION_TOKEN and ASTRA_DB_API_ENDPOINT
♻️ (playwright.config.ts): refactor timeout value to 3 minutes
📝 (Complex Agent.spec.ts): update test to use BRAVE_SEARCH_API_KEY instead of OPENAI_API_KEY
📝 (Complex Agent.spec.ts): update test to use "apple" instead of "agile"
📝 (Hierarchical Tasks Agent.spec.ts): update test to use "langflow" instead of "agile"
📝 (Sequential Tasks Agent.spec.ts): update test to use waitForTimeout instead of isVisible

 (Vector Store.spec.ts): Add checks to skip tests if required environment variables are not set
🔧 (Vector Store.spec.ts): Update test logic to fill in required environment variables before running tests to ensure proper test execution
2024-07-22 21:30:30 +00:00
Jordan Frazier
077f68f17b
fix: add checkout action to integration test workflow (#2869) 2024-07-22 11:34:33 -07:00
Gabriel Luiz Freitas Almeida
d8a90f6bb5
chore: update dependencies and add lock step in py_autofix.yml (#2875)
* chore: lock dependencies without updating in Makefile

Lock the dependencies without updating them in the Makefile. This ensures that the dependencies remain at their current versions and prevents any unintended changes in compatibility or functionality.

* chore: update dependencies and add lock step in py_autofix.yml

Update the dependencies in the py_autofix.yml workflow file to include a new step for checking the Poetry lock file. This ensures that the dependencies are locked and prevents any unintended changes in compatibility or functionality. The lock step is added to the existing workflow to ensure that the Poetry lock file is checked and updated if necessary.
2024-07-22 11:19:10 -07:00
Cristhian Zanforlin Lousa
4b9dc47021
test: Add New Test for Freeze Path Feature and Improve Existing Tests (#2833)
* 📝 (floatComponent/index.tsx): Add data-testid attribute to float input for testing purposes
🐛 (end-to-end tests): Update test selectors to match changes in component names for consistency and accuracy

 (freeze-path.spec.ts): Add end-to-end test for user ability to freeze a path in the application
🐛 (generalBugs-shard-0.spec.ts): Fix outdated component selector in end-to-end test for clearing chat messages
🐛 (generalBugs-shard-1.spec.ts): Fix outdated component selector in end-to-end test for deleting rows from a table message

🐛 (generalBugs-shard-3.spec.ts): Fix outdated component issue by updating the selector for the AlertTriangle icon and the API key input field, and selecting a different model option
🐛 (logs.spec.ts): Fix outdated component issue by updating the selector for the AlertTriangle icon and the API key input field, and selecting a different model option. Also, ensure the "built successfully" text is clicked within a specified timeout
🐛 (textInputOutput.spec.ts): Fix outdated component issue by updating the selector for the AlertTriangle icon and the API key input field, and selecting a different model option

* ⬆️ (typescript_test.yml): increase shardTotal value to 16 to match the updated shardIndex values for better test distribution.

* 📝 (inputComponent.spec.ts): remove unnecessary test case for clicking and checking collection name input field in InputComponent test to improve test focus and readability.

* Revert "refactor: update template api, handleonnewvalue and handlenodeclass hooks (#2628)"

This reverts commit b3c1b941b3.

*  (inputComponent.spec.ts): add test case to check if the input element is checked after clicking on it

*  (multiselectComponent/index.tsx): Refactor value assignment to handle both array and non-array values more efficiently
🔧 (inputComponent.spec.ts, intComponent.spec.ts, saveComponents.spec.ts): Update file paths to point to the correct location of test assets

*  (filterSidebar.spec.ts): comment out two failing test expectations for helpersChat Memory and agentsTool Calling Agent to prevent test failures
📝 (folders.spec.ts): update file path to read collection.json from the correct location
📝 (saveComponents.spec.ts): update file path to read flow_group_test.json from the correct location

* ⬆️ (typescript_test.yml): increase the number of shardIndex values from 16 to 20 to distribute tests more evenly across shards.

* 📝 (folders.spec.ts): update file path to read collection.json file to fix file not found error

* add condition to merge-reports

*  (filterSidebar.spec.ts): update test to check for visibility of agentsCSVAgent element instead of agentsTool Calling Agent element
🐛 (folders.spec.ts): increase timeout for page.waitForTimeout to 5000ms and add a comment suggesting to consider using a more reliable waiting mechanism. Also, add a comment to wait for the target element to be available before evaluation.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-22 15:15:31 +00:00
Cristhian Zanforlin Lousa
9c9d916d80
test: fix general test and CI (#2839)
🔧 (typescript_test.yml): Remove unnecessary steps and conditions in GitHub Actions workflow file
🔧 (authContext.tsx): Update cookie key from LANGFLOW_ACCESS_TOKEN to LANGFLOW_API_TOKEN for consistency
🔧 (Basic Prompting.spec.ts): Update test to click on correct dropdown option
🔧 (filterEdge-shard-0.spec.ts): Update test to check for correct element
🔧 (filterSidebar.spec.ts): Update test to check for correct elements
🔧 (generalBugs-shard-5.spec.ts): Update test to interact with correct element
🔧 (inputComponent.spec.ts): Update test to interact with correct elements
🔧 (store-shard-1.spec.ts): Update test to interact with correct elements and remove unnecessary code
2024-07-19 18:38:14 +00:00
Gabriel Luiz Freitas Almeida
f701d86dde ci: update path-filter job condition in ci.yml (#2817)
refactor: update path-filter job condition in ci.yml
2024-07-18 21:32:03 -03:00
Gabriel Luiz Freitas Almeida
f9359309f7
ci: remove pull_request_review event type from workflow configuration (#2808)
chore(conventional-labels.yml): remove unnecessary pull_request_review event type to streamline workflow configuration
2024-07-18 12:31:29 -07:00
Gabriel Luiz Freitas Almeida
6ffe579c7d
ci: refactor CI workflow conditions to run only when PR is approved (#2805)
* refactor: add check-reviews job to ci.yml

* refactor(ci.yml): update path-filter condition to depend on the output of check-reviews job for improved readability and maintainability

* chore(ci.yml): remove check-reviews job and update path-filter condition to check for 'lgtm' label before running the job
2024-07-18 19:19:47 +00:00
Gabriel Luiz Freitas Almeida
66e6370ea8
ci: update path-filter job condition in ci.yml (#2801)
refactor: update path-filter job condition in ci.yml

The path-filter job condition in ci.yml has been updated to include an additional check for the 'workflow_dispatch' event. This change ensures that the job runs when the event is triggered manually, in addition to when the pull request is approved or when it is not a draft PR. The updated condition improves the flexibility and coverage of the path-filter job.
2024-07-18 16:58:23 +00:00
Gabriel Luiz Freitas Almeida
afdff210b3
fix (typescript_test) : change cache-key to avoid errors (#2789)
fix(typescript_test.yml): change cache-key to avoid errors
2024-07-18 07:59:35 -07:00
Gabriel Luiz Freitas Almeida
e7c4474e07
ci: add auto_merge_enabled to pull_request types in ci.yml (#2762)
ci.yml: add pull_request types for auto_merge_enabled
2024-07-17 14:27:12 -03:00
Gabriel Luiz Freitas Almeida
c15e8ace8a
ci: update conditions at which CI runs (#2761)
* ci(conventional-labels.yml): update pull_request_target event types to remove unnecessary spaces and adjust pull_request_review event types to only trigger on submitted actions

* feat: add condition to run path-filter job only if PR is approved, manual run, or not a draft PR
2024-07-17 16:56:28 +00:00
Jordan Frazier
ae3439c40b
ci: add astra integration tests to CI (#2643)
* Add astra integration tests to CI

* Add astra integration tests to CI

* revert whitespace changes

* update filter

* Swap to using a scheduled job rather than filter
2024-07-16 17:38:17 -07:00
Gabriel Luiz Freitas Almeida
b811dcc34c
chore: move test-cli job to run separately from unit tests (#2712) 2024-07-15 13:33:30 -07:00
Gabriel Luiz Freitas Almeida
4268ee4d56
chore: Update python_test.yml to include splitCount and group arguments in make unit_tests command (#2709) 2024-07-15 16:13:26 -03:00
Lucas Oliveira
6756ef22b7
fix: added checkout to workflow (#2683) 2024-07-12 16:19:06 -07:00
Lucas Oliveira
e8c67974ab
fix: useless git commands on workflow (#2682) 2024-07-12 16:14:40 -07:00
Lucas Oliveira
f1b71ab353
fix: date on push command on fetch notion workflow (#2681)
Fix date on pull request workflow
2024-07-12 16:01:51 -07:00
Lucas Oliveira
83697fe31f
fix: fetch notion docs workflow origin on push (#2680) 2024-07-12 15:55:24 -07:00
Lucas Oliveira
78da36e8cd
fix: git workflow commands to push to repository (#2679) 2024-07-12 15:50:13 -07:00
Lucas Oliveira
c7944773d5
docs: fix gh workflow date step bad character (#2677) 2024-07-12 15:25:13 -07:00
Lucas Oliveira
f532bbd082
docs: fix gh workflow date step (#2676) 2024-07-12 15:20:17 -07:00
Lucas Oliveira
138552d7b5
docs: api page fix and workflow run fix (#2675)
* Fetched updated docs

* Fixed GitHub workflow for fetching docs
2024-07-12 22:14:28 +00:00
Lucas Oliveira
3aa2513a86
docs: added fetching from notion (#2670)
* Added new Docusaurus instance that fetches automatically from Notion

* Add Github workflow to fetch docs from Notion

* Added legacy peer deps to solve dependency problems

* Fix git ignore and added pages
2024-07-12 22:59:52 +02:00
Gabriel Luiz Freitas Almeida
bab941f3e6
chore: add path for deploying documentation updates (#2671)
chore: Add path for deploying documentation updates
2024-07-12 22:56:52 +02:00
Cristhian Zanforlin Lousa
dc5ac092fb
test: Add Test to Prevent Bug on Output Inspection for Grouped Components (#2667)
* add new test for bug on output inspection + grouped components

* [autofix.ci] apply automated fixes

* 🔧 (typescript_test.yml): increase shard count from 14 to 15 to distribute tests more evenly
🔧 (typescript_test.yml): fix syntax issues in conditional expressions

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-12 20:10:00 +00:00
Gabriel Luiz Freitas Almeida
28fa012fd6
chore: update HuggingFace Spaces build script to use correct space name (#2649)
The HuggingFace Spaces build script has been updated to use the correct space name "Langflow/Langflow" instead of "Langflow/Langflow-Preview". This ensures that the correct space is restarted when triggered.
2024-07-11 19:56:33 -03:00
Gabriel Luiz Freitas Almeida
34c1a4d469
fix: add timeout for unit tests workflows (#2613)
fix: add timeout for unit tests and test CLI in Python workflow
2024-07-09 19:08:39 -07:00
Gabriel Luiz Freitas Almeida
6488b0247e
ci: add delete-reports job to delete if all jobs succeed (#2542)
chore: Add conditional step to delete-reports job in TypeScript test workflow
2024-07-05 10:56:27 -03:00
Gabriel Luiz Freitas Almeida
71e3ed92d8
ci: add outputs and conditional step to TypeScript test workflow (#2541)
* feat: Add outputs to TypeScript test workflow

The recent code changes added outputs to the TypeScript test workflow in order to capture the status of the tests. This will allow for better visibility and tracking of test failures.

* chore: Add conditional step to merge-reports job in TypeScript test workflow
2024-07-04 20:59:46 +00:00
Gabriel Luiz Freitas Almeida
05efa58f5e
feat: add auto_merge_enabled to pull_request_target types in conventional-labels.yml (#2539) 2024-07-04 15:24:37 -03:00
Gabriel Luiz Freitas Almeida
f0725ce874
chore: remove unnecessary output in validate-pr job (#2535) 2024-07-04 13:37:15 -03:00