Thank you for your interest in contributing to Feldfreund_devkit! This document provides guidelines to help you get started.
If you encounter a bug or have a feature request:
- Check if the issue already exists in the issue tracker
- Provide a clear description of the problem or suggestion
- Include steps to reproduce (for bugs)
- Add relevant code snippets or error messages
We are committed to providing a welcoming and inclusive environment. Please be respectful and constructive in all interactions.
- Python 3.11+ and pip installed
- Git for version control
- Fork and clone the repository
- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
make sync- Install pre-commit hooks:
pre-commit install- Simplicity - Always prefer simple, straightforward solutions
- Readability - Code should be self-explanatory
- Maintainability - Keep files under 200-300 lines; refactor if larger
- No duplication - Check for similar code before adding new functionality
- Naming conventions:
- Python files: lowercase with underscores (e.g.,
demo_class.py) - Python classes: CamelCase (e.g.,
DemoClass)
- Python files: lowercase with underscores (e.g.,
- Use single quotes for strings (except docstrings)
- Use f-strings for string formatting
- Follow PEP 8 with 120 character line length
- Type hints are encouraged for public APIs
- Minimal comments - only for non-obvious logic (start with
NOTE:)
- High-level code first, helpers below
- Each file should have a clear, single purpose
- Group related functionality together
- Use early returns to reduce nesting
- Never block the event loop - All async handlers must stay non-blocking
- Never use
asyncio.create_task()- The garbage collector might remove unfinished tasks - Use appropriate methods based on operation type:
run.cpu_bound()for CPU-intensive operationsrun.io_bound()for blocking I/O operationsbackground_tasks.create()for background tasks that need proper lifecycle management
- Clean up background tasks on teardown
- Handle resource cleanup properly in async contexts
- Understand the requirements - Ensure you know what needs to be done
- Check existing code - Look for similar patterns or functionality
- Discuss significant changes - Open an issue or discussion for large changes
- Create a feature branch from
main - Make focused commits with clear messages
- Write or update tests for your changes
- Ensure all tests pass
- Format code according to style guidelines
- Update documentation if needed
Run tests before submitting:
uv run pytestWrite tests for:
- New features
- Bug fixes
- Edge cases
Check your code with:
make check # which runs:
# ruff check .
# mypy .
# pylint ./feldfreund_devkitOr let pre-commit handle it:
make pre-commit # which runs:
# pre-commit run --all-files- Push your changes to your fork
- Open a pull request against
main - Provide a clear description of the changes
- Reference any related issues
- Ensure CI checks pass
- Code follows project style guidelines
- Tests added/updated and passing
- Documentation updated if needed
- No unrelated changes included
- Commit messages are clear
We welcome AI-assisted development! When using AI coding assistants:
- Review AGENTS.md for AI-specific guidelines
- Ensure AI-generated code follows project principles
- Always review and understand AI suggestions before committing
- Test AI-generated code thoroughly
AI can assist with code reviews according to .github/copilot-instructions.md.
Before submitting a PR, you should review your changes with an AI assistant:
In Cursor or VS Code with GitHub Copilot Chat:
Select Agent Mode with claude-sonnet-4 and write:
Review my current branch according to @.github/copilot-instructions.md
Or in Cursor, use these custom commands for easy access:
- Type
/in Cursor chat - Select commands:
/review-uncommitted- Review your local uncommitted changes/review-branch- Review your current branch vs main/simplify- Suggest ways to simplify code/explain- Explain what code does
Ensure to address any valid feedback. This will make your life and that of the maintainers much easier.
- Add docstrings for public APIs
- Update README.md for user-facing changes
- Each sentence should be on a new line in Markdown files
- Keep documentation clear and concise
If you have questions or need help:
- Open a discussion in the issue tracker
- Reach out to maintainers
- Check existing issues and pull requests
Thank you for contributing to Feldfreund_devkit!