Contributing to the Project¶
Thank you for your interest in contributing to the Unraid Integration for Home Assistant! This guide will help you get started with contributing to the project.
Ways to Contribute¶
There are many ways to contribute to the project:
- Bug Reports: Reporting issues you encounter
- Feature Requests: Suggesting new features or improvements
- Documentation: Improving or expanding documentation
- Code Contributions: Fixing bugs or implementing new features
- Testing: Testing the integration in different environments
- Helping Others: Helping users in GitHub discussions or Home Assistant community
Development Setup¶
Prerequisites¶
To develop for this integration, you'll need:
- A working Home Assistant development environment
- An Unraid server for testing
- Basic knowledge of Python
- Familiarity with Home Assistant custom component development
Setting Up a Development Environment¶
- Fork the Repository: Fork domalab/ha-unraid on GitHub
- Clone Your Fork:
- Set Up a Development Home Assistant Instance:
- Use the Home Assistant development container
- Or set up a dedicated test instance
- Install Development Dependencies:
Development Workflow¶
- Create a Branch: Create a branch for your feature or bug fix
- Make Changes: Implement your changes following the code style and conventions
- Write Tests: Add tests for your changes to ensure they work correctly
- Run Tests Locally: Ensure all tests pass before submitting
- Lint Your Code: Ensure your code passes all linting checks
- Commit Your Changes: Write clear, concise commit messages
- Push to Your Fork:
- Create a Pull Request: Submit a pull request from your fork to the main repository
Code Style and Conventions¶
The project follows the Home Assistant Development Guidelines. Key points include:
- Follow PEP 8 for Python code style
- Use typing for type hints
- Write docstrings for functions and classes
- Format strings using f-strings where appropriate
- Follow existing patterns and conventions in the codebase
Testing¶
Unit Tests¶
- Write unit tests for all new code
- Make sure existing tests still pass with your changes
- Test both expected behavior and edge cases
- Use appropriate mocking for external dependencies
Integration Tests¶
- Test the integration with a real Unraid server when possible
- Test with different Unraid versions if available
- Verify that your changes work in different environments
Pull Request Process¶
- Describe Your Changes: Provide a clear description of what your PR does
- Link Related Issues: Reference any related issues using the
#issue-number
syntax - Pass CI Checks: Ensure your PR passes all CI checks
- Review Process: Respond to any feedback or suggestions during review
- Merge: Once approved, your PR will be merged into the main codebase
Bug Reports and Feature Requests¶
Reporting Bugs¶
When reporting bugs, please include:
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Home Assistant version
- Unraid version
- Integration version
- Relevant logs or error messages
- Any other context that might be helpful
Requesting Features¶
When requesting a feature, please include:
- A clear description of the feature
- The problem it solves or benefit it provides
- Any implementation ideas you have
- Whether you're willing to help implement it
Documentation Contributions¶
Documentation improvements are always welcome! To contribute to documentation:
- Follow the same pull request process as for code changes
- Preview documentation changes locally using MkDocs
- Ensure your changes are accurate and well-written
Getting Help¶
If you need help with contributing:
- Check the project's GitHub issues for similar questions
- Ask in the Home Assistant Community
- Open a GitHub discussion with your question
Code of Conduct¶
Please follow these guidelines when contributing:
- Be respectful and inclusive toward other contributors
- Provide constructive feedback on others' contributions
- Focus on the issues, not the person
- Accept feedback graciously on your own contributions
- Help create a positive community for everyone
License¶
By contributing to this project, you agree that your contributions will be licensed under the project's Apache 2.0 License.