Contributing to KNL¶
This page is under construction.
Thank you for your interest in contributing to KNL! This guide will help you get started.
Quick Start¶
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/your-username/knl.git - Set up development environment:
make dev - Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
make test - Submit a pull request
Development Setup¶
See Development Setup for detailed instructions on setting up your development environment.
Code Style¶
KNL follows these conventions:
Python Style¶
- Follow PEP 8
- Use Ruff for linting and formatting
- Type hints required (mypy strict mode)
- Line length: 100 characters
- Use
|for union types, notOptionalorUnion
Running Code Quality Checks¶
# Format code
make format
# Lint code
make lint
# Type check
make type-check
# Run all checks
make check-all
Testing¶
See Testing Guide for detailed testing guidelines.
Running Tests¶
# Run all tests
make test
# Run with coverage
make test-cov
# Run specific test
pytest tests/test_config.py -v
Writing Tests¶
- Place tests in
tests/directory - Follow pattern:
test_<module>.pywithTest<Feature>classes - Aim for >80% coverage
- Use descriptive test names
Commit Messages¶
Use clear, descriptive commit messages:
Add feature: Brief description
Longer explanation of what changed and why.
- Bullet points for specific changes
- Reference issues: Fixes #123
Pull Request Process¶
- Create PR: Open a pull request with a clear title and description
- Tests: Ensure all tests pass
- Code Review: Address review feedback
- Documentation: Update documentation if needed
- Merge: Maintainers will merge when ready
PR Checklist¶
- [ ] Tests pass (
make test) - [ ] Code is formatted (
make format) - [ ] Code is linted (
make lint) - [ ] Type checks pass (
make type-check) - [ ] Documentation updated (if needed)
- [ ] CHANGELOG.md updated (if needed)
Documentation¶
Building Documentation¶
# Build documentation
make docs
# Serve documentation locally
make docs-serve
# Deploy to GitHub Pages
make docs-deploy
Writing Documentation¶
- Use clear, concise language
- Include code examples
- Add links to related topics
- Mark incomplete pages with "This page is under construction."
Project Structure¶
knl/
├── src/knl/ # Source code
│ ├── cli.py # Main CLI entry point
│ ├── models/ # Pydantic models
│ ├── core/ # Core business logic
│ ├── commands/ # CLI command implementations
│ └── utils/ # Utility modules
├── tests/ # Test suite
├── docs/ # Documentation
├── install.sh # Installer script
└── pyproject.toml # Project metadata
Getting Help¶
- Documentation: https://akaliazin.github.io/knl/
- Issues: https://github.com/akaliazin/knl/issues
- Discussions: https://github.com/akaliazin/knl/discussions
Code of Conduct¶
Be respectful and constructive in all interactions.
License¶
By contributing, you agree that your contributions will be licensed under the same license as the project.
Next Steps¶
- Development Setup - Set up your environment
- Testing Guide - Write tests
- Architecture Principles - Understand the design