Commit graph

325 commits

Author SHA1 Message Date
Jordan Frazier
eedfe43e69
build: dockerfile with entrypoint (#4062)
Adds a dockerfile with an entrypoint for use with Datastax Langflow
2024-10-16 20:18:39 -07:00
Jordan Frazier
4a574da0c0
ci: fix release workflows for uv (#4053) 2024-10-07 21:41:19 +00:00
Gabriel Luiz Freitas Almeida
54dd81a681
chore: removes Poetry references from pyproject.toml and updates the project metadata (#4019)
* Remove Poetry references from pyproject.toml and update project metadata

* Remove '--no-update' flag from 'uv lock' commands in Makefile

* Add script metadata with Python version and dependencies

* Remove Poetry references and integrate UV setup in CI workflow

* Remove Poetry setup and installation from integration tests workflow

* Remove Poetry references and update workflow to use custom setup action

* Remove references to Poetry from configuration files
2024-10-04 17:24:55 +00:00
Jordan Frazier
06eebb5ca8
ci: small nightly fixes (#3993)
* Add back correct checkout steps

* fix directory
2024-10-02 16:36:55 +00:00
Jordan Frazier
e19d90bd6c
ci: fix releases with uv (#3971)
* Update scripts

* update the base dep in uv deps

* update nightly scripts

* Add uv creds for publish

* skip tests for now

* fix version

* only build the wheel

* try again

* add uv to python run

* [autofix.ci] apply automated fixes

* use uv cache

* more version fixe

* fixing versions

* fix base version

* Try no frozen?

* skip everything to try docker build

* tag

* frozen

* separate script for updating uv dep

* [autofix.ci] apply automated fixes

* hardcoded versions

* hardcoded versions

* add version to editable package

* build project before docker file runs

* try again

* fix uv patht o build

* don't know why this would mkae a difference

* debug statements

* debug statements

* debug statements

* change path to whl 🤷

* manually move the wheel...

* make dir

* try no sources

* add back tests

* refactor uv to action

* add uv action

* Update nightly build workflow to include uv lock files in version update commit

* Update lint-py workflow to use specific ref for setup-uv action

* Add checkout step to style-check-py GitHub Actions workflow

* Remove redundant GitHub ref syntax in lint-py.yml workflow

* Update lint-py.yml to use specific ref for setup-uv action

* Update action.yml: standardize quotes and remove redundant checkout step

* Add checkout step to GitHub Actions workflows for specific ref handling

- Introduced `actions/checkout@v4` step to multiple workflows to ensure code is checked out at a specific ref.
- Updated `.github/workflows/docker-build.yml`, `.github/workflows/release_nightly.yml`, `.github/workflows/lint-py.yml`, and `.github/workflows/style-check-py.yml` to include the new checkout step.
- Ensured credentials are persisted during the checkout process.

* Add checkout step to Python test workflow with specific ref

---------

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-10-02 05:37:04 -07:00
dependabot[bot]
0d2a03920d
build(deps):(deps): bump peter-evans/create-pull-request from 6 to 7 (#3976)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 18:31:30 +00:00
dependabot[bot]
a47a089fec
build(deps):(deps): bump install-pinned/ruff from 826c99bfba88282a5506ab737c92253a106c070e to f5afd2b0fca6556debe3e07025fc90e04fb3c44c (#3977)
build(deps):(deps): bump install-pinned/ruff

Bumps [install-pinned/ruff](https://github.com/install-pinned/ruff) from 826c99bfba88282a5506ab737c92253a106c070e to f5afd2b0fca6556debe3e07025fc90e04fb3c44c.
- [Release notes](https://github.com/install-pinned/ruff/releases)
- [Commits](826c99bfba...f5afd2b0fc)

---
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-10-01 18:31:05 +00:00
Gabriel Luiz Freitas Almeida
43ad226ddb
chore: update docker images to use uv (#3916)
* fix dev dependencies

* fix dev dependencies

* update lock

* Add langchain-unstructured dependency to pyproject.toml

* Switch to uv-based Docker image and streamline build process

- Use `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` as the base image
- Simplify environment variable setup and remove unnecessary ones
- Install project dependencies using `uv sync` with cache mounts
- Add and copy necessary files for the build process
- Update npm installation and frontend build steps
- Adjust entrypoint and runtime configurations
- Remove redundant user setup and streamline CMD execution

* Refactor Dockerfile to use multi-stage builds for optimized image size

- Introduce a builder stage to install dependencies and build the frontend.
- Use npm ci instead of npm install for more reliable builds.
- Copy built frontend assets to the final image.
- Transition to a runtime stage with a slimmer Python base image.
- Ensure the final image only contains necessary runtime dependencies.

* Switch base image to `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` and update Dockerfile

- Replace `python:3.12.3-slim` with `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` as the base image.
- Enable bytecode compilation and set link mode to copy.
- Update dependency installation process using `uv sync`.
- Simplify frontend build and copy process.
- Add OCI labels for image metadata.
- Update CMD to use `langflow-base` for running the application.

* Update Dockerfile to use uv base image and optimize dependency installation

- Switch base image to `ghcr.io/astral-sh/uv:python3.12-bookworm-slim`
- Combine apt-get commands and clean up to reduce image size
- Replace Poetry with uv for dependency management and caching

* Refactor Dockerfile to use multi-stage build for optimized image size

- Introduce a builder stage using `ghcr.io/astral-sh/uv:python3.12-bookworm-slim`
- Add a runtime stage using `python:3.12.3-slim`
- Copy the virtual environment from the builder stage to the runtime stage
- Remove the `uv` entrypoint to avoid invoking it by default

* Update Dockerfile: Fix indentation and remove redundant ENTRYPOINT reset

* ci: update release workflows to use uv (#3919)

* Update nightly build workflow to use 'uv' for dependency management and caching

- Replace Poetry with 'uv' for dependency installation and project setup
- Add steps to install 'uv' and set up caching for 'uv.lock'
- Modify Python setup to use version specified in 'pyproject.toml'
- Remove Node.js setup steps

* Update release workflow to use uv for dependency management

- Replace Poetry with uv for dependency installation and caching
- Update Python setup to use version specified in pyproject.toml
- Add steps to restore uv cache and install project dependencies using uv
- Adjust publish steps to maintain functionality with new setup

* Replace 'poetry publish' with 'uv publish' in Makefile for consistency

* Update nightly build workflow to use 'uv' for dependency management and caching

* Set up Node.js 20 in release_nightly workflow and update version verification logic

* Update Makefile to use `uv sync --frozen` for backend dependencies installation

* Update Makefile to pass arguments to 'uv build' and remove '--skip-existing' from publish commands

- Modified 'build_langflow' target to accept arguments.
- Removed '--skip-existing' from 'publish_base' and 'publish_base_testpypi' commands.
- Added TODO comments for updating test-pypi repository usage.

* Remove --skip-existing flag from uv publish commands and add TODO comments for test-pypi updates

* new lock

* Update CI workflow to remove version prefix and add build args

- Removed 'v' prefix from version extraction in nightly release workflow.
- Added '--no-sources' argument to the build command in the distribution step.

* Update CI workflow to use 'uv' for versioning and publishing

- Replace 'poetry' with 'uv' for version extraction in release checks

* Update CI workflow to use UV_PUBLISH_TOKEN for PyPI publishing

* Add verification step for 'langflow-nightly' name and version in CI workflow

- Corrected awk commands for extracting 'langflow-base' name and version.
- Added a new step to verify 'langflow-nightly' name and version against expected values.

* feat: Update dev.Dockerfile to use 'uv' for dependency management and caching

* update dockerfiles with --no-editable

---------

Co-authored-by: phact <estevezsebastian@gmail.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
2024-09-30 22:49:25 +00:00
Sebastián Estévez
fbb097dc4c
chore: uv to replace poetry (#3900)
* uv sync works

* fist stab at Makefile

* uv treatment for langflow-base

* sqlmodel to 0.0.18

* add reinstall_backend to Makefile

* makefile - reinstall_backend fix and unit_test dependency

* fix dev dependencies

* fix dev dependencies

* fix dev dependencies

* lock

* Makefile

* [autofix.ci] apply automated fixes

* Update Makefile

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

* delete update_dependencies

* fix lint

* Remove Poetry lock check from GitHub Actions workflow

* Switch to 'uv' for dependency management and caching in style-check workflow

* Update style-check workflow to use '--only-dev' flag for Ruff check

* Integrate 'uv' package setup and caching in GitHub Actions workflows

* Update version check in GitHub Actions to use 'uv tree' for langflow-base

* Remove redundant poetry environment setup in GitHub Actions workflow

* Add step to minimize uv cache in GitHub Actions workflow

* Update GitHub Actions workflow to use 'uv' for dependency management and caching

* Remove redundant script execution from build_langflow target in Makefile

* [autofix.ci] apply automated fixes

* Switch build system from Poetry to Hatchling and update dependencies

- Replace `poetry-core` with `hatchling` in build-system requirements
- Update `langflow-base` dependency to version `0.0.96`
- Add `tool.hatch.build.targets.wheel` configuration
- Adjust `tool.uv.sources` paths for `langflow-frontend` and `langflow-base`

* update lock

* Switch build system from Poetry to Hatchling in pyproject.toml

* Add langchain-unstructured dependency to pyproject.toml

---------

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-09-25 13:40:30 -07:00
Jordan Frazier
b12fa9f874
ci: explicitly pass secrets for fe test (#3905)
explicitly pass secrets
2024-09-24 19:21:09 +00:00
Jordan Frazier
f802f9a92a
ci: make nightly run all fe tests (#3888)
make nightly run all fe tests
2024-09-23 18:35:23 +00:00
Jordan Frazier
14b6157b1d
ci: remove unnecessary ref checkout for nightly tests (#3847)
Remove unnecessary ref checkout for nightly tests
2024-09-18 09:49:55 -07:00
Jordan Frazier
a7d1449e9d
ci: tag fixes and robustness to workflow failures (#3838) 2024-09-17 18:03:48 -07:00
Jordan Frazier
1ea42725a4
ci: adds step to push to ghcr (#3779) 2024-09-12 09:23:04 -07:00
Christophe Bornet
7273a6e78a
feat: Add CassandraGraphVectorStoreComponent and HtmlLinkExtractorComponent (#3757)
* Add CassandraGraphVectorStoreComponent and HtmlLinkExtractorComponent

* Move uuid import to global imports

* fix test with new text spliter

* update poetry lock

* ci: add continue-on-error to py_autofix.yml

---------

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-09-11 14:56:25 -03:00
anovazzi1
810cf72487
fix: Update templates and include global variables (#3755)
* update templates

* update to include global variables

* Refactor code to include global variables

* update PythonREPLTool.py

* [autofix.ci] apply automated fixes

* update pythonREPL and example

* Refactor code to handle decoding chat messages and handle decoding errors

*  (Simple Agent.spec.ts): Add test case to fill textarea with specific text for testing purposes
📝 (Simple Agent.spec.ts): Update test case descriptions for better clarity and accuracy
 (Simple Agent.spec.ts): Update test assertions to match the expected behavior of the test case

* [autofix.ci] apply automated fixes

* 🐛 (Dynamic Agent.spec.ts): fix environment variable name from BRAVE_SEARCH_API_KEY to SEARCH_API_KEY for consistency and clarity
💡 (Dynamic Agent.spec.ts): add additional test cases to improve test coverage and ensure specific text is not present in the chat output

* 🔧 (.github/workflows/typescript_test.yml): update environment variable name from BRAVE_SEARCH_API_KEY to SEARCH_API_KEY for consistency
🐛 (Travel Planning Agent.spec.ts): fix test to skip if SEARCH_API_KEY is not available in the environment variables

*  (Simple Agent.spec.ts): update expected count of python words to 3 for accurate test validation

* updating search tools

* [autofix.ci] apply automated fixes

* change examples

* update travel planning to include global variable

* Refactor search API component to include result limiting

* 📝 (Travel Planning Agent.spec.ts): remove unnecessary empty line to improve code readability and consistency

* test: adjusts asserts to make the test pass successfully

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2024-09-11 14:47:42 +00:00
Cristhian Zanforlin Lousa
6061951cba
tests: new tests folders organization (#3716)
* new tests folders organizations

* 📝 (nightly_build.yml): update tests_folder path from "tests/scheduled" to "tests/core" to reflect the correct location of the tests folder

* renaming test folder

* changing e2e to integrations folder

* 📝 (frontend/tsconfig.json): update test file paths to reflect changes in folder structure for better organization and clarity

* change assets folder

* 📝 (frontend): update file paths to remove redundant 'core' directory in test assets

* 📝 (Document QA.spec.ts, Vector Store.spec.ts, fileUploadComponent.spec.ts): Update file paths to correctly reference test assets in integration and unit tests.

* github suggestions
2024-09-09 14:45:30 -03:00
Jordan Frazier
7f6b3873ee
ci: enables docker builds for nightly tags (#3719) 2024-09-09 08:47:42 -07:00
Jordan Frazier
7b3e51f769
ci: create a nightly build workflow (#3553)
* test poetry install

* Add nightly builds workflow

* remove old comments and fix poetry

* remove old debug statement

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-05 19:13:04 +00:00
Nicolò Boschi
96872f3aa5
chore: refactor and add components integration tests (#3607)
* improve inegration tests

* add fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-02 15:21:47 +02:00
dependabot[bot]
751edcf5dc
build(deps):(deps): bump install-pinned/ruff from 48a5818c5f7ce30e2822b67fb9c26d3e25d31fab to 826c99bfba88282a5506ab737c92253a106c070e (#3645)
build(deps):(deps): bump install-pinned/ruff

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

---
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-09-02 04:42:58 -07:00
Gabriel Luiz Freitas Almeida
1a5752c025
chore: Update lint workflow to use poetry for running Mypy (#3630)
Update lint workflow to run Mypy directly with poetry
2024-08-30 16:03:38 +00:00
Nicolò Boschi
1718b3c9ea
ci: make validate pull request action less verbose (#3061) 2024-08-29 01:06:02 +00:00
Jordan Frazier
1483a465f2
ci: add workflow dispatch to empty nightly build workflow (#3560)
Add workflow dispatch
2024-08-26 15:02:03 -07:00
Jordan Frazier
c773d5c20c
ci: add empty nightly workflow (#3559) 2024-08-26 21:41:08 +00:00
Jordan Frazier
75520729de
build: fix astra integration tests (#3518) 2024-08-26 16:44:27 +00:00
Gabriel Luiz Freitas Almeida
5e2d9b2c22
ci: add python-versions input parameter to workflow (#3511)
* ci: Add python-versions input parameter to workflow

* build: Update CI workflow with additional Python versions and default values.

* ci: Update default Python versions in matrix configuration

* build: Fix python version matrix generation in workflow
2024-08-22 18:49:42 +00:00
Gabriel Luiz Freitas Almeida
6f0760382e
ci: Simplify needs array in ci_success job (#3509) 2024-08-22 11:03:52 -07:00
Gabriel Luiz Freitas Almeida
b814c30716
refactor: Fix version extraction in GitHub Actions workflow (#3501) 2024-08-22 05:20:45 -07:00
Gabriel Luiz Freitas Almeida
2076c3ac83
build: Remove unnecessary quotes in workflow conditional statements. (#3491) 2024-08-21 18:52:47 -07:00
Gabriel Luiz Freitas Almeida
280d1ca6bc
ci: add inputs to workflow call of ci and release (#3488)
* ci: Add dynamic input for Python versions and frontend tests folder in CI workflow.

* build: Update python versions to ['3.10', '3.11', '3.12'] and set frontend tests folder to 'tests'
2024-08-21 18:22:20 -07:00
Gabriel Luiz Freitas Almeida
450cc20ebf
ci: fix conditional statements for 'true' values (#3486) 2024-08-21 18:14:43 -07:00
dependabot[bot]
fea82ed6c9
build(deps):(deps): bump peter-evans/create-pull-request from 5 to 6 (#3141)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 18:56:06 +00:00
Cristhian Zanforlin Lousa
a5cdab68bb
tests: Categorize Tests into CI and Scheduled Groups (#3391)
* categoring tests

*  (actionsMainPage-shard-1.spec.ts): Add end-to-end tests for selecting and deleting items, searching flows, and searching components on the main page to ensure proper functionality and user experience.

* 📝 (frontend/tsconfig.json): update file paths in include section to match the correct directory structure for scheduled-end-to-end tests.

* 🔧 (typescript_test.yml): update path in the command to change directory to run end-to-end tests in the frontend folder
📝 (typescript_test.yml): improve comments for better readability and understanding of the workflow logic

* add yml configuration to choose folder to run CI

* 🔧 (ci.yml): Fix formatting issues and add support for running tests in a specific folder
📝 (ci.yml): Update job dependencies to improve readability and maintainability of the workflow configuration

* ♻️ (typescript_test.yml): refactor matrix values for shardIndex and shardTotal to reduce redundancy and improve readability

* categoring tests

*  (actionsMainPage-shard-1.spec.ts): Add end-to-end tests for selecting and deleting items, searching flows, and searching components on the main page to ensure proper functionality and user experience.

* 📝 (frontend/tsconfig.json): update file paths in include section to match the correct directory structure for scheduled-end-to-end tests.

* 🔧 (typescript_test.yml): update path in the command to change directory to run end-to-end tests in the frontend folder
📝 (typescript_test.yml): improve comments for better readability and understanding of the workflow logic

* add yml configuration to choose folder to run CI

* 🔧 (ci.yml): Fix formatting issues and add support for running tests in a specific folder
📝 (ci.yml): Update job dependencies to improve readability and maintainability of the workflow configuration

* ♻️ (typescript_test.yml): refactor matrix values for shardIndex and shardTotal to reduce redundancy and improve readability

* 🐛 (fileUploadComponent.spec.ts): fix file path for file upload to correctly locate the test file in the assets folder

* changing test_folder

*  (fileUploadComponent.spec.ts): update file path for file upload test to match new file location in the project structure

* fix input on playwright command
2024-08-16 18:13:47 -03:00
Gabriel Luiz Freitas Almeida
93e0ffb05e
ci: allow specifying python versions and limit ci to 3.10 only (#3388)
* ci(python-test): Add ability to specify Python versions to test.

* ci: Specify Python version 3.10 for backend tests.

* build: Require python-versions input in workflow file.
2024-08-16 11:28:35 -07:00
Gabriel Luiz Freitas Almeida
450ebb723a
ci: Refactor report merge step to only run if necessary. (#3361) 2024-08-15 08:54:32 -07:00
Gabriel Luiz Freitas Almeida
4e6b7398b2
ci: Add condition to execute CI workflow for release package. (#3298) 2024-08-13 07:57:13 +00:00
Gabriel Luiz Freitas Almeida
70d847e74a
chore: Add step to diff poetry.lock in py_autofix workflow. (#3299) 2024-08-12 18:00:39 -07:00
Gabriel Luiz Freitas Almeida
6105606f5c
ci: add checkout before setting up python (#3297)
* build: Set up Python 3.12 and Poetry caching in docker workflow.

* build: checkout repository before setting up Python 3.12 and Poetry.
2024-08-12 17:19:32 -07:00
Gabriel Luiz Freitas Almeida
d8af6652e0
build: Set up Python 3.12 and Poetry caching in docker workflow. (#3296) 2024-08-12 16:52:52 -07:00
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