🔀 refactor(interface/custom/custom_component.py): update import statement for session_getter in custom_component.py to reflect new location in utils module
🔀 refactor(main.py): update import statement for initialize_database in main.py to reflect new location in utils module
🔀 refactor(database/factory.py): update import statement for DatabaseManager in factory.py to reflect new location in manager module
This commit removes the FlowStyles table from the database. The table was no longer needed and has been dropped. The corresponding indexes and foreign key constraints have also been removed.
Downgrade functionality has been implemented to recreate the FlowStyles table and its associated indexes and foreign key constraints if needed.
✨ feat(__main__.py): add support for custom components directory path as an environment variable
✨ feat(__main__.py): set default value for config option to be the config.yaml file in the same directory as the script
✨ feat(__main__.py): add support for specifying an .env file containing environment variables
✨ feat(__main__.py): add backend_only option to run only the backend server without the frontend
🔧 chore(__main__.py): refactor setup_app function to pass backend_only option to the app setup
✨ feat(__main__.py): add check to skip server startup if running in pytest environment
🔧 chore(__main__.py): refactor serve function to improve readability and maintainability
✨ feat(__main__.py): add support for running the server using uvicorn on Windows
🐛 fix(factory.py): raise ValueError if no database URL provided in settings
🐛 fix(manager.py): change return type annotation of load_settings_from_yaml method to "SettingsManager" instead of "Settings"
🐛 fix(utils.py): import service_manager and ServiceType to fix NameError
🔧 chore(__main__.py): remove unused import of settings module from langflow.settings package to clean up code
🔧 chore(__main__.py): update references to settings object to use settings_manager.settings for better encapsulation and modularity
🔧 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
📄 feat(settings/__init__.py): add __init__.py file to expose factory and manager modules
📄 feat(settings/base.py): add base settings class with default values and validators
📄 feat(settings/factory.py): add factory class for creating and configuring a SettingsManager
📄 feat(settings/manager.py): add manager class for loading settings from YAML file and initializing SettingsManager
📦 chore(settings.py): add settings.py file to the backend/langflow/services/settings directory
✨ feat(settings.py): add support for loading settings from a YAML file and updating settings from keyword arguments
🔒 chore(settings.py): add validation and logging to the settings module for improved reliability and debugging
🔧 chore(settings.py): add utility functions for saving and loading settings from a YAML file
📝 chore(chat): add ChatConfig class to handle chat configuration
📝 chore(chat): add ChatManagerFactory class to create and configure ChatManager
📝 chore(chat): add ChatManager class to handle chat functionality
📝 chore(chat): add ChatHistory class to manage chat history
📝 chore(chat): add process_graph function to process chat inputs and generate result and thought
✨ feat(utils.py): add cache utility functions for memoization and file saving
🐛 fix(utils.py): fix cache folder creation to use the correct cache directory
🔧 chore(utils.py): refactor code to improve readability and remove unused imports
- Added `__init__.py` file to the `services` directory to make it a package.
- Created `Service` class in `base.py` to serve as a base class for different services.
- Implemented `ServiceFactory` class in `factory.py` to create instances of services.
- Implemented `ServiceManager` class in `manager.py` to manage the creation and retrieval of services.
- Created `ServiceType` enum in `schema.py` to define the different types of services that can be registered with the service manager.
- Added `initialize_services` function in `manager.py` to initialize all the services needed.
The purpose of these changes is to provide a modular and extensible architecture for managing different services in the application. The `ServiceManager` allows for easy creation and retrieval of services, while the `ServiceType` enum provides a standardized way to refer to different types of services. The `Service` base class and `ServiceFactory` class provide a foundation for creating and managing specific services.
The following files and classes were removed:
- `src/backend/langflow/cache/__init__.py`: Removed unused import statements and `__all__` variable.
- `src/backend/langflow/cache/base.py`: Removed unused `BaseCache` class.
- `src/backend/langflow/cache/flow.py`: Removed unused `InMemoryCache` class.
- `src/backend/langflow/cache/manager.py`: Removed unused `Subject`, `AsyncSubject`, and `CacheManager` classes.
These files and classes were removed to clean up the codebase and remove unused functionality.
🔥 refactor(utils.py): remove unused code and dependencies in utils.py module
🔥 refactor(chat): remove unused chat module and its configuration class
🔥 refactor(chat/manager.py): remove unused imports and classes from chat manager module
🔥 refactor(chat/utils.py): remove unused imports and function from chat utils module
🔥 refactor(database/__init__.py): remove empty file
🔥 refactor(database): remove unused database files and models
🔥 refactor(database): remove unused database files and models to improve code organization and reduce clutter
🔧 refactor(base.py): refactor DatabaseManager class to handle database operations and migrations
🔧 refactor(base.py): refactor session_getter function to use DatabaseManager instance
🔧 refactor(base.py): refactor get_session function to use DatabaseManager instance
🔧 refactor(models/__init__.py): add Flow model to __all__ list
🔨 refactor(types.py): add logging statements for debugging purposes in build_and_validate_all_files function
🔨 refactor(types.py): add logging statements for debugging purposes in build_valid_menu function
🔨 refactor(types.py): add logging statements for debugging purposes in build_invalid_menu function
🔧 fix(settings.py): update COMPONENTS_PATH to accept a list of strings instead of a list of Paths to improve flexibility and compatibility
🔧 fix(settings.py): update set_components_path method to handle LANGFLOW_COMPONENTS_PATH as a list of paths or a single path string