Thank you for your interest in contributing to the Security Camera System! This document provides guidelines and steps for contributing to this project.
- Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/security-script.git
cd security-script
- Set up Python environment using pyenv:
pyenv local 3.11.0
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- Follow PEP 8 style guide for Python code
- Use type hints for function parameters and return values
- Include docstrings for classes and functions
- Keep functions focused and single-purpose
- Use meaningful variable and function names
- Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bugfix-name
-
Make your changes, following our code style guidelines
-
Add or update tests as needed
-
Commit your changes with clear, descriptive commit messages:
git commit -m "feat: Add face detection timeout feature"
# or
git commit -m "fix: Resolve camera initialization error"
- If you have multiple commits, compress them into a single, clean commit:
# Assuming you're on your feature branch and want to compress the last n commits
git rebase -i HEAD~n
# In the editor, mark commits to squash by changing 'pick' to 'squash' or 's'
# Leave the first commit as 'pick'
# Save and exit the editor
# In the next editor, write a clear commit message for the compressed commit
- Push to your fork and create a Pull Request
Follow the Conventional Commits specification:
feat:
for new featuresfix:
for bug fixesdocs:
for documentation changesstyle:
for code style changes (formatting, missing semi-colons, etc)refactor:
for code refactoringtest:
for adding or modifying testschore:
for routine tasks, maintenance, and dependency updates
- Write unit tests for new features
- Ensure all tests pass before submitting a PR
- Include both positive and negative test cases
- Test edge cases and error conditions
When reporting issues, please include:
- Description of the issue
- Steps to reproduce
- Expected behavior
- Actual behavior
- System information:
- Operating System
- Python version
- Package versions (output of
pip freeze
) - Camera hardware details (if relevant)
- All submissions require review
- Changes must be tested on Linux
- Reviewers will check for:
- Code style compliance
- Test coverage
- Documentation completeness
- Security implications
- Performance impact
When contributing, please ensure:
- No sensitive information is committed (API keys, credentials)
- Input validation is properly implemented
- Error handling follows security best practices
- User data privacy is maintained
- System resources are properly managed
When adding or modifying features:
- Update relevant README sections
- Add inline code comments for complex logic
- Update function/class docstrings
- Include usage examples if applicable
By contributing, you agree that your contributions will be licensed under the MIT License.
Feel free to open an issue for:
- Feature discussions
- Implementation questions
- Clarification on contributing guidelines
- Help with development setup
Thank you for contributing to making this security camera system better!