Commit graph

13,587 commits

Author SHA1 Message Date
anovazzi1
7fe6c53b37
refactor: improve node toolbar code (#3311)
* remove repeated code

* refactor: remove useless code

* feat: sort input parameters in GenericNode renderInputParameter

* refactor: remove unused code in GenericNode component

* refactor: add NodeName component for displaying and editing node names

* refactor: add NodeDescription component for displaying and editing node descriptions

* fix import and add autofocus on nodeName

* feat: add NodeStatus component for displaying and managing node status

* [autofix.ci] apply automated fixes

* refactor: remove unused code in GenericNode component

* fix bugs on minimize

* [autofix.ci] apply automated fixes

* refactor: remove unused code and handle count in GenericNodeToolbar component

* refactor: Add useShortcuts hook for handling keyboard shortcuts in nodeToolbarComponent

* refactor: Add keyboard shortcuts handling to nodeToolbarComponent need to test

* refactor: Update FreezeAllVertices function in NodeToolbarComponent

* feat: Add getNodeLength function to calculate the length of a node's template fields

* refactor: Update RenderIcons component to use navigator.platform for detecting macOS

* refactor: Add ShortcutDisplay component to nodeToolbarComponent

* refactor: Update nodeToolbarComponent to remove RenderIcons and add ShortcutDisplay

* refactor: Improve keyboard shortcuts handling in nodeToolbarComponent

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-14 15:04:25 +00:00
Ítalo Johnny
493b73f9d8
fix: add double quotes to curl command generation (#3337) 2024-08-14 14:36:00 +00:00
Gabriel Luiz Freitas Almeida
9035f1194f
ci: Update pytest configuration and add pytest-flakefinder. (#3330) 2024-08-14 14:29:03 +00:00
ytkimirti
ce17bd4e71
feat: Add support for metadata filtering and namespaces for the Upstash Vector component (#3254)
* feat: add metadata filtering and namespace support for the upstash vector component

* docs: add upstash vector to the vectorstores doc

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-14 07:18:45 -07:00
Edwin Jose
ac4442d221
feat: Google Drive Search Component (#3319)
* feat: Google Drive Search Component

feat: Google Drive Search Component
Ability to search Google Drive and get back the relevant Doc id or Doc urls

* Updated Google Drive Search.py
2024-08-14 07:11:58 -07:00
Mendon Kissling
17337b4748
docs: fix render deployment and docs (#3309)
* initial-content

* doc-update
2024-08-14 03:45:56 -07:00
Lucas Oliveira
c19a031b9c
fix: dark mode and header text display issues (#3315)
* Fix dark mode not starting with the browser saved variable

* Added the Last saved at text on the header too

* Fixed css
2024-08-13 20:01:46 -03:00
Alex Leventer
5ad5ca5857
Update Astra link in README.md (#3314)
* Update link in README.md

* Update README.md

* Update getting-started-installation.md

* Update README.KR.md

* Update README.ja.md
2024-08-13 17:29:54 -05:00
anovazzi1
62b1b88644
refactor: improve NodeOutputField and NodeInputField components (#3235)
* remove refhtml and create new component

* refactor: refactor NodeOutputField component in GenericNode

* refactor: refactor NodeOutputField component in GenericNode

* refactor: refactor NodeInputField component in GenericNode

* refactor: remove output shortcut

* [autofix.ci] apply automated fixes

* refactor: remove console.log statements in NodeOutputField component

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-13 16:52:26 -03:00
Jordan Frazier
120786fe38
dep: lock psycopg to 3.1.19 (#3292) 2024-08-13 12:29:36 -07:00
Ítalo Johnny
4f5dca89f3
test: adds new tests for new variable service (#3306)
* test: adds new tests for new method

* test: remove unused variable
2024-08-13 18:01:10 +00:00
anovazzi1
64aecddeca
refactor: add components for node name, description, and status (#3248)
* remove repeated code

* refactor: remove useless code

* feat: sort input parameters in GenericNode renderInputParameter

* refactor: remove unused code in GenericNode component

* refactor: add NodeName component for displaying and editing node names

* refactor: add NodeDescription component for displaying and editing node descriptions

* fix import and add autofocus on nodeName

* feat: add NodeStatus component for displaying and managing node status

* [autofix.ci] apply automated fixes

* refactor: remove unused code in GenericNode component

* fix bugs on minimize

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-13 14:37:33 -03:00
Ítalo Johnny
952ba5eef1
feat: centralize global variable management (#3284)
* test: add tests for global variable endpoints

* test: add unit tests variable service

* fix: anticipate checks to prevent the code from breaking

* feat: add a new method to interface

* feat: add method to update fields in variable service

* feat: replace variable api code

* fix: mypy error

* fix: mypy error

* feat(variable): Allow deleting variables by name or ID in DatabaseVariableService.

* refactor(api): Simplify delete method in variable router.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-08-13 13:32:57 +00:00
anovazzi1
665842680e
enhancement: prevent esc on codeAreaModal (#3232)
* add onEscapeKeyDown

* refactor: Add ConfirmationModal to CodeAreaModal for better user experience

* refactor: Update CodeAreaModal to use ReactAce for code editing

* fix closing o x modal

* refactor: Update CodeAreaModal to use ReactAce for code editing

* [autofix.ci] apply automated fixes

* decompose object

---------

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-08-13 12:35:02 +00:00
Gabriel Luiz Freitas Almeida
46f705461e
chore: update lock files with new versions (#3300)
* chore: update lock files with new versions

* build(uvicorn): Update uvicorn to v0.30.6 and its hash values.
2024-08-13 11:16:40 +00: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
c5d9cbae49
feat: add dynamic state model creation and update (#3271)
* feat: add initial implementation of dynamic state model creation and output getter in graph state module

* feat: implement _reset_all_output_values method to initialize component outputs in custom_component class

* feat: add state model management with lazy initialization and dynamic instance getter in custom_component class

* feat: Refactor Component class to use public method get_output_by_method

Refactor the Component class in the custom_component module to change the visibility of the method `_get_output_by_method` to public by renaming it to `get_output_by_method`. This change improves the accessibility and clarity of the method for external use.

* feat: add output setter utility to manage output values in state model properties

* feat: implement validation for methods' classes in output getter/setter utilities in state model to ensure proper structure

* feat: add state model creation from graph in state_model.py

* feat: enhance Graph class with lazy loading for state model creation from graph

* feat: add unit tests for state model creation and validation in test_state_model.py

* feat: add unit tests for state model creation and validation in test_state_model.py

* feat: add functional test for graph state update and validation in test_graph_state_model.py

* fix: update _instance_getter function to accept a parameter in component.py for state model instance retrieval

* refactor: rename test to clarify purpose in test_state_model.py for functional state update validation

* chore: import Finish constant in test_graph_state_model.py for improved clarity and usage in state model tests

* refactor: add optional validation in output getter/setter methods for improved method integrity in state model handling

* refactor: enhance state model creation with optional validation and error handling for output methods in model.py

* refactor: serialize and deserialize GraphStateModel in test_graph_state_model.py

* refactor: improve error message and add verbose mode for graph start in test_state_model.py

* refactor: remove verbose flag from graph.start in TestCreateStateModel for consistency in test_state_model.py

* refactor: disable validation when creating GraphStateModel in state_model.py for improved flexibility

* refactor: add validation documentation for method attributes in model.py to enhance code clarity and usability

* refactor: expand docstring for build_output_getter in model.py to clarify usage and validation details

* refactor: add detailed docstring for build_output_setter in model.py to improve clarity on functionality and usage scenarios

* refactor: add comprehensive docstring for create_state_model in model.py to clarify functionality and usage examples

* refactor: enhance docstring for create_state_model_from_graph in state_model.py to clarify functionality and provide examples

* test: add JSON schema validation in graph state model tests for improved structure and correctness verification

* refactor: Improve graph_state_model.json_schema unit test readability and structure.
2024-08-12 17:53:57 -07:00
Sai Kolasani
2ffd723065
Update Ollama Model + Links (#3294)
wip

Co-authored-by: Sai Kolasani <sai.kolasani@datastax.com>
2024-08-13 00:45:31 +00: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
Carlos Coelho
dc419d11fd
fix: Corrected URI handling in SQLDatabaseComponent (#3291) 2024-08-12 15:45:13 -07:00
Lucas Oliveira
7264028e41
refactor: optimize flow saving functionality and implement manual saving (#3283)
* fixed patch update flow

* fixed update flow patch to receive id by payload

* created save flow hook with auto save and manual save functions

* fix poetry lock

* added auto save check with environment variable

* removed unused user

* separated autosave and put the flow as a creation with nodes and edges

* removed set nodes that skipped saving

* implemented auto save hook

* removed autosave from setNodes and setEdges

* added auto save hook and saved on viewport move and added useEffect to save on nodes and edges changed

* changed type of setNodes

* removed unused var

* removed deletion of empty flow

* Added saving of flow on button when autoSave is disabled

* disable saving when the nodes are empty

* removed save loading as false when the access token is renewed

* implemented useDebounce

* added save loading to save flow hook

* removed setting nodes and edges on fetching, since they are set when the current flow is updated

* removed unused var

* use debounce hook to save flow

* set nodes and edges on current flow id change

* removed useplaygroundeffect

* removed unused import

* put set save loading before the If

* removed flow cleaning and inputs setting, since the inputs and outputs are set on the ResetFlow function

* updated to use ResetFlow function to update everything regarding flow

* removed flow pool get on resetFlow, for it to be fetched only if the user is inside the flow

* updated packagelock

* Changed router to outlet on app.tsx to use createRouter

* Created authSettingsGuard to guard the general settings

* Fixed routes to use createBrowserRouter to allow the use of useBlocker

* Changed index.tsx to use RouterProvider and the router just created

* Changed flowStore to have a local flow state

* Implemented setting the current flow state when saving the flow

* Added the update of current flow when auto saving

* changed current flow to use the current flow from Flow Store instead of Flows Manager Store

* Changed codeTabsComponent Tweaks check to show if its checked

* Removed unused variables

* Removed browser router from context wrapper

* Removed unused console.log

* Changed initialSetup to just run when opening the modal

* changed confirmationModal to have destructiveCancel and to only call onCancel if the other buttons were not pressed

* Created a SaveChangesModal that confirms if the user wants to save their changes

* Get folder by id when folder id changes too

* Changed reset flow calls to store whole flow

* Added check if user is exiting page to prevent him when there are unsaved changes

* Added new types on ConfirmationModalType

* Implement save on clicking the save button on the header

* added save component shortcut to use save shortcut as save flow

* added save component shortcut on shortcutsStore type

* changed save shortcut to save component on node toolbar

* added save shortcut to header menubar

* changed shortcuts name to be compatible with existing ones

* changed shortcuts to be backwards compatible

* changed save to changes to maintain retrocompatibility

* changed save_component to save to maintain retrocompatibility

* Changed time difference to unsaved changes

* changed the toolbar select item to get the right save shortcut

* Changed save flow to use current flow from useFlowStore instead of the previous saved flow

* changed changesNotSaved to include flow name and metadata

* Added way of saving the flow settings just locally instead of directly to database

* Changed shareModal to save flow with hook

* removed old auto saving on connect

* Removed save functions from flowsManagerStore

* refactor: Remove unused imports and state variables in EditFlowSettings component

* use current flow not saved one and refactored page to not receive flow

* added check of isFlowPage to display the menubar

* Added checks to render playground if API key is valid and if Flows exists

* Added check to not display X on chat on playground page

* Updated flows variable to be undefined by start to prevent things from loading before flows initialize

* Implemented log builds parameter to not allow the builds to be logged if user not on flowPage
2024-08-12 22:21:52 +00:00
Ítalo Johnny
7a93a708ee
fix: message sorting in playground (#3293) 2024-08-12 22:09:08 +00:00
dependabot[bot]
a00bbe0a84
build(deps): bump aiohttp from 3.10.1 to 3.10.2 in /src/backend/base (#3269)
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.10.1 to 3.10.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.10.1...v3.10.2)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-12 19:53:07 +00:00
William Espegren
e09f157af6
fix: update parameters in spider components (#3280)
* fix: make spider tool work

* upgrade spider-client

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-12 19:45:20 +00:00
Gabriel Luiz Freitas Almeida
775d659380
fix: correct vertex build delete function (#3289)
* refactor: Rearrange imports for clarity and consistency.

* fix: delete now executes the sql statement correctly
2024-08-12 12:21:27 -07:00
Edwin Jose
9d8009f2f5
feat: Gmail Loader component created (#3241)
* feat: Gmail Loader component created

* [autofix.ci] apply automated fixes

* Updated Gmail.py

ran make format and ran make lint

* [autofix.ci] apply automated fixes

* Update Gmail.py

Errors Resolved.

Suggestion from @ogabrielluiz added.

Note this is a ChatLoader, since GmailLoader uses the BaseChatloader as base class.

But this would be a highly useful feature. if required i could rewrite the component as document loader. but either way this would be an amazing feature.

Planning to publish gmails tools also in next steps mostly.

* solved lint issues in Gmail.py

Key Changes:
1.	Added Optional to the import statement.
2.	Updated the type hint of label_ids to Optional[List[str]] to allow it to be None or a list of strings.

* remove commented

* remove commented

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
2024-08-12 11:57:03 -07:00
Ítalo Johnny
ecfcbdaa5a
docs: variable global precautions (#3285)
docs: add section with variable global precautions
2024-08-12 13:15:57 -03:00
Lucas Oliveira
ebc2e7db42
Update README.md (#3282) 2024-08-11 14:48:21 -03:00
neeraj gupta
1789e2da63
fix: correct issue with The "No suitable component" error is appearing on the OpenAI component and other components due to a missing check (#3279) 2024-08-11 08:22:45 -03:00
Mike Manh
583bc74019
fix(get-python-api-code):fixing errors in a file uploading flow, as in issue #2799 (#2815)
fixing errors in a file uploading flow, as in issue #2799

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-08-09 22:53:39 +00:00
Scott Regan
07615fed1b
docs: minor changes on readme text (#3270)
minor changes on readme text
2024-08-09 20:23:30 +02: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
9da2c34551
fix: update type to silence warning and memory chatbot json (#3265)
* fix: update value type in DefaultPromptField from str to Any for increased flexibility in input handling

* fix: replace _instantiate_input with instantiate_input for consistency in input instantiation across the codebase

* chore: update test durations

* update memory chatbot
2024-08-09 16:01:25 +00:00
Gabriel Luiz Freitas Almeida
0eb694f1d7
refactor: Reorganize imports and enhance type checks in PythonCodeStructuredTool.py (#3266)
refactor: Reorganize imports and enhance type checks in PythonCodeStructuredTool.py for better clarity and robustness
2024-08-09 16:00:10 +00:00
Lucas Oliveira
98f00d75f0
Update README.md (#3204)
* Update README.md

Updated Readme with suggestions

* Changed core features

* Changed thumbnail of video

* Fixed hero image

* Fixed readme texts

* Update README.md
2024-08-09 15:46:17 +00:00
goliath-yamon
5ce8cbda9b
Refactored and improved PythonCodeStructuredTool, SearXNGTool, and RunnableExecutor (#3239)
* enhancement: Update PythonCodeStructuredTool to create inputs automatically and accept global variables

* [autofix.ci] apply automated fixes

* feat: Create a tool to search using SearXNG

* [autofix.ci] apply automated fixes

* refactor: reorganize imports and type annotations in PythonCodeStructuredTool.py for clarity and consistency

* refactor: clean up imports and enhance type annotations in SearXNGTool.py for improved readability and type safety

* refactor: Improved PythonCodeStructuredTool to allow arguments to have any types

* refactor: Formatted and refactored SearXNGTool

* refactor: Allowed RunnableExecutor to stream output and changed its build method to asynchronous.

---------

Co-authored-by: Haseong Kim <dynaferkim@gmail.com>
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-08-09 08:30:23 -07:00
Gabriel Luiz Freitas Almeida
b0f80e4638
feat: add log_builds parameter to build_flow for optional vertex build logging (#3262) 2024-08-09 14:46:15 +00:00
Gabriel Luiz Freitas Almeida
d0484ba412
fix: enhance error handling in build_flow and add error handling for Flow build (#3259)
* feat: add error handling for Flow build

The code changes in `buildUtils.ts` add error handling for the Flow build process. It includes a new case for handling errors in the switch statement, which displays the error message and triggers the `onBuildError` function. This change ensures that errors during the Flow build are properly handled and the build process is stopped.

* feat: enhance error handling in build_flow to capture and report HTTP exceptions in the flow building process
2024-08-09 14:15:35 +00:00
Gabriel Luiz Freitas Almeida
645c723d21
feat: start using dev mode flag and add exception filter in logger (#3260)
* refactor: reorganize logger module and add setup.py for logging configuration

* refactor: update logger import path to align with recent module restructuring

* refactor: add logging configuration parameter to Graph initialization for improved logging setup flexibility

* feat: create logging init module for improved logger configuration and management

* refactor: update Settings class to include development mode flag and associated validator for enhanced configuration management

* refactor: enhance logger.py with DEV mode handling and TypedDict for log configuration settings

* feat: add settings module with DEV mode flag and helper functions for setting development state

* refactor: update flow assertions in tests to check for Data object type instead of Flow object type

* feat: add deepcopy method to Graph class to copy start and end components, ensuring proper graph cloning functionality

* feat: implement deepcopy method in Component class for proper cloning of inputs and configuration attributes

* feat: enhance attribute access in Component class to support backwards-compatible private attributes retrieval

* feat: improve test assertion for list_flows in custom component to display types of returned objects for better debugging

* feat: refactor imports in constants.py and remove redundant Data class definition for cleaner code structure

* feat: refactor imports in logger.py to include NotRequired from typing_extensions for better type hinting support
2024-08-09 13:59:49 +00:00
Gabriel Luiz Freitas Almeida
56ecb18ef5
feat: Improve caching logic and add disk caching option (#3246)
* feat: add diskcache package version 5.6.3 to poetry.lock and pyproject.toml for improved caching functionality

* refactor: simplify CacheMiss import in cache service files for better clarity and maintainability

* feat: Add AsyncDiskCache class for disk-based caching

* feat: Add disk caching option in CacheServiceFactory with AsyncDiskCache

* feat: Restrict cache_type to specific literals: async, redis, memory, disk for enhanced type safety and clarity

* feat: Change get_requester_result to async await for proper async handling in Vertex class

* fix: Update outputs dictionary in ResultData class to use key-value pairs for better readability and maintainability

* fix: Improve caching logic in Graph class by ensuring vertex builds properly handle exceptions and cache updates more reliably

* feat: Add teardown method to AsyncDiskCache for clearing cache directory during cleanup process

* fix: Correct variable name in Graph class to ensure proper handling of vertex results in caching logic

* feat: Clear AsyncDiskCache on initialization to align behavior with in-memory cache until frontend handling is implemented
2024-08-09 12:42:21 +00:00
Gabriel Luiz Freitas Almeida
edb3c9e4d2
fix: change sync_get_file_content_dicts to use get_file_content_dicts (#3250)
feat: refactor sync_get_file_content_dicts to use get_file_content_dicts

Refactor the `sync_get_file_content_dicts` method in the `Message` class to use the `get_file_content_dicts` method instead. This change improves the code by using a more descriptive and accurate method name.
2024-08-08 22:23:02 +00:00
vinicius Mello
d606a4dac3
feat: add huggingface endpoint retry (#3236)
* feat: added retry when calling huggingface endpoint

* chore: added default value to retry input

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-08 20:41:42 +00:00
Gabriel Luiz Freitas Almeida
e42b6bdb94
fix: change ValueError into Warning to allow disconnected flows to run and other small fixes (#3249)
* fix: add task to end all traces on asyncio.CancelledError in build_flow function for better cleanup handling

* fix: replace ValueError with warnings in Graph class when vertices exist without edges for better logging and handling

* chore: add type annotations to test_vector_store_rag_add function

* feat: Fix assertion in test_create_flows to check for substring in name field

The assertion in the test_create_flows function was modified to check if the name field contains the substring "Flow 1" instead of an exact match. This change allows for more flexibility in the test and ensures that the test passes even if there are additional characters in the name field.
2024-08-08 20:21:21 +00:00
Edwin Jose
3e6c863a8b
feat: create google drive ingest component (#3129)
* feat: create google drive ingest component

It adds the basic implementation of the Google Drive Loader.

* feat: create google drive ingest component

Created a basic Google Drive loader component

* Updated the Icon

* updated the formatting

ran make format to update the formatting

* Addressed comments
2024-08-08 18:53:21 +00:00
Daniel Gines
ca008a1346
fix: update PYTHON_REQUIRED extraction to correctly capture Python version (#3199)
* Updates and changes to the Makefile:

1. Added removal of `frontend` directory inside `src/backend/base/langflow/` and `build` directory inside `src/frontend/` to the `clean_npm_cache` target.
2. Added descriptive comments for the `build_and_install`, `build_and_run`, `fix_codespell`, `setup_poetry`, `unit_tests`, `integration_tests`, and `tests_frontend` targets.

Looking forward to your feedback.

* Improvements: Structure and Functionality Improvements

- Reorganized commands to facilitate understanding of the structure
- Enhanced check_tools to detect the Python version
- Added a multi-environment script to support check_tools
- make init now builds the frontend and runs the application
- Aesthetic improvements in output messages

TO-DO:
- Reorganize container-related commands
- Reorganize other miscellaneous utilities
- Document usage in the application docs
- Prepare the dev environment following the maintainers' recommended practices

* Removed pre-commit as it is no longer used.

* Restored 'patch' command in Makefile, it updates the 'pyproject.toml' with the new project version.

* fix: update PYTHON_REQUIRED extraction to correctly capture Python version

Changed the method of extracting the required Python version from `pyproject.toml`:

- Old method:
  `PYTHON_REQUIRED=$(shell grep "^python" pyproject.toml | sed -n 's/.*"\(.*\)"$$/\1/p')`

- New method:
  `PYTHON_REQUIRED=$(shell grep '^python[[:space:]]*=' pyproject.toml | sed -n 's/.*"\([^"]*\)".*/\1/p')`

The old method of capturing the Python version was too broad and could inadvertently match other dependencies starting with "python" (e.g., `python-socketio`, `python-dotenv`). This could lead to incorrect extraction of the required Python version, potentially causing version mismatches and failures in environment setup.

* fix: update PYTHON_REQUIRED extraction to correctly capture Python version

Changed the method of extracting the required Python version from `pyproject.toml`:

- Old method:
  `PYTHON_REQUIRED=$(shell grep "^python" pyproject.toml | sed -n 's/.*"\(.*\)"$$/\1/p')`

- New method:
  `PYTHON_REQUIRED=$(shell grep '^python[[:space:]]*=' pyproject.toml | sed -n 's/.*"\([^"]*\)".*/\1/p')`

The old method of capturing the Python version was too broad and could inadvertently match other dependencies starting with "python" (e.g., `python-socketio`, `python-dotenv`). This could lead to incorrect extraction of the required Python version, potentially causing version mismatches and failures in environment setup.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-08-08 15:15: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
William Espegren
7a36cc9ebf
feat: add Spider Web Scraper & Crawler (#2439)
* spider files

* rebuild required

* add spider-client here

* Feat: Spider Web Crawler & Scraper

* Feat: spider integration

* new input not working

* [autofix.ci] apply automated fixes

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

* fix: add outputs and configure build method

* style: run ruff

* Refactor SpiderTool to use 'crawl' instead of 'build' for generating Markdown content

* chore: add type ignore

* chore: new lock

* chore: Update mem0ai dependency to version 0.0.5

---------

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-08-08 05:53:05 -07:00