Commit graph

177 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
fc9401c195 chore: Add GitHub workflows for JavaScript and Python autofix
This commit adds GitHub workflows for JavaScript and Python autofix. The JavaScript workflow is triggered on pull requests and pushes to the main branch, specifically for changes in the "src/frontend" directory. It checks out the code, sets up Node.js, caches Node.js dependencies, installs Node.js dependencies, and runs Prettier for code formatting. The Python workflow is also triggered on pull requests and pushes to the main branch, but for changes in the "poetry.lock", "pyproject.toml", "src/backend", and "tests" directories. It checks out the code, installs Ruff, and runs Mypy for type checking and code formatting.
2024-06-26 12:09:02 -03:00
Gabriel Luiz Freitas Almeida
20ceb42504 chore: Update release.yml to use the correct branch for the commit 2024-06-25 11:34:20 -07:00
Gabriel Luiz Freitas Almeida
8ea95420c7 Update workflows for better test coverage and integration (#2344)
*  (typescript_test.yml): add workflow_dispatch event to trigger workflow manually with branch input parameter

🔧 (typescript_test.yml): update workflow to checkout code from the specified branch when triggered manually

* 📝 (lint-py.yml): update linting workflow to trigger on specific pull request events and checks requested action

📝 (lint-py.yml): add a specific job to run Mypy for static type checking in the linting workflow

* 🔧 (python_test.yml): update pull_request event types and branches to trigger on more actions for better test coverage and integration
2024-06-25 10:21:38 -07:00
Gabriel Luiz Freitas Almeida
791bd70c04 chore: Fix curl command in release.yml to wait for server start 2024-06-25 10:21:38 -07:00
Cristhian Zanforlin Lousa
4077135ba7 Updating Tests and Fixing Related Bugs (#2319)
* 🐛 (tableNodeCellRender): fix templateValue check to use Object.keys
 (textAreaComponent): add Case component for conditional rendering
♻️ (editNodeModal): remove commented-out useEffect code
 (basicExamples.spec): update test selectors and increase timeout values

 (filterEdge.spec.ts): update test IDs to match new naming conventions

 (inputListComponent.spec.ts, intComponent.spec.ts): update test IDs and streamline test steps for consistency and clarity

 (keyPairListComponent.spec.ts): update test ID for model element
 (keyPairListComponent.spec.ts): add steps to test editing model options and saving changes

*  (tests): update end-to-end tests for chat input/output and modal components

- Update test selectors for better accuracy
- Add keyboard interaction in chatInputOutputUser.spec.ts
- Improve file handling in chat image upload test
- Refine prompt modal component tests for better validation
- Enhance twoEdges.spec.ts with additional view controls

* ♻️ (tests): refactor repeated click actions into reusable function in e2e tests

*  (tests): replace waitForTimeout with waitForSelector in end-to-end tests

*  (typescript_test.yml): add --debug flag to Playwright test command for better debugging

*  (typescript_test.yml): enable trace option in Playwright tests for better debugging

*  (typescript_test.yml): reduce Playwright test workers from 2 to 1 to improve stability
 (textInputOutput.spec.ts): add waitFor visibility checks to ensure elements are visible before interaction

*  (tests): update paths for test assets to correct locations
 (tests): add waitForSelector to ensure elements are loaded before interaction

*  (typescript_test.yml): increase Playwright workers from 1 to 2 to speed up tests
 (chatInputOutputUser.spec.ts): increase timeout for AI response to 100000ms
 (chatInputOutputUser.spec.ts): correct file path for image upload test
 (deleteComponentFlows.spec.ts): change waitFor to target last checkbox-component
 (store.spec.ts): increase timeout for share button to 100000ms

* 🐛 (flows.py): ensure flow names are unique by appending a number if necessary

* Apply Ruff formatting

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhianzl <Cristhianzl@users.noreply.github.com>
2024-06-25 10:21:38 -07:00
Gabriel Luiz Freitas Almeida
fff4537b1e
Fixes CLI and server (#2342)
* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* Refactor "created_at" column type for consistency and fix cancel middleware (#2316)

* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* refactor: update "created_at" column type to use the "sa" module for consistency

* Update README.md

Add 1.0 banner

* chore: Remove unused import in ToolCallingAgent.py

* fix: adapt RequestCancelledMiddleware to handle cancelled requests

* chore: Remove unused import in test_helper_components.py

* refactor: Declare queue variable with explicit type in RequestCancelledMiddleware

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>

* chore: Update AstraDB.py imports and method signature for search_documents

* chore: Update package versions in pyproject.toml files

* chore: Update run-name in release.yml for Langflow Release

* fix: add call to _add_documents_to_vector_store in AstraDB component

* chore: Fix missing parentheses in RequestCancelledMiddleware

* chore: Update pydantic-settings and tenacity versions

The commit updates the versions of the `pydantic-settings` and `tenacity` packages in the `poetry.lock` file. The `pydantic-settings` version is updated from 2.3.3 to 2.3.4, and the `tenacity` version is updated from 8.4.1 to 8.4.2.

* Update README.md

Add 1.0 banner

* fix fetch data to work even with autologin true

* format code

* deactivate stop button until we have a better solution (#2337)

* consistent auth error status code

* [Fix] unhandled http errors in background tasks (#2326)

* handle exceptions for background task

* revert changes that is not related to this HTTP handler exception

* Refactor model GoogleGenerativeAIModel (#2251)

* refactor model GoogleGenerativeAIModel

* adds model options

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* Fix .env values not being honored in CLI (#2336)

* chore: Update launch.json to include environment file

The launch.json file was updated to include the environment file path for the "run" command in the "Python: Flask" configuration. This change ensures that the necessary environment variables are loaded when running the backend base of Langflow frontend. The previous configuration had the environment variables set in the "env" field, but it has been removed as it is redundant with the new environment file inclusion.

* chore: Update dotenv import and environment variable handling

This commit updates the import statement for the `dotenv` module in the `__main__.py` file. It adds the `dotenv_values` function to the import statement to enable loading environment variables from a file. Additionally, it introduces a new section of code that maps environment variables to their corresponding variables and types, allowing for more flexible and dynamic configuration. The commit also updates the `run` function to update variables based on environment variables, if they are present. This change improves the handling of environment variables and enhances the configurability of the application.

* deactivate stop button until we have a better solution (#2337)

* consistent auth error status code

* [Fix] unhandled http errors in background tasks (#2326)

* handle exceptions for background task

* revert changes that is not related to this HTTP handler exception

* Refactor model GoogleGenerativeAIModel (#2251)

* refactor model GoogleGenerativeAIModel

* adds model options

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

---------

Co-authored-by: ming luo <itestmycode@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>

* Update GitHub Actions workflows and dependencies (#2341)

* chore: Add GitHub Actions workflow for testing documentation build

* Fix server start command in GitHub Actions workflows

* chore: Bump langflow and langflow-base versions

* chore: Update GitHub Actions workflow for docs_test

* chore: Update typing import in __main__.py

* Fix user authentication and authorization issues (#2343)

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: ming luo <itestmycode@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2024-06-25 09:20:55 -07:00
Gabriel Luiz Freitas Almeida
d85657f214
Refactor "created_at" column type for consistency and fix cancel middleware (#2316) (#2320)
* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* Refactor "created_at" column type for consistency and fix cancel middleware (#2316)

* chore: update linting workflows to include dev branch in merge_group

* Update README.md

Add 1.0 banner

* Update README.md

* chore: update package versions in pyproject.toml files

* refactor: update "created_at" column type to use the "sa" module for consistency

* Update README.md

Add 1.0 banner

* chore: Remove unused import in ToolCallingAgent.py

* fix: adapt RequestCancelledMiddleware to handle cancelled requests

* chore: Remove unused import in test_helper_components.py

* refactor: Declare queue variable with explicit type in RequestCancelledMiddleware

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>

* chore: Update AstraDB.py imports and method signature for search_documents

* chore: Update package versions in pyproject.toml files

* chore: Update run-name in release.yml for Langflow Release

* fix: add call to _add_documents_to_vector_store in AstraDB component

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
2024-06-24 13:15:54 -07:00
dependabot[bot]
1293a1ec4e chore(deps): bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 16:05:05 +00:00
Gabriel Luiz Freitas Almeida
2102c1d5f2 chore: update linting workflows to include dev branch in merge_group 2024-06-24 07:41:40 -07:00
Gabriel Luiz Freitas Almeida
f4ddc60d2a chore: Update docker-build.yml to include pre_release option and base-latest tag 2024-06-24 04:28:23 -07:00
Gabriel Luiz Freitas Almeida
7c35e29da2 chore: Update docker-build.yml to include pre_release option and base-latest tag 2024-06-24 04:28:23 -07:00
Gabriel Luiz Freitas Almeida
de2a95d5aa chore: Update docker-build.yml to include pre_release option 2024-06-24 04:28:23 -07:00
Gabriel Luiz Freitas Almeida
cda1f63213 chore: Increase timeout for server startup in pre-release.yml
The timeout for waiting for the server to start in the pre-release.yml workflow file has been increased from 40 seconds to 120 seconds. This change allows more time for the server to start up before timing out, ensuring that the server is ready for testing.
2024-06-22 17:14:47 -03:00
Nicolò Boschi
076498ebcf
docker: make images arm64-compatible (#2199)
* optimize multi-arch docker build on x86

* test

* test

* test

* test

* separate build

* separate build

* fix package versions

* also fixes the release

* orjson

* orjson

* fix cryptography

* fix duckdb

* all

* all

* fix

* use provenance
2024-06-21 19:57:51 -07:00
Gabriel Luiz Freitas Almeida
9615e7405d Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-21 15:51:37 -03:00
ming luo
574f1d7692 ci pr-checker enforce meaningful pr title and description 2024-06-20 09:48:19 -07:00
Gabriel Luiz Freitas Almeida
ad89346cc0 refactor: Update Docker Build workflow to remove unnecessary steps and improve efficiency 2024-06-20 10:48:04 -03:00
Gabriel Luiz Freitas Almeida
ddc7719a6d chore: Apply Ruff formatting 2024-06-19 10:16:01 -03:00
Gabriel Luiz Freitas Almeida
c22d7a4a7a chore: Update lint-js workflow to run Prettier and commit changes
Apply Prettier formatting to the codebase by running the Prettier command in the src/frontend directory. Also, add a step to commit the changes automatically using the git-auto-commit-action. This update improves code formatting and ensures consistency in the repository.
2024-06-19 09:47:31 -03:00
ogabrielluiz
bac6a8cdff Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-19 01:11:38 -03:00
ming
8ccb9e7597
Fix mypy (#2204)
* mypy github action

* fix endpoints.py mypy lint

* directly run poetry run mypy

* line based mypy error suppression

* switch to use make lint

* fix ruff issues

* fix EmbedComponent lint

* fix prompt.py's lint
2024-06-18 13:52:54 -04:00
ogabrielluiz
584cd59961 Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-18 14:51:19 -03:00
ogabrielluiz
600c99b995 chore: Update platforms to only support linux/amd64 for docker build process 2024-06-17 18:20:45 -03:00
ogabrielluiz
83b859152f 🔧 (docker-build.yml): update platforms to only support linux/amd64 for docker build process 2024-06-17 10:41:02 -03:00
cristhianzl
fcf4512210 merge dev into two_edges 2024-06-17 10:01:28 -03:00
ogabrielluiz
baba4b7185 (docker-build.yml): rename step from "Push Docker Image" to "Build and Push Docker Image" for clarity and accuracy 2024-06-17 07:57:46 -03:00
ogabrielluiz
7dae09ac92 chore: Update Docker build workflow to include file output 2024-06-17 07:17:32 -03:00
Nicolò Boschi
dceffa6e6f
fix docker tags on release process (#2196)
* fix docker tags on release process

* wait
2024-06-17 03:15:31 -07:00
Jordan Frazier
ca660cf8df
test: add astra integration test (#2189)
* add first astra integ test framework

* use fixtures

* remove old tests from merge

* Add correct sender type

* chore: Update unit test command in GitHub workflow

---------

Co-authored-by: ogabrielluiz <gabriel@langflow.org>
2024-06-15 19:50:38 -07:00
ogabrielluiz
5a04adfa1f chore: Comment out unused Docker build and container run steps 2024-06-15 11:53:13 -03:00
ogabrielluiz
7b89ff5cfb 🔧 (docker-build.yml): add TEST_TAG environment variable to specify the test tag for the Docker image
🔧 (docker-build.yml): update tags value to use the TEST_TAG environment variable for Docker image tagging
2024-06-15 11:51:04 -03:00
ogabrielluiz
a0ce61ccca chore: Update pip installation commands in pre-release workflow 2024-06-15 11:14:13 -03:00
ogabrielluiz
40cebd1bcf chore: Update package versions to latest in pyproject.toml files 2024-06-15 11:09:16 -03:00
Gabriel Luiz Freitas Almeida
dfc008b383
Update dependencies and fix docs (#2186)
* chore: Update chardet package to version 5.2.0

* chore: Update Docker build workflow to support multiple platforms and add container testing

* chore: Update pre-release workflow to include CLI testing

* chore: Update npm install command in lint-js.yml workflow

* chore: Update eslint and prettier versions in package.json

* fix: remove .mdx from link in docs

* Merge remote-tracking branch 'origin/dev' into update
2024-06-15 06:37:34 -07:00
Gabriel Luiz Freitas Almeida
5191638f8e
Update dependencies and workflows (#2185) 2024-06-15 06:02:08 -07:00
ogabrielluiz
b35efc458d chore: Update Dockerfile and Tags setup in docker-build.yml workflow 2024-06-14 17:14:52 -03:00
ogabrielluiz
5f5d444d78 chore: Update Dockerfile and Tags setup in docker-build.yml workflow 2024-06-14 17:01:00 -03:00
ogabrielluiz
d6d3c53695 chore: Update Dockerfile and Tags setup in docker-build.yml workflow 2024-06-14 17:01:00 -03:00
ogabrielluiz
3c430ff397 chore: Update Dockerfile and Tags setup in docker-build.yml workflow 2024-06-14 14:29:51 -03:00
ogabrielluiz
49962aeb57 chore: Update Dockerfile and Tags setup in docker-build.yml workflow 2024-06-14 14:19:06 -03:00
ogabrielluiz
52e472798a chore: Update lint-action to v2 in lint-js.yml and lint-py.yml workflows 2024-06-14 13:53:27 -03:00
ogabrielluiz
2443069611 chore: Update mypy command prefix to use "poetry run" 2024-06-14 12:33:18 -03:00
Gabriel Luiz Freitas Almeida
a9cb7b0f5e
Update linting workflows for frontend and Python code (#2171)
* chore: Update pre-commit hooks and dependencies

* chore: Add linting workflow for frontend code

* chore: Update linting workflow for Python code and include tests in pull requests

* chore: Add Ruff style check workflow for Python code
2024-06-14 06:27:48 -07:00
ogabrielluiz
3738a32b92 chore: Update Docker build workflow to include LANGFLOW_IMAGE build argument 2024-06-14 08:36:28 -03:00
ogabrielluiz
5f87e10127 🔧 (docker-build.yml): update setting output variables to use a file for better readability and maintainability 2024-06-14 08:19:38 -03:00
ogabrielluiz
05ceb29dec chore: Update Docker build workflow to include base and component images 2024-06-13 18:48:43 -03:00
ogabrielluiz
c818c47594 chore: Update Docker build workflow to include base and component images 2024-06-13 18:47:37 -03:00
Nicolò Boschi
968ec28fbc
docker: force python version to 3.12.3 (#2148)
* docker: force python version to 3.12.3

* also fixes pydantic

* remove ci build - too slow

* use lock file for deps

* use poetry.lock

* use poetry.lock
2024-06-12 06:09:46 -07:00
Nicolò Boschi
1110494615
feat: multi arch docker images (#2123) 2024-06-11 10:12:31 +02:00
ogabrielluiz
c3a0e3d598 chore: Upgrade langflow-base package version from 0.0.58 to 0.0.59 2024-06-06 18:57:40 -03:00