Spaces:
Runtime error
Runtime error
File size: 4,120 Bytes
a3126b2 39dde45 a3126b2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | # Contributing to LLMGuardian
First off, thank you for considering contributing to LLMGuardian! It's people like you who make LLMGuardian a great tool for protecting LLM applications. This document provides guidelines and steps for contributing.
## Code of Conduct
By participating in this project, you agree to abide by our Code of Conduct. We are committed to providing a welcoming and inclusive environment for everyone. Key points:
- Be respectful and inclusive
- Use welcoming and inclusive language
- Be collaborative
- Focus on what is best for the community
- Show empathy towards other community members
## How Can I Contribute?
### Reporting Bugs
Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
- A clear and descriptive title
- Exact steps to reproduce the problem
- Expected behavior vs actual behavior
- Code samples and test cases if applicable
- Your environment details (OS, Python version, etc.)
### Suggesting Enhancements
If you have ideas for new features or improvements:
1. Check existing issues and discussions first
2. Provide a clear and detailed explanation of the feature
3. Include examples of how the feature would be used
4. Explain why this enhancement would be useful to LLMGuardian users
### Pull Requests
1. Fork the repository
2. Create a new branch for your feature or fix
3. Write clear, documented, and tested code
4. Follow our coding conventions (detailed below)
5. Submit a pull request with a clear description of the changes
## Development Guidelines
### Code Style
- Follow PEP 8 style guide
- Use type hints
- Write docstrings for all public methods and classes
- Keep functions focused and single-purpose
- Use descriptive variable names
### Testing Requirements
- Write unit tests for all new functionality
- Maintain or improve test coverage
- Tests must pass in CI pipeline
- Include both positive and negative test cases
- Test edge cases and potential security implications
### Security Considerations
As LLMGuardian is a security tool, we have strict requirements:
1. No malicious code or backdoors
2. All dependencies must be vetted and approved
3. Security-sensitive code requires additional review
4. Follow secure coding practices
5. Document security implications of changes
6. Regular security testing and validation
### Documentation
- Update README.md if adding new features
- Include docstrings in code
- Update relevant documentation files
- Provide examples for new functionality
- Document security considerations
### Commit Messages
- Use clear and descriptive commit messages
- Reference issue numbers when applicable
- Use present tense ("Add feature" not "Added feature")
- Keep commits focused and atomic
## Getting Started
1. Set up your development environment:
```bash
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
pip install -r requirements-dev.txt
```
2. Run tests locally:
```bash
pytest
```
3. Check code style:
```bash
flake8
black .
isort .
```
## Pull Request Process
1. Update documentation to reflect changes
2. Add tests for new functionality
3. Ensure all tests pass
4. Update CHANGELOG.md
5. Get at least one code review
6. Squash commits if requested
7. Address review feedback
## Release Process
Releases are handled by maintainers following the semantic versioning (SemVer) system.
## Additional Notes
### Attribution
We use the Apache License 2.0 - see the LICENSE file for details. When you contribute code, you agree to license your contribution under the same terms.
### Support
If you need help with your contribution:
- Check the documentation
- Open a discussion on GitHub
- Join our community chat
- Ask questions in issues
### Future Plans
Check our roadmap and project board for planned features and enhancements. This can help you find areas where your contributions would be most valuable.
Thank you for contributing to LLMGuardian! Together we can make LLM applications more secure for everyone.
|