Thank you for your interest in contributing to FluxComfyUIBot! This document provides guidelines and instructions for contributing to the project.
- Getting Started
- Development Setup
- Code Style Guidelines
- Making Contributions
- Testing
- Documentation
- Pull Request Process
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/FluxComfyUIBot.git cd FluxComfyUIBot
- Set up your development environment
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Copy
.env_example
to.env
and configure your environment variables
FluxComfyUIBot/
├── Main/
│ ├── custom_commands/ # Command implementations
│ └── utils/ # Utility functions
├── docs/ # Documentation
├── tests/ # Test files
└── security/ # Security-related code
-
Modularity
- Break down code into small, reusable functions
- Keep functions focused on single responsibility
- Use appropriate design patterns
-
Type Safety
from typing import List, Optional, Dict def process_data(input_data: Dict[str, str]) -> Optional[List[str]]: # Implementation pass
-
Error Handling
try: result = process_data(input_data) except CustomException as e: logging.error(f"Error processing data: {e}") raise
-
Create a new branch for your feature:
git checkout -b feature/your-feature-name
-
Make your changes following these principles:
- Write clean, documented code
- Include type hints
- Add appropriate error handling
- Include unit tests
- Update documentation
-
Commit your changes:
git commit -m "feat: add new feature description"
Follow conventional commits format:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style changes
- refactor: Code refactoring
- test: Adding tests
- chore: Maintenance tasks
-
Write tests for new features:
def test_new_feature(): # Arrange input_data = {"key": "value"} # Act result = process_data(input_data) # Assert assert result is not None
-
Run tests before submitting:
python -m pytest
-
Add docstrings to all functions and classes:
def process_data(input_data: dict) -> Optional[list]: """ Process the input data and return results. Args: input_data (dict): Input data to process Returns: Optional[list]: Processed data or None if processing fails Raises: ValueError: If input_data is invalid """ pass
-
Update README.md when adding new features
-
Keep API documentation up to date
- Update the README.md with details of changes if applicable
- Update the documentation with details of changes
- Ensure all tests pass
- Request review from maintainers
- Address review comments
- Tests added/updated and passing
- Documentation updated
- Type hints included
- Error handling implemented
- No sensitive information included
- Branch is up to date with main
Feel free to open an issue for:
- Bug reports
- Feature requests
- Questions about the codebase
- Contribution guidance
Thank you for contributing to FluxComfyUIBot!