- Add comprehensive unit tests for TelegramListener and SaveToTelegram nodes - Add project structure validation tests - Add test runner script with coverage support - Add pytest configuration for better test organization - Add GitHub Actions workflow for CI/CD - Add development dependencies and requirements-dev.txt - Add Makefile for common development tasks - Add code formatting and linting configuration - Fix import issues in __init__.py for testing compatibility - Add missing .pyc pattern to .gitignore Test coverage includes: - Node class structure validation - Input/output type checking - Error handling and validation - Integration between listener and sender nodes - Project file structure compliance - ComfyUI Manager compatibility
34 lines
868 B
Python
34 lines
868 B
Python
"""
|
|
ComfyUI Telegram Bot Custom Nodes
|
|
|
|
A collection of custom nodes for ComfyUI that enable Telegram bot integration.
|
|
"""
|
|
|
|
try:
|
|
from .telegram_nodes import TelegramListener, SaveToTelegram
|
|
except ImportError:
|
|
# Handle case where running tests or importing without package structure
|
|
import sys
|
|
import os
|
|
sys.path.insert(0, os.path.dirname(__file__))
|
|
from telegram_nodes import TelegramListener, SaveToTelegram
|
|
|
|
# Version info
|
|
__version__ = "1.0.0"
|
|
|
|
# Node mappings for ComfyUI
|
|
NODE_CLASS_MAPPINGS = {
|
|
"TelegramListener": TelegramListener,
|
|
"SaveToTelegram": SaveToTelegram,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"TelegramListener": "Telegram Listener",
|
|
"SaveToTelegram": "Save to Telegram",
|
|
}
|
|
|
|
# Web directory for UI components
|
|
WEB_DIRECTORY = "./web"
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|