Commit graph

37 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
05cd6e4fd7
1.0 Alpha (#1599)
* Update model kwargs and temperature values

* Update keyboard shortcuts for advanced editing

* make Message field have no handles

* Update OpenAI API Key handling in OpenAIEmbeddingsComponent

* Remove unnecessary field_type key from CustomComponent class

* Update required field behavior in CustomComponent class

* Refactor AzureOpenAIModel.py: Removed unnecessary "required" attribute from input parameters

* Update BaiduQianfanChatModel and OpenAIModel configurations

* Fix range_spec step type validation

* Update RangeSpec step_type default value to "float"

* Fix Save debounce

* Update parameterUtils to use debounce instead of throttle

* Update input type options in schemas and graph base classes

* Refactor run_flow_with_caching endpoint to include simplified and experimental versions

* Add PythonFunctionComponent and test case for it

* Add nest_asyncio to fix event loop issue

* Refactor test_initial_setup.py to use RunOutputs instead of ResultData

* Remove unused code in test_endpoints.py

* Add asyncio loop to uvicorn command

* Refactor load_session method to handle coroutine result

* Fixed saving

* Fixed debouncing

* Add InputType and OutputType literals to schema.py

* Update input type in Graph class

* Add new schema for simplified API request

* Add delete_messages function and update test_successful_run assertions

* Add STREAM_INFO_TEXT constant to model components

* Add session_id to simplified_run_flow_with_caching endpoint

* Add field_typing import to OpenAIModel.py

* update starter projects

* Add constants for Langflow base module

* Update setup.py to include latest component versions

* Update Starter Examples

* sets starter_project fixture to Basic Prompting

* Refactor test_endpoints.py: Update test names and add new tests for different output types

* Update HuggingFace Spaces link and add image for dark mode

* Remove filepath reference

* Update Vertex params in base.py

* Add tests for different input types

* Add type annotations and improve test coverage

* Add duplicate space link to README

* Update HuggingFace Spaces badge in README

* Add Python 3.10 installation requirement to README

* Refactor flow running endpoints

* Refactor SimplifiedAPIRequest and add documentation for Tweaks

* Refactor input_request parameter in simplified_run_flow function

* Add support for retrieving specific component output

* Add custom Uvicorn worker for Langflow application

* Add asyncio loop to LangflowApplication initialization

* Update Makefile with new variables and start command

* Fix indentation in Makefile

* Refactor run_graph function to add support for running a JSON flow

* Refactor getChatInputField function and update API code

* Update HuggingFace Spaces documentation with duplication process

* Add asyncio event loop to uvicorn command

* Add installation of backend in start target

* udpate some starter projects

* Fix formatting in hugging-face-spaces.mdx

* Update installation instructions for Langflow

* set examples order

* Update start command in Makefile

* Add installation and usage instructions for Langflow

* Update Langflow installation and usage instructions

* Fix langflow command in README.md

* Fix broken link to HuggingFace Spaces guide

* Add new SVG assets for blog post, chat bot, and cloud docs

* Refactor example rendering in NewFlowModal

* Add new SVG file for short bio section

* Remove unused import and add new component

* Update title in usage.mdx

* Update HuggingFace Spaces heading in usage.mdx

* Update usage instructions in getting-started/usage.mdx

* Update cache option in usage documentation

* Remove 'advanced' flag from 'n_messages' parameter in MemoryComponent.py

* Refactor code to improve performance and readability

* Update project names and flow examples

* fix document qa example

* Remove commented out code in sidebars.js

* Delete unused documentation files

* Fix bug in login functionality

* Remove global variables from components

* Fix bug in login functionality

* fix modal returning to input

* Update max-width of chat message sender name

* Update styling for chat message component

* Refactor OpenAIEmbeddingsComponent signature

* Update usage.mdx file

* Update path in Makefile

* Add new migration and what's new documentation files

* Add new chapters and migration guides

* Update version to 0.0.13 in pyproject.toml

* new locks

* Update dependencies in pyproject.toml

* general fixes

* Update dependencies in pyproject.toml and poetry.lock files

* add padding to modal

*  (undrawCards/index.tsx): update the SVG used for BasicPrompt component to undraw_short_bio_re_fmx0.svg to match the desired design
♻️ (undrawCards/index.tsx): adjust the width and height of the BasicPrompt SVG to 65% to improve the visual appearance

* Commented out components/data in sidebars.js

* Refactor component names in outputs.mdx

* Update embedded chat script URL

* Add data component and fix formatting in outputs component

* Update dependencies in poetry.lock and pyproject.toml

* Update dependencies in poetry.lock and pyproject.toml

* Refactor code to improve performance and readability

* Update dependencies in poetry.lock and pyproject.toml

* Fixed IO Modal updates

* Remove dead code at API Modal

* Fixed overflow at CodeTabsComponent tweaks page

*  (NewFlowModal/index.tsx): update the name of the example from "Blog Writter" to "Blog Writer" for better consistency and clarity

* Update dependencies versions

* Update langflow-base to version 0.0.15 and fix setup_env script

* Update dependencies in pyproject.toml

* Lock dependencies in parallel

* Add logging statement to setup_app function

* Fix Ace not having type="module" and breaking build

* Update authentication settings for access token cookie

* Update package versions in package-lock.json

* Add scripts directory to Dockerfile

* Add setup_env command to build_and_run target

* Remove unnecessary make command in setup_env

* Remove unnecessary installation step in build_and_run

* Add debug configuration for CLI

* 🔧 chore(Makefile): refactor build_langflow target to use a separate script for updating dependencies and building
 feat(update_dependencies.py): add script to update pyproject.toml dependency version based on langflow-base version in src/backend/base/pyproject.toml

* Add number_of_results parameter to AstraDBSearchComponent

* Update HuggingFace Spaces links

* Remove duplicate imports in hugging-face-spaces.mdx

* Add number_of_results parameter to vector search components

* Fixed supabase not commited

* Revert "Fixed supabase not commited"

This reverts commit afb10a6262.

* Update duplicate-space.png image

* Delete unused files and components

* Add/update script to update dependencies

* Add .bak files to .gitignore

* Update version numbers and remove unnecessary dependencies

* Update langflow-base dependency path

* Add Text import to VertexAiModel.py

* Update langflow-base version to 0.0.16 and update dependencies

* Delete start projects and commit session in delete_start_projects function

* Refactor backend startup script to handle autologin option

* Update poetry installation script to include pipx update check

* Update pipx installation script for different operating systems

* Update Makefile to improve setup process

* Add error handling on streaming and fix streaming bug on error

* Added description to Blog Writer

* Sort base classes alphabetically

* Update duplicate-space.png image

* update position on langflow prompt chaining

* Add Langflow CLI and first steps documentation

* Add exception handling for missing 'content' field in search_with_vector_store method

* Remove unused import and update type hinting

* fix bug on egdes after creating group component

* Refactor APIRequest class and update model imports

* Remove unused imports and fix formatting issues

* Refactor reactflowUtils and styleUtils

* Add CLI documentation to getting-started/cli.mdx

* Add CLI usage instructions

* Add ZoomableImage component to first-steps.mdx

* Update CLI and first steps documentation

* Remove duplicate import and add new imports for ThemedImage and useBaseUrl

* Update Langflow CLI documentation link

* Remove first-steps.mdx and update index.mdx and sidebars.js

* Update Docusaurus dependencies

* Add AstraDB RAG Flow guide

* Remove unused imports

* Remove unnecessary import statement

* Refactor guide for better readability

* Add data component documentation

* Update component headings and add prompt template

* Fix logging level and version display

* Add datetime import and buffer for alembic log

* Update flow names in NewFlowModal and documentation

* Add starter projects to sidebars.js

* Fix error handling in DirectoryReader class

* Handle exception when loading components in setup.py

* Update version numbers in pyproject.toml files

* Update build_langflow_base and build_langflow_backup in Makefile

* Added docs

* Update dependencies and build process

* Add Admonition component for API Key documentation

* Update API endpoint in async-api.mdx

* Remove async-api guidelines

* Fix UnicodeDecodeError in DirectoryReader

* Update dependency version and fix encoding issues

* Add conditional build and publish for base and main projects

* Update version to 1.0.0a2 in pyproject.toml

* Remove duplicate imports and unnecessary code in custom-component.mdx

* Fix poetry lock command in Makefile

* Update package versions in pyproject.toml

* Remove unused components and update imports

* 📦 chore(pre-release-base.yml): add pre-release workflow for base project
📦 chore(pre-release-langflow.yml): add pre-release workflow for langflow project

* Add ChatLiteLLMModelComponent to models package

* Add frontend installation and build steps

* Add Dockerfile for building and pushing base image

* Add emoji package and nest-asyncio dependency

* 📝 (components.mdx): update margin style of ZoomableImage to improve spacing
📝 (features.mdx): update margin style of ZoomableImage to improve spacing
📝 (login.mdx): update margin style of ZoomableImage to improve spacing

* Fix module import error in validate.py

* Fix error message in directory_reader.py

* Update version import and handle ImportError

* Add cryptography and langchain-openai dependencies

* Update poetry installation and remove poetry-monorepo-dependency-plugin

* Update workflow and Dockerfile for Langflow base pre-release

* Update display names and descriptions for AstraDB components

* Update installation instructions for Langflow

* Update Astra DB links and remove unnecessary imports

* Rename AstraDB

* Add new components and images

* Update HuggingFace Spaces URLs

* Update Langflow documentation and add new starter projects

* Update flow name to "Basic Prompting (Hello, world!)" in relevant files

* Update Basic Prompting flow name to "Ahoy World!"

* Remove HuggingFace Spaces documentation

* Add new files and update sidebars.js

* Remove async-tasks.mdx and update sidebars.js

* Update starter project URLs

* Enable migration of global variables

* Update OpenAIEmbeddings deployment and model

* 📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment
📝 (inputs.mdx): add margin to image style to improve spacing and center alignment

📝 (rag-with-astradb.mdx): add margin to image styles to improve spacing and readability

* Update welcome message in index.mdx

* Add global variable feature to Langflow documentation

* Reorganized sidebar categories

* Update migration documentation

* Refactor SplitTextComponent class to accept inputs of type Record and Text

* Adjust embeddings docs

*  (cardComponent/index.tsx): add a minimum height to the card component to ensure consistent layout and prevent content from overlapping when the card is empty or has minimal content

* Update flow name from "Ahoy World!" to "Hello, world!"

* Update documentation for embeddings, models, and vector stores

* Update CreateRecordComponent and parameterUtils.ts

* Add documentation for Text and Record types

* Remove commented lines in sidebars.js

* Add run_flow_from_json function to load.py

* Update Langflow package to run flow from JSON file

* Fix type annotations and import errors

* Refactor tests and fix test data

---------

Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: carlosrcoelho <carlosrodrigo.coelho@gmail.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Matheus <jacquesmats@gmail.com>
2024-04-04 02:46:44 -03:00
Gabriel Luiz Freitas Almeida
2d425d5e68 Fix model_dump method call in test_database.py 2023-11-22 08:22:38 -03:00
Gabriel Luiz Freitas Almeida
7a98ce7c36 Adds updated_at and folder cols 2023-11-21 20:57:07 -03:00
Gabriel Luiz Freitas Almeida
020488e97b Fix typos and update method names 2023-11-21 14:49:47 -03:00
Gabriel Luiz Freitas Almeida
171d918e10 Fix incorrect method call in test_database.py 2023-11-21 14:47:30 -03:00
Gabriel Luiz Freitas Almeida
c6dfb90bcf 🐛 fix(flows.py): remove unused imports and fix function call to read_flows
🐛 fix(test_database.py): fix function call to Flow.model_validate
🐛 fix(test_llms_template.py): fix values in test cases
🔥 chore(test_store.py): remove unused test file and test case
2023-11-21 14:45:02 -03:00
Gabriel Luiz Freitas Almeida
60f6d08fc3 Merge remote-tracking branch 'origin/dev' into feature/store 2023-11-14 21:41:58 -03:00
Gabriel Luiz Freitas Almeida
e4d8687a09 ruff format 2023-11-13 18:32:34 -03:00
Gabriel Luiz Freitas Almeida
780b0d68d8 🔧 fix(test_database.py): add description field to FlowCreate object to fix test failure caused by missing required field
🐛 fix(test_user.py): update error message and details for invalid UUID input in test_patch_user_wrong_id and test_delete_user_wrong_id to provide more specific information
2023-11-02 22:19:58 -03:00
Gabriel Luiz Freitas Almeida
c50d1344ca rename getters to deps 2023-10-18 09:18:16 -03:00
Gabriel Luiz Freitas Almeida
479a808634 🔧 fix(endpoints.py): remove unused import and function call to improve code cleanliness and maintainability
🔧 fix(endpoints.py): move import statement to the top of the file for better organization and readability
🔧 fix(getters.py): change service type from DATABASE_MANAGER to DATABASE_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from CACHE_MANAGER to CACHE_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from SESSION_MANAGER to SESSION_SERVICE for consistency and clarity
🔧 fix(getters.py): change service type from TASK_MANAGER to TASK_SERVICE for consistency and clarity
🔧 fix(getters.py): remove unused function get_chat_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_settings_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_db_service() to improve code cleanliness and maintainability
🔧 fix(getters.py): remove duplicate function get_session() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused import statement to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function setup_superuser() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function teardown_superuser() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function teardown_services() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_settings_manager() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_session_manager() to improve code cleanliness and maintainability
🔧 fix(utils.py): remove unused function initialize_services() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused import statement to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function get_session_override() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function distributed_client_fixture() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function client_fixture() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function test_user() to improve code cleanliness and maintainability
🔧 fix(conftest.py): remove unused function active_user

🐛 fix(test_endpoints.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_login.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_setup_superuser.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
🐛 fix(test_user.py): update import statements to use get_db_service instead of get_db_manager to improve code semantics
2023-09-22 18:07:55 -03:00
Gabriel Luiz Freitas Almeida
b3febf25dd Merge remote-tracking branch 'origin/dev' into celery 2023-09-22 14:50:19 -03:00
Gabriel Luiz Freitas Almeida
c88f9bf8a0 🔧 chore(conftest.py): refactor client fixture to use dependency overrides for session and add session fixture for creating a session with an in-memory SQLite database
🔧 chore(conftest.py): add distributed_env fixture to set up environment variables for distributed testing
🔧 chore(conftest.py): add distributed_client fixture for distributed testing with Celery
🔧 chore(conftest.py): remove unused imports and fixtures
🔧 chore(test_cache.py): remove unused client fixture from test_build_graph
🔧 chore(test_creators.py): remove unused client fixture from test_lang_chain_type_creator_to_dict
🔧 chore(test_database.py): remove unused client fixture from test_download_file
2023-09-22 11:03:17 -03:00
Gabriel Luiz Freitas Almeida
20e14d49b4 🐛 fix(test_database.py): remove unused imports to improve code readability
 feat(test_database.py): add support for session management using session_getter to improve code organization and maintainability
🐛 fix(test_endpoints.py): remove unused imports to improve code readability
 feat(test_endpoints.py): add support for session management using session_getter to improve code organization and maintainability
🐛 fix(test_login.py): remove unused imports to improve code readability
 feat(test_login.py): add support for session management using session_getter to improve code organization and maintainability
2023-09-20 18:40:19 -03:00
Gabriel Luiz Freitas Almeida
3b2bfd06cc 🔧 fix(test_database.py): fix test_create_flow function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_read_flows function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_read_flow function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_update_flow function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_delete_flow function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_create_flows function signature to include logged_in_headers parameter
🔧 fix(test_database.py): fix test_upload_file function signature to include logged_in_headers parameter
🔧 fix(test_database.py): fix test_download_file function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_create_flow_with_invalid_data function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_get_nonexistent_flow function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_update_flow_idempotency function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_update_nonexistent_flow function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_delete_nonexistent_flow function signature to include active_user and logged_in_headers parameters
🔧 fix(test_database.py): fix test_read_empty_flows function signature to include active_user and logged_in_headers parameters
2023-08-25 12:49:57 -03:00
Gabriel Luiz Freitas Almeida
16695c8241
Merge branch 'login' into authentication 2023-08-25 15:23:22 +00:00
Gabriel Luiz Freitas Almeida
fc93e4ced0 🔀 chore(test_database.py): update import statement for Session from sqlalchemy.orm to sqlmodel to match the library being used 2023-08-25 10:24:33 -03:00
DiogenesBR
fe3a9c61df fix the imports of orjson_dumps 2023-08-24 14:57:18 +00:00
Gabriel Luiz Freitas Almeida
061a9c09ba Merge remote-tracking branch 'origin/main' into dev 2023-08-23 21:42:34 -03:00
Gabriel Luiz Freitas Almeida
d0aa3261f1 🐛 fix(flows.py): change json.loads to orjson.loads for improved performance and compatibility with orjson library
🐛 fix(schemas.py): change json.dumps to orjson_dumps for improved performance and compatibility with orjson library
🐛 fix(utils.py): change json.loads to orjson.loads for improved performance and compatibility with orjson library
🐛 fix(loading.py): change json.loads to orjson.loads for improved performance and compatibility with orjson library
🐛 fix(utils.py): change json.loads to orjson.loads for improved performance and compatibility with orjson library
🐛 fix(vector_store.py): change json.loads to orjson.loads for improved performance and compatibility with orjson library
🐛 fix(types.py): change json.loads to orjson.loads for improved performance and compatibility with orjson library
🐛 fix(process.py): change json.loads to orjson.loads for improved performance and compatibility with orjson library
 feat(server.ts): change port variable case from lowercase port to uppercase PORT to improve semantics
 feat(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port

🔧 fix(base.py): import orjson instead of json to improve performance and compatibility
🔧 fix(frontend_node/llms.py): use orjson_dumps instead of json.dumps to improve performance and compatibility
🔧 fix(frontend_node/utilities.py): use orjson_dumps instead of json.dumps to improve performance and compatibility
🔧 fix(test_cache.py): import orjson and use orjson_dumps instead of json.dumps to improve performance and compatibility

🔧 fix(test_database.py): import correct json encoder and decoder functions to fix import errors
🔧 fix(test_database.py): replace json.dumps and json.loads with orjson_dumps and orjson.loads for better performance and compatibility
🔧 fix(test_loading.py): remove unused import statement
2023-08-22 11:04:41 -03:00
Gabriel Luiz Freitas Almeida
e2e14d8c93 🔥 refactor(router.py): remove unused flow_styles_router import to improve code cleanliness and reduce unused code
🔥 refactor(test_database.py): remove unused flow_style related tests to improve code cleanliness and reduce unused code
2023-08-07 10:24:02 -03:00
Gabriel Luiz Freitas Almeida
8a2358dae0 🔧 fix(custom_component.py): fix import paths for session_getter and Flow models in custom_component.py file
🔧 fix(test_cache_manager.py): fix import path for CacheManager in test_cache_manager.py file
🔧 fix(test_custom_component.py): fix import path for Flow and FlowCreate models in test_custom_component.py file
🔧 fix(test_database.py): fix import path for Flow, FlowCreate, and FlowUpdate models in test_database.py file
🔧 fix(test_websocket.py): fix import path for WebSocketDisconnect in test_websocket.py file
2023-08-05 22:18:20 -03:00
Gabriel Luiz Freitas Almeida
f658d62c51 🔥 chore(test_database.py): remove unused test_stress_create_flow function
The test_stress_create_flow function is not used in the codebase and is therefore removed to improve code readability and maintainability.
2023-06-16 19:12:45 -03:00
Gabriel Luiz Freitas Almeida
ad552d7add 🔨 refactor(test_database.py): remove unnecessary line breaks and whitespace
This commit removes unnecessary line breaks and whitespace in the test_database.py file to improve code readability and consistency.
2023-06-16 19:11:13 -03:00
gustavoschaedler
96b3331573 Tests fix 2023-06-16 23:07:23 +01:00
Gabriel Luiz Freitas Almeida
08f04d11d0 🔨 refactor(tests): fix formatting and remove unnecessary lines
The changes in this commit are purely cosmetic. The code has been reformatted to improve readability and consistency. Unnecessary lines have been removed to make the code more concise.
2023-06-16 18:53:42 -03:00
gustavoschaedler
78588ba260 Tests fix 2023-06-16 21:19:29 +01:00
gustavoschaedler
13d52e4987 Tests fix 2023-06-16 20:22:45 +01:00
gustavoschaedler
ceb6fda4c6 Tests fix 2023-06-16 19:47:35 +01:00
Gabriel Luiz Freitas Almeida
95597887b2 🔨 refactor(test_database.py): replace unused variable with underscore
The variable 'i' is not used in the for loop, so it has been replaced with an underscore to improve code readability.
2023-06-16 13:59:59 -03:00
Gabriel Luiz Freitas Almeida
ab1f9ed371 refactor: change colum flow to data and create description column 2023-06-09 09:22:10 -03:00
Gabriel Luiz Freitas Almeida
2feeeb9ecd 🐛 fix(flow.py): make flow field optional to allow creation of flows without a flow
🧪 test(test_database.py): add test case for creating flows without a flow
The flow field is now optional to allow creation of flows without a flow. This is useful when creating a flow that will be populated later. A test case was added to ensure that flows can be created without a flow.
2023-06-06 17:37:05 -03:00
Gabriel Luiz Freitas Almeida
1d33933d64 🐛 fix(__main__.py): make database_url parameter optional in update_settings function
🐛 fix(llms.py): add name check before checking if "azure" is in name.lower()
🔨 refactor(test_database.py): rename updated_flow_style variable to to_update_flow_style for clarity
The update_settings function now has an optional database_url parameter to allow for more flexibility in updating settings. The llms.py file now checks if the name variable is not None before checking if "azure" is in name.lower(). In test_database.py, the updated_flow_style variable is renamed to to_update_flow_style for clarity.
2023-06-06 16:30:34 -03:00
Gabriel Luiz Freitas Almeida
b1276028f9 🚨 fix(test_database.py): fix API endpoint URLs to include version number
 feat(test_database.py): add tests for creating, reading, updating, and deleting FlowStyle objects
🚨 fix(test_database.py): fix flow_id type in test_read_flow to be UUID instead of string
🚨 fix(test_database.py): fix HTTP method in test_update_flow from PUT to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_update_flow and test_update_nonexistent_flow
🚨 fix(test_database.py): fix HTTP method in test_update_flow_idempotency from PUT to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_update_flow_idempotency
🚨 fix(test_database.py): fix HTTP method in test_delete_flow from DELETE to PATCH
🚨 fix(test_database.py): fix API endpoint URLs in test_delete_flow and test_delete_nonexistent_flow
🚨 fix(test_database.py): fix API endpoint URLs in test_read_flows and test_read_empty_flows
The changes in this commit fix the API endpoint URLs to include the version number and fix various HTTP methods. Additionally, tests were added for creating, reading, updating, and deleting FlowStyle objects. The test_read_flow was fixed to use UUID instead of string for the flow_id.

🚨 test(database.py): add tests for CRUD operations on FlowStyle model
This commit adds tests for the CRUD operations on the FlowStyle model. The tests include creating a flow style, reading all flow styles, reading a single flow style, updating a flow style, and deleting a flow style. These tests ensure that the API endpoints for the FlowStyle model are working as expected.
2023-06-06 16:26:00 -03:00
Gabriel Luiz Freitas Almeida
ec585b8acc 🐛 fix(flow.py): change flow field type from str to Dict to allow for JSON data
 feat(flow.py): add validator to ensure flow field is a valid JSON object with required fields
The flow field in the FlowBase model has been changed from a string to a dictionary to allow for JSON data. A validator has been added to ensure that the flow field is a valid JSON object with the required fields. The tests have been updated to reflect these changes.
2023-06-05 13:40:14 -03:00
Gabriel Luiz Freitas Almeida
5a46c1e1a0 🐛 fix(database.py): handle case where data does not contain "flows" key
 feat(database.py): add default argument to json.dumps to handle datetime objects
🚨 test(database.py): add tests for batch flow creation, file upload, and file download
The fix in database.py handles the case where the data dictionary does not contain the "flows" key. This is important because the code assumes that the "flows" key is present and will raise an exception if it is not. The fix adds a check to see if the "flows" key is present and if not, it creates a new FlowListCreate object with the data as a list of FlowCreate objects.

The feature in database.py adds a default argument to the json.dumps function to handle datetime objects. This is important because the default json encoder does not handle datetime objects and will raise an exception if it encounters one.

The tests in test_database.py cover the batch creation of flows, uploading a file containing flows, and downloading a file containing flows. These tests ensure that the endpoints are working as expected and that the data is being handled correctly.
2023-06-04 22:58:43 -03:00
Gabriel Almeida
6cacfced09 🚧 chore(conftest.py): add fixtures for database testing
 test(database.py): add tests for CRUD operations on Flow model
The new fixtures added to conftest.py are session and client fixtures. These fixtures are used to create a test database and a test client for testing the database. The tests added to test_database.py test the CRUD operations on the Flow model. The tests include creating a flow, reading all flows, reading a single flow, updating a flow, and deleting a flow. These tests ensure that the database is working as expected and that the API endpoints for the Flow model are functioning correctly.
2023-05-30 21:24:23 -03:00