Commit graph

224 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
aeecd6279f 🚀 feat(test_setup_superuser.py): add tests for setup_superuser and teardown_superuser functions
🔒 test(test_setup_superuser.py): test when AUTO_LOGIN is True, setup_superuser should not call get_session and create_super_user

🔒 test(test_setup_superuser.py): test when username and password are default, setup_superuser should call get_session, query, filter, and create_super_user with correct arguments, and reset superuser credentials

🔒 test(test_setup_superuser.py): test when superuser already exists, setup_superuser should call get_session, query, and filter with correct arguments, and not call create_super_user

🔒 test(test_teardown_superuser_default_superuser): test teardown_superuser with default superuser, should call get_session, query, filter, delete, and commit with correct arguments

🔒 test(test_teardown_superuser_no_default_superuser): test teardown_superuser without default superuser, should not call get_session, query, delete, and commit
2023-09-18 17:43:31 -03:00
Gabriel Luiz Freitas Almeida
976b01875a 🔥 refactor(test_llms_template.py): remove unused imports and commented out code
🔒 test(test_llms_template.py): remove test_llms_settings test as it is no longer needed
2023-09-18 15:51:40 -03:00
Gabriel Luiz Freitas Almeida
0c3d59a804 🐛 fix(__main__.py): import correct function for get_db_manager and get_settings_manager in langflow/__main__.py
🐛 fix(api_key.py): import correct function for get_session in langflow/api/v1/api_key.py
🐛 fix(chat.py): import correct function for get_chat_manager and get_session in langflow/api/v1/chat.py
🐛 fix(components.py): import correct function for get_session in langflow/api/v1/components.py
🐛 fix(endpoints.py): import correct function for get_session and get_settings_manager in langflow/api/v1/endpoints.py
🐛 fix(flows.py): import correct function for get_session and get_settings_manager in langflow/api/v1/flows.py
🐛 fix(login.py): import correct function for get_session and get_settings_manager in langflow/api/v1/login.py
🐛 fix(users.py): import correct function for get_session in langflow/api/v1/users.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/agents/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/chains/base.py
🐛 fix(custom_component.py): import correct function for get_db_manager in langflow/interface/custom/custom_component.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/document_loaders/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/embeddings/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/llms/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/memories/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/output_parsers/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/prompts/base.py
🐛 fix(base.py): import correct function for get_settings_manager in langflow/interface/retrievers/base.py

🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect new module location
🐛 fix(base.py): update import statement for get_settings_manager function to reflect

🔧 fix(test_user.py): update import statement for get_settings_manager to reflect new module structure
🔧 fix(test_user.py): update variable names for superuser and superuser password to match new naming convention
🔧 fix(test_user.py): update variable names for superuser and superuser password to match new naming convention
🔧 fix(test_vectorstore_template.py): update import statement for get_settings_manager to reflect new module structure
2023-09-18 15:42:39 -03:00
Gabriel Luiz Freitas Almeida
01a289dd9a 🐛 fix(users.py): assign the hashed new password to a variable before updating the user's password to ensure consistency
 test(test_user.py): add test to verify if the new password works after resetting it
2023-09-08 14:28:32 -03:00
Gabriel Luiz Freitas Almeida
f95a38a4b5 🐛 fix(crud.py): change HTTP status code from 304 to status.HTTP_304_NOT_MODIFIED for better readability and consistency
 feat(crud.py): add support for updating user profile image in the update_user function
 feat(test_user.py): add test case for updating user profile image in the test_patch_user function
2023-09-08 14:23:19 -03:00
Gabriel Luiz Freitas Almeida
49167a58a9 🐛 fix(tests): update endpoint path from "/api/v1/user" to "/api/v1/users" for consistency and clarity
 feat(tests): add assertion for response status code 201 after creating a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user" to "/api/v1/users/whoami" to fetch the updated user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 401 and detail message after fetching the updated user
 feat(tests): add assertion for response status code 200 after deleting a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 200 and detail message after deleting a user
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 304 after patching user data
 feat(tests): add assertion for response status code 200 after resetting user password
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response status code 422 and detail message after patching user data with wrong id
🐛 fix(tests): update endpoint path from "/api/v1/user/{user_id}" to "/api/v1/users/{user_id}" for consistency and clarity
 feat(tests): add assertion for response
2023-09-05 17:19:46 -03:00
Gabriel Luiz Freitas Almeida
269cb9bc53 🐛 fix(__main__.py): pass the session as a keyword argument 'db' to the create_super_user function for clarity and consistency
🐛 fix(test_user.py): pass the session as a keyword argument 'db' to the create_super_user function for clarity and consistency
2023-08-31 11:16:39 -03:00
Gabriel Luiz Freitas Almeida
d8c7450576 🔧 chore(test_user.py): refactor super_user fixture to use auth settings from settings manager for username and password
🔧 chore(test_user.py): refactor super_user fixture to use auth settings from settings manager for username and password in create_super_user function call
2023-08-31 10:55:04 -03:00
Gabriel Luiz Freitas Almeida
137954de6b 🐛 fix(__main__.py): rename serve command to run command for better semantics and clarity
🔧 chore(test_cli.py): update test to use the new run command instead of serve command
 feat(test_cli.py): add test for creating a superuser with the superuser command
2023-08-28 15:47:57 -03:00
Gabriel Luiz Freitas Almeida
1c498e78df 🐛 fix(test_cli.py): update CLI command in test_components_path to use 'serve' subcommand for better clarity and consistency
🐛 fix(test_llms_template.py): update description of `model` to use backticks and remove unnecessary comment
2023-08-28 11:16:37 -03:00
Gabriel Luiz Freitas Almeida
ea4cd294c1 🔧 fix(test_endpoints.py): fix typo in function name 'created_api_key' to 'create_api_key' for consistency
 feat(test_endpoints.py): add test case for handling invalid API key in 'test_process_flow_invalid_api_key' function
 feat(test_endpoints.py): add test case for handling invalid flow ID in 'test_process_flow_invalid_id' function
 feat(test_endpoints.py): add test case for handling flow not found in 'test_process_flow_invalid_id' function
 feat(test_endpoints.py): add test case for testing process flow without autologin in 'test_process_flow_without_autologin' function
2023-08-27 19:16:39 -03:00
Gabriel Luiz Freitas Almeida
ed06c3b4d9 🐛 fix(conftest.py): import missing Flow model in tests/conftest.py to fix NameError
 feat(conftest.py): add fixture 'flow' to create a test flow in tests/conftest.py
🐛 fix(test_endpoints.py): import missing get_settings_manager function in tests/test_endpoints.py to fix NameError
 feat(test_endpoints.py): add test case 'test_process_flow_without_autologin' to test flow processing without auto login
🐛 fix(test_endpoints.py): fix incorrect endpoint URL in test case 'test_process_flow_without_autologin' in tests/test_endpoints.py
 feat(test_endpoints.py): add test case 'test_process_flow_fails_autologin_off' to test flow processing failure when auto login is off
2023-08-26 17:38:21 -03:00
Gabriel Luiz Freitas Almeida
282e6b0c18 🐛 fix(endpoints.py): import validate_api_key function from auth.utils to fix missing dependency
 feat(endpoints.py): add validation of API key in process_flow endpoint to ensure only valid requests are processed
🔧 chore(utils.py): add validate_api_key function to validate API key against database
🔧 chore(test_endpoints.py): add test case for process_flow endpoint to test API key validation and processing
2023-08-25 20:03:15 -03:00
Gabriel Luiz Freitas Almeida
4e1710bcc7 🐛 fix(chat.py): add missing import statement for Query from fastapi
🐛 fix(chat.py): add missing import statement for Session from sqlmodel
🐛 fix(chat.py): add missing import statement for get_session from langflow.services.utils
🐛 fix(chat.py): add missing import statement for get_current_user from langflow.services.auth.utils
🐛 fix(chat.py): add missing import statement for HTTPException from fastapi
🐛 fix(chat.py): add missing import statement for get_current_active_user from langflow.services.auth.utils
🐛 fix(chat.py): add missing import statement for WebSocket from fastapi
🐛 fix(chat.py): add missing import statement for WebSocketException from fastapi
🐛 fix(chat.py): add missing import statement for status from fastapi
🐛 fix(chat.py): add missing import statement for APIRouter from fastapi
🐛 fix(chat.py): add missing import statement for Depends from fastapi
🐛 fix(chat.py): add missing import statement for HTTPException from fastapi
🐛 fix(chat.py): add missing import statement for get_current_active_user from langflow.services.auth.utils
🐛 fix(chat.py): add missing import statement for get_current_user from langflow.services.auth.utils
🐛 fix(chat.py): add missing import statement for get_session from langflow.services.utils
🐛 fix(chat.py): add missing import statement for Session from sqlmodel
🐛 fix(chat.py): add missing import statement for HTTPException from fastapi
🐛 fix(chat.py): add missing import statement for get_current_user from langflow.services.auth.utils
🐛 fix(chat.py): add missing import statement for HTTPException from fastapi
🐛 fix(chat.py): add missing import statement for get_current_user from langflow.services.auth.utils
🐛 fix(chat.py): add missing import statement for HTTPException from fastapi
🐛 fix(chat.py): add missing import statement for get_current_user from langflow.services.auth.utils
🐛 fix(chat.py): add missing import statement for HTTPException from fastapi
🐛 fix(chat.py): add missing import statement for get_current_user from langflow.services.auth.utils
🐛 fix(chat.py): add missing import statement for HTTPException from fastapi
🐛 fix(chat.py): add missing import statement for get_current_user from langflow
2023-08-25 17:01:32 -03:00
Gabriel Luiz Freitas Almeida
812864eded 🔧 fix(test_agents_template.py): update test functions to include logged_in_headers parameter to test authenticated requests
🔧 fix(test_chains_template.py): update test functions to include logged_in_headers parameter to test authenticated requests
🔧 fix(test_endpoints.py): update test_get_all function to include logged_in_headers parameter to test authenticated requests
🔧 fix(test_llms_template.py): update test functions to include logged_in_headers parameter to test authenticated requests
🔧 fix(test_prompts_template.py): update test functions to include logged_in_headers parameter to test authenticated requests
🔧 fix(test_vectorstore_template.py): update test functions to include logged_in_headers parameter to test authenticated requests
2023-08-25 16:30:01 -03:00
Gabriel Luiz Freitas Almeida
1364fa0e0f 🔧 chore(conftest.py): change scope of client fixture to module and add autouse=True to ensure it is automatically used by all tests in the module 2023-08-25 16:29:51 -03:00
Gabriel Luiz Freitas Almeida
1a50bcd183 🐛 fix(base.py): change return type of generator_build method to Generator[Vertex, None, None] for better type hinting and clarity
🐛 fix(base.py): add optional user_id parameter to _build and _build_list_of_nodes_and_update_params methods in Vertex class to support building with user-specific data
🐛 fix(base.py): add optional user_id parameter to _get_and_instantiate_class method in Vertex class to support building with user-specific data
🐛 fix(custom_component.py): add user_id attribute to CustomComponent class to store the user ID associated with the component
🐛 fix(custom_component.py): add user_id parameter to list_flows method in CustomComponent class to filter flows by user ID
🐛 fix(custom_component.py): add user_id parameter to get_flow method in CustomComponent class to filter flows by user ID
🐛 fix(conftest.py): add client parameter to active_user fixture in tests to fix missing dependency error
2023-08-25 15:26:21 -03:00
Gabriel Luiz Freitas Almeida
c268b2be17 🔥 refactor(models): remove Token model and references to it to simplify the codebase and remove unused code
🔥 refactor(test_custom_component.py): remove unused fixture and imports to clean up the test file
🔧 chore(test_custom_component.py): update component fixture to include user_id parameter for testing purposes
2023-08-25 15:26:20 -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
950b9d179b 🔥 refactor(user/utils.py): remove unused code and imports from user/utils.py module
 feat(test_api_key.py): add tests for API key creation, retrieval, and deletion
 feat(test_user.py): remove unused fixtures and imports from test_user.py module
2023-08-25 12:05:54 -03: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
Gabriel Luiz Freitas Almeida
8411922a07 feat(test_user.py): add tests for user-related functionalities
🐛 fix(test_user.py): fix typo in test_user_waiting_for_approval function name
🐛 fix(test_user.py): fix typo in test_deactivated_user_cannot_access function name
🐛 fix(test_user.py): fix typo in test_data_consistency_after_update function name
🐛 fix(test_user.py): fix typo in test_data_consistency_after_delete function name
🐛 fix(test_user.py): fix typo in test_inactive_user function name
🐛 fix(test_user.py): fix typo in test_normal_user_cant_read_all_users function name
🐛 fix(test_user.py): fix typo in test_patch_user_wrong_id function name
🐛 fix(test_user.py): fix typo in test_delete_user_wrong_id function name
🐛 fix(test_user.py): fix typo in test_normal_user_cant_delete_user function name
 feat(test_user.py): add test_add_super_user_for_testing_purposes_delete_me_before_merge_into_dev function
2023-08-25 10:17:46 -03:00
Gabriel Luiz Freitas Almeida
7b897906b9 feat(test_login.py): add tests for login functionality
🐛 fix(test_login.py): fix typo in test_login_unsuccessful_wrong_username test

🐛 fix(test_login.py): fix typo in test_login_unsuccessful_wrong_password test
2023-08-25 10:17:36 -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
48965a8ba8 🐛 fix(endpoints.py): add check for empty custom_component_dict to prevent errors
🐛 fix(login.py): update import statement for auth utils module
🐛 fix(users.py): update import statement for auth utils module
🐛 fix(factory.py): remove unnecessary argument from create method
🐛 fix(test_cli.py): convert temp_dir to string before checking if it's in COMPONENTS_PATH
2023-08-21 19:14:58 -03:00
Gabriel Luiz Freitas Almeida
8ff739a288 🚀 feat(test_process.py): add tests for loading langchain object with and without cached session
🐛 fix(test_process.py): import missing functions and modules to fix test failures
2023-08-16 21:30:07 -03:00
Gabriel Luiz Freitas Almeida
3d8d44538f Merge branch 'release' into dev 2023-08-10 10:10:28 -03:00
Gabriel Luiz Freitas Almeida
8c41415a32 🐛 fix(custom_component.py): handle case when return_type is None to prevent errors
🐛 fix(test_custom_component.py): update assertion to expect return_type as a list instead of a string
🐛 fix(test_vectorstore_template.py): update assertion to check if all vectorstores in settings are present in the response
2023-08-09 17:50:03 -03:00
Gabriel Luiz Freitas Almeida
4e1fc2202a 🔥 refactor(test_cli.py): remove unused imports and test cases
The test_cli.py file had some unused imports and test cases that were not being used. This commit removes those unused imports and test cases to improve code cleanliness and maintainability.
2023-08-07 14:16:37 -03:00
Gabriel Luiz Freitas Almeida
8036f74d8b 🔀 chore(conftest.py): update import statement for DatabaseManager to reflect file name change 2023-08-07 11:59:57 -03:00
Gabriel Luiz Freitas Almeida
41707c1eac 🔧 chore(test_cli.py): refactor test_components_path to use a temporary directory for components path
🔧 chore(test_cli.py): refactor test_components_path to use a temporary directory for components path to improve test isolation and avoid side effects
2023-08-07 11:59:23 -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
36a7ba4ad5 🚀 feat(test_cli.py): add tests for server functionality and command line options
🚀 feat(test_cli.py): add test for checking database URL option

🚀 feat(test_cli.py): add test for checking components path option
2023-08-07 09:45:09 -03:00
Gabriel Luiz Freitas Almeida
7776977378 🚧 chore(conftest.py): add runner fixture to enable CLI testing
🔧 chore(conftest.py): import CliRunner from typer.testing to enable CLI testing
🔧 chore(conftest.py): remove unused imports and blank lines for code cleanliness
2023-08-07 09:43:37 -03:00
Gabriel Luiz Freitas Almeida
a9db2da6bf 🐛 fix(base.py): use db_manager.engine instead of DatabaseManager.engine to access the database engine
🐛 fix(conftest.py): add TYPE_CHECKING import to fix type hinting error
🐛 fix(conftest.py): pass db_manager to blank_session_getter fixture to fix session creation error
2023-08-06 12:15:29 -03:00
Gabriel Luiz Freitas Almeida
f178e29ef4 🔧 fix(test_llms_template.py): update import statement to use get_settings_manager function from langflow.services.utils module
🔧 fix(test_prompts_template.py): update import statement to use get_settings_manager function from langflow.services.utils module
🔧 fix(test_vectorstore_template.py): update import statement to use get_settings_manager function from langflow.services.utils module
🔧 fix(test_llms_template.py): update assertion to use settings from settings_manager instead of settings module
🔧 fix(test_prompts_template.py): update assertion to use settings from settings_manager instead of settings module
🔧 fix(test_vectorstore_template.py): update assertion to use settings from settings_manager instead of settings module
2023-08-05 23:17:27 -03:00
Gabriel Luiz Freitas Almeida
7b2827f198 🐛 fix(conftest.py): fix client_fixture to properly yield the TestClient instance and clear dependency overrides after usage 2023-08-05 22:18:45 -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
b81b596b55 refactor settings 2023-08-04 17:11:25 -03:00
Gabriel Luiz Freitas Almeida
0a5ad3b06d refactor settings 2023-08-04 00:04:35 -03:00
Gabriel Luiz Freitas Almeida
81f195e8da 🔧 chore(constants.py): remove unused classes "Runnable" and "Generic" from CLASSES_TO_REMOVE list
🔇 chore(test_chains_template.py): comment out unused test_chains_settings test function
2023-08-02 15:57:45 -03:00
Gabriel Luiz Freitas Almeida
ddafdf31b5 🔧 fix(conftest.py): remove unused imports and commented out code
 feat(conftest.py): add session_getter fixture to create a blank session for testing
🔧 fix(test_custom_component.py): pass session_getter fixture to list_flows function for testing
2023-07-31 17:31:40 -03:00
Gabriel Luiz Freitas Almeida
fb407cf9d1 🔥 refactor(test_custom_component.py): remove unused imports and test_list_flows_no_flows test case
🔥 refactor(test_custom_component.py): remove test_list_flows_no_flows test case as it is no longer needed
2023-07-27 14:35:49 -03:00
gustavoschaedler
d5ee293590 🔧 fix(test_custom_component.py): fix import statements and formatting issues in test_custom_component.py
 feat(test_custom_component.py): add tests for list_flows, build_config methods in CustomComponent class
🔧 fix(test_custom_component.py): fix formatting issues in test_list_flows_multiple_queries test
 feat(test_custom_component.py): add tests for list_flows, build_config methods in CustomComponent class
 feat(test_custom_component.py): add test for return type of list_flows method in CustomComponent class
 feat(test_custom_component.py): add test for return type of build_config method in CustomComponent class
 feat(test_custom_component.py): add test for presence of 'fields' key in build_config method in CustomComponent class
 feat(test_custom_component.py): add test for type of 'fields' value in build_config method in CustomComponent class
 feat(test_custom_component.py): add test for type of keys in 'fields' value in build_config method in CustomComponent class
 feat(test_custom_component.py): add test for type of values in 'fields' value in build_config method in CustomComponent class
2023-07-26 17:40:53 +01:00
gustavoschaedler
a89a9a3267 🔥 refactor(custom.py): remove unused code and class 'CustomComponent_old' to improve code cleanliness and maintainability
🔧 fix(test_custom_component.py): fix formatting issues in test_custom_component.py for better readability
 feat(test_custom_component.py): add import statements for 'patch' and 'MagicMock' to enable mocking in tests
🔬 test(test_custom_component.py): add test for the 'get_function' method of the Component class with valid code and function_entrypoint_name
🔬 test(test_custom_component.py): add test for the 'parse_assign' method of the CodeParser class
🔬 test(test_custom_component.py): add test for the 'get_code_tree' method of the Component class when given incorrect syntax
🔬 test(test_custom_component.py): add test for the '_class_template_validation' method of the CustomComponent class when the code is None
🔬 test(test_custom_component.py): add test for the 'get_function_entrypoint_args' method of the CustomComponent class
🔬 test(test_custom_component.py): add test for the 'get_function_entrypoint_return_type' method of the CustomComponent class
🔬 test(test_custom_component.py): add test for the 'get_main_class_name' method of the CustomComponent class when there is no main class

🔥 refactor(test_custom_component.py): remove commented out code and unused fixtures to improve code readability and maintainability

🔧 refactor(tests): remove commented out test cases and unused imports
 feat(tests): add new test case for list_flows method when there are no flows in the database
 feat(tests): add new test case for build_config method when code is not provided
 feat(tests): add new test case for list_flows method when there are multiple queries to the database
2023-07-26 16:56:21 +01:00
Gabriel Luiz Freitas Almeida
c93febc7a3 🚀 feat(test_agents_template.py): add "fileTypes" field to the "path" agent configuration to specify supported file types 2023-07-26 07:43:16 -03:00
gustavoschaedler
548383b09e 🐛 fix(endpoints.py): add missing import statement for 'settings' module
 feat(endpoints.py): add support for loading custom components from a specified path
🐛 fix(endpoints.py): fix typo in variable name 'custom_components_from_file'
🐛 fix(endpoints.py): fix typo in variable name 'filtered'
🐛 fix(base.py): fix indentation of raise statement to improve code readability
🐛 fix(component.py): fix indentation of if statements to improve code readability
🐛 fix(load_custom_component_from_path.py): fix indentation of base_path comment to improve code readability
🐛 fix(load_custom_component_from_path.py): fix indentation of base_path assignment to improve code readability
🐛 fix(load_custom_component_from_path.py): fix indentation of validate_code method to improve code readability
🐛 fix(load_custom_component_from_path.py): fix indentation of build_component_menu_list method to improve code readability
🐛 fix(types.py): fix indentation of extract_type_from_optional function to improve code readability
 feat(types.py): add support for building custom component templates
 feat(types.py): add support for building custom component templates with extra fields
 feat(types.py): add support for building custom component templates with function arguments
 feat(types.py): add support for building custom component templates with base classes
 feat(types.py): add support for building custom component templates with return type
 feat(types.py): add support for building custom component templates with exception handling
 feat(types.py): add support for building custom component templates from a specified path
🐛 fix(settings.py): fix indentation of set_env_variables method to improve code readability
 feat(settings.py): add support for specifying component path in settings

🐛 fix(test_custom_component.py): change variable names and attributes in YourComponent class for better readability and consistency
🐛 fix(test_custom_component.py): reformat code to adhere to PEP8 style guide
🐛 fix(test_custom_component.py): fix syntax error in test_component_get_code_tree_syntax_error()
🐛 fix(test_custom_component.py): fix syntax error in test_custom_component_class_template_validation_no_code()
🐛 fix(test_custom_component.py): fix syntax error in test_custom_component_get_main_class_name_no_main_class()
 feat(test_custom_component.py): add test_component_get_function_valid() to test the get_function method of the Component class with valid code and function_entrypoint_name
 feat(test_custom_component.py): add test_code_parser_parse_assign() to test the parse_assign method of the CodeParser class
 feat(test_custom_component.py): add test_custom_component_class_template_validation_no_code() to test the _class_template_validation method of the CustomComponent class when the code is None
 feat(test_custom_component.py): add test_custom_component_get_main_class_name_no_main_class() to test the get_main_class_name method of the CustomComponent class when there is no main class
 feat(test_custom_component.py): add test_custom_component_get_function_entrypoint_args_no_args() to test the get_function_entrypoint_args method of the CustomComponent class when there are no arguments
 feat(test_custom_component.py): add test_custom_component_get_function_entrypoint_return_type_none() to test the get_function_entrypoint_return_type method of the CustomComponent class when the return type is None
2023-07-21 19:13:52 +01:00