Thank you for your interest in contributing to SmartAlert! This document provides guidelines and information for contributors.
- Getting Started
- Development Setup
- Code Style
- Testing
- Submitting Changes
- Issue Guidelines
- Pull Request Guidelines
Before contributing, please:
- Read this contributing guide
- Check existing issues and pull requests to avoid duplicates
- Join our discussions in the issues section
- Python 3.8 or higher
- Git
- pip or conda for package management
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/SmartAlert.git cd SmartAlert -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up pre-commit hooks (optional but recommended):
pip install pre-commit pre-commit install
- Follow PEP 8 style guidelines
- Use meaningful variable and function names
- Add docstrings to functions and classes
- Keep functions focused and concise
- Use type hints where appropriate
- Clear cell outputs before committing
- Add descriptive markdown cells
- Keep notebooks focused on specific tasks
- Document assumptions and data sources
- Keep related files together
- Use descriptive file names
- Organize notebooks in the
notebooks/directory - Store utilities in the
utils/directory
# Run all tests
python -m pytest
# Run tests with coverage
python -m pytest --cov=.
# Run specific test file
python -m pytest tests/test_feature.py- Write tests for new functionality
- Include both unit and integration tests
- Test edge cases and error conditions
- Aim for good test coverage
git checkout -b feature/your-feature-name- Write clear, focused commits
- Use descriptive commit messages
- Follow the conventional commit format:
type(scope): description [optional body] [optional footer]
Examples:
feat(model): add new ensemble methodfix(data): correct preprocessing pipelinedocs(readme): update installation instructions
- Run the test suite
- Ensure all tests pass
- Test your changes manually if applicable
- Update README.md if needed
- Add docstrings for new functions
- Update any relevant documentation
- Push your branch to your fork
- Create a pull request against the main branch
- Fill out the pull request template
- Request review from maintainers
- Check existing issues for duplicates
- Search the documentation for solutions
- Try to reproduce the issue
When creating an issue, please include:
- Title: Clear, descriptive title
- Description: Detailed description of the issue
- Steps to reproduce: Step-by-step instructions
- Expected behavior: What you expected to happen
- Actual behavior: What actually happened
- Environment: OS, Python version, dependencies
- Additional context: Any other relevant information
- Bug: Something isn't working
- Feature: Request for new functionality
- Enhancement: Improvement to existing functionality
- Documentation: Improvements to documentation
- Question: General questions about the project
- Code follows the style guidelines
- Tests pass and coverage is maintained
- Documentation is updated
- Commit messages are clear and descriptive
- Branch is up to date with main
Your pull request should include:
- Title: Clear, descriptive title
- Description: Detailed description of changes
- Type of change: Bug fix, feature, documentation, etc.
- Testing: How you tested your changes
- Breaking changes: Any breaking changes
- Related issues: Links to related issues
- Automated checks must pass
- At least one maintainer must approve
- All conversations must be resolved
- Branch must be up to date with main
- Check the documentation in the README
- Search existing issues and discussions
- Ask questions in the issues section
- Join community discussions
Contributors will be recognized in:
- The project README
- Release notes
- GitHub contributors list
Thank you for contributing to SmartAlert!