Contributing to Unraid API¶
Thank you for your interest in contributing to the Unraid API project! This guide will help you get started with the development process.
Setting Up a Development Environment¶
- Fork the repository on GitHub
- Clone your fork locally
- Create a virtual environment and install development dependencies
Development Process¶
Branching Strategy¶
main
- Main development branchfeature/*
- New featuresbugfix/*
- Bug fixesrelease/*
- Release preparation
Always create a new branch for your changes:
Coding Style¶
This project follows the PEP 8 style guide. We use:
You can apply these tools to your code with:
# Format code
black unraid_api tests
# Sort imports
isort unraid_api tests
# Lint code
flake8 unraid_api tests
Type Checking¶
The project uses mypy for static type checking. Run it with:
Testing¶
Running Tests¶
We use pytest for testing. To run the tests:
Adding Tests¶
All new features should include tests. Place them in the tests/
directory, following the existing structure:
- Unit tests go in
tests/unit/
- Integration tests go in
tests/integration/
Documentation¶
Building the Documentation¶
Documentation is built using MkDocs with the Material theme:
# Install documentation dependencies
pip install -r docs/requirements.txt
# Serve the documentation locally
mkdocs serve
Documentation Style¶
- Use clear, concise language
- Include code examples for all features
- Document all parameters, return values, and exceptions
- Follow the existing structure
Pull Request Process¶
- Ensure your code passes all tests and linting checks
- Update the documentation if needed
- Add your changes to the changelog
- Submit a pull request to the
main
branch - Address any review comments
Code of Conduct¶
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
License¶
By contributing to this project, you agree that your contributions will be licensed under the project's MIT License.