Thank you for your interest in contributing to PermitCheck! We welcome contributions from the community.
- Fork and clone the repository
- Install development dependencies: See Installation Guide
- Make your changes and test them
- Submit a pull request
Before contributing, please review:
| Document | Purpose |
|---|---|
| Architecture | Understand system design and workflow |
| Adding Languages | Create language plugins |
| Usage Guide | API usage and examples |
| Roadmap | Future plans |
Found a bug? Open an issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Version info (
permitcheck --version) - OS and Python version
Have an idea? Start a discussion:
- Describe the feature
- Explain the use case
- Check Roadmap first
Docs need fixing?
- Fix typos or unclear sections
- Add examples
- Improve explanations
- All docs should be in
docs/folder
Want to contribute code?
- Check existing issues
- Follow development setup below
- Write tests for new features
- Update documentation
Add support for new language?
- Read Adding Language Support
- Check example plugins
- Follow plugin development guide
- Add tests
- Python 3.10 or higher
uvpackage manager (recommended)- Git
# Clone repository
git clone https://github.com/kirankotari/permitcheck.git
cd permitcheck
# Install dependencies
uv sync
# Run tests
uv run pytest
# Run with your changes
uv run permitcheck -l pythonFor detailed installation instructions, see Installation Guide.
uv run pytest# Test specific file
uv run pytest tests/test_python/
# Test with coverage
uv run pytest --cov=permitcheck --cov-report=html- Add tests for new features in
tests/ - Follow existing test structure
- Use pytest fixtures
- Aim for high coverage
- Follow PEP 8
- Use type hints
- Document public APIs
- Keep functions small and focused
def check_license(package: str, licenses: set[str]) -> bool:
"""
Check if package license is allowed.
Args:
package: Package name
licenses: Set of allowed licenses
Returns:
True if allowed, False otherwise
"""
# Implementation
pass# Format code (when available)
black permitcheck/
# Sort imports
isort permitcheck/
# Type checking
mypy permitcheck/To add support for a new language:
- Read the guide: Adding Language Support
- Check examples: See examples/ for Ruby, Go, Java templates
- Create plugin: Inherit from
Pluginbase class - Implement methods:
run(),load_settings() - Add tests: Create test files in
tests/ - Update docs: Add language to Roadmap
from permitcheck.plugin import Plugin
class ForNewLang(Plugin):
"""Plugin for NewLang language."""
def __init__(self):
super().__init__()
self.language = 'newlang'
self.file_patterns = ['package.json'] # Files to look for
def run(self) -> dict[str, set[str]]:
"""Discover dependencies and their licenses."""
# Implementation
return {'package-name': {'MIT'}}
def load_settings(self) -> tuple[set, set, set]:
"""Load policy settings."""
# Implementation
return (allowed_set, trigger_error_set, skip_set)For complete guide, see Adding Language Support.
- Tests pass locally (
uv run pytest) - Code follows style guidelines
- Documentation updated (if needed)
- Commit messages are clear
- Branch is up to date with main
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes: Keep commits focused and atomic
- Write good commit messages:
Add Ruby plugin support - Implement ForRuby plugin class - Add Gemfile.lock parser - Add tests for Ruby dependencies - Update documentation - Push and create PR: Describe changes clearly
- Respond to feedback: Be open to suggestions
[Type] Brief description
Types:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- test: Test additions/changes
- refactor: Code refactoring
- chore: Maintenance tasks
feat: Add Ruby language supportfix: Handle missing pyproject.toml gracefullydocs: Update installation guide with uv instructions
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentationstyle: Formattingrefactor: Code restructuringtest: Testschore: Maintenance
feat(plugin): add support for Ruby language
Implement ForRuby plugin to parse Gemfile.lock and detect
Ruby gem licenses. Includes tests and documentation updates.
Closes #123
fix(cache): handle corrupted cache files gracefully
Previously, corrupted cache files would crash the application.
Now they are detected and cleared automatically.
Fixes #456
import logging
logging.basicConfig(level=logging.DEBUG)permitcheck -l python --debug # If --debug flag exists- Import errors: Check
uv syncran successfully - Test failures: Ensure dependencies are up to date
- Plugin not loading: Check file naming and class name
All documentation lives in docs/:
docs/
├── README.md # Documentation index
├── installation.md # Installation guide
├── usage-guide.md # Complete usage with API
├── configuration.md # Configuration reference
├── architecture.md # System design and workflow
├── adding-language-support.md # Plugin development
├── output-formats.md # Output formats
├── ci-cd-integration.md # CI/CD setup
├── ROADMAP.md # Future plans
└── QUICK_REFERENCE.md # Command cheat sheet
- No Duplication: Link to other docs instead of copying content
- User-Focused: Write for the reader's perspective
- Example-Rich: Show code examples for concepts
- Keep Updated: Update docs with code changes
When adding documentation:
- Place in
docs/folder - Add link in
docs/README.md - Cross-reference related docs
- Include code examples
- Use proper markdown formatting
We pledge to make participation in our project a harassment-free experience for everyone.
Positive behavior:
- Using welcoming language
- Being respectful of differing viewpoints
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
Unacceptable behavior:
- Harassment or discriminatory language
- Trolling or insulting comments
- Public or private harassment
- Publishing others' private information
Violations can be reported to kirankotari@live.com. All complaints will be reviewed and investigated.
- GitHub Discussions: Start a discussion
- Email: kirankotari@live.com
- Issues: For bug reports only
- Architecture Guide - Understand the codebase
- Usage Guide - API usage and examples
- Examples - Plugin code examples
By contributing to PermitCheck, you agree that your contributions will be licensed under the Apache 2.0 License.
Contributors are recognized in:
- GitHub Contributors
- Release notes
- README acknowledgments
Thank you for contributing to PermitCheck! 🚀