Thank you for your interest in contributing to Plating! This document provides guidelines and instructions for contributors.
Plating uses UV for Python environment and package management.
macOS and Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"-
Fork and clone the repository:
git clone https://github.com/provide-io/plating.git cd plating -
Set up development environment:
uv venv source .venv/bin/activate # Linux/macOS # or .venv\Scripts\activate # Windows uv sync
-
Verify installation:
python -m plating.cli --help uv run pytest tests/ -v # Note: 2 tests may be skipped if optional dependencies are not installed # This is expected behavior and not a problem
We maintain high code quality standards with automated tools:
# Format code
uv run ruff format src/plating tests
# Check linting
uv run ruff check src/plating tests
# Type checking
uv run mypy src/plating
# Run all quality checks
uv run pytest tests/- Python Version: 3.11+
- Line Length: 111 characters
- Type Hints: Modern typing (
dict,list,setinstead ofDict,List,Set) - Import Style: Absolute imports (
from plating.X import Y) - No Hardcoded Defaults: Use
defaults.pyorconstants.pyfor configuration values
# Run all tests
uv run pytest tests/
# Run specific test file
uv run pytest tests/test_cli.py
# Run with coverage
uv run pytest tests/ --cov=plating --cov-report=html
# Run tests matching pattern
uv run pytest -k test_adorn- PlatingBundle System: Core abstraction for
.platingdirectories - Async-First Design: Primary renderer is async with sync adapters
- Attrs for Data Classes: Use
@attrs.defineinstead of@dataclass - Pyvider Integration: Leverage hub for component discovery
- Error Handling: Use
provide.foundationpatterns
- Check existing issues before creating new ones
- Discuss significant changes in issues before implementing
- Use issue templates when available
- Create feature branches from
develop - Follow code style guidelines
- Add tests for new functionality
- Update documentation as needed
- Target Branch:
develop(notmain) - Title Format:
feat: add component discovery cachingorfix: handle missing schema gracefully - Description: Include issue reference, change summary, and testing notes
- All PRs require review before merging
- Address reviewer feedback promptly
- Ensure CI checks pass
- Maintain clean commit history
plating.py: Main Plating API class with adorn/plate/validate operationscli.py: Command-line interfaceregistry.py: Component registry and bundle managementadorner/: Component template generation systemcore/: Core documentation generation logicschema/: Schema extraction and processingtemplating/: Jinja2 template engine and functionsdiscovery/: Bundle and component discoverytypes.py: Type definitions and data modelserrors.py: Custom exception classes
- Jinja2 Templates: Located in
.plating/docs/directories - Custom Functions:
schema(),example(),include(),render() - Partials: Files starting with
_for reusable content
- Unit Tests: Individual component testing
- Integration Tests: End-to-end workflow validation
- CLI Tests: Command-line interface testing
- Mock Strategy: Mock pyvider.hub for isolated testing
- Docstrings: All public functions and classes
- Type Hints: Complete type annotations
- Examples: Include usage examples in docstrings
- Update README.md for user-facing changes
- Include code examples in documentation
- Maintain CHANGELOG.md with all changes
- Version Bump: Update
VERSIONfile - Changelog: Update
CHANGELOG.mdwith release notes - Testing: Run full test suite
- Tag Release: Create version tag
- PyPI Upload: Automated via CI/CD
- GitHub Issues: Bug reports and feature requests
- Discussions: General questions and ideas
- Code Review: PR feedback and suggestions
By contributing to Plating, you agree that your contributions will be licensed under the Apache 2.0 License.
Contributors are recognized in:
- CHANGELOG.md for significant contributions
- GitHub contributors page
- Release notes for major features
Thank you for contributing to Plating! 🍽️