Thank you for your interest in FletX! 🎉 This comprehensive guide outlines how to contribute effectively.
- Getting Started
- Project Structure
- Development Workflow
- Code Conventions
- Testing & Quality
- Documentation
- Reporting Bugs
- Feature Proposals
- Code of Conduct
- Clone the repository
git clone https://github.com/AllDotPy/FletX.git
cd FletX- Set up virtual environment (Recommended: UV)
pip install uv
uv venv
source venv/bin/activate # Linux/Mac
# or .\venv\Scripts\activate # Windows- Install dependencies
uv pip install -e .[dev] # Development mode- Verify installation
pytest tests/.
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── architecture.svg
├── docs/
├── examples/
├── fletx
│ ├── __init__.py
│ ├── app.py
│ ├── core
│ │ ├── __init__.py
│ │ ├── controller.py
│ │ ├── di.py
│ │ ├── effects.py
│ │ ├── factory.py
│ │ ├── navigation
│ │ │ ├── guards.py
│ │ │ ├── middleware.py
│ │ │ └── transitions.py
│ │ ├── observer.py
│ │ ├── page.py
│ │ ├── route_config.py
│ │ ├── router.py
│ │ ├── state.py
│ │ ├── types.py
│ │ └── widget.py
│ ├── decorators
│ │ ├── controllers.py
│ │ ├── reactive.py
│ │ └── route.py
│ ├── utils
│ │ ├── __init__.py
│ │ ├── context.py
│ │ ├── exceptions.py
│ │ └── logger.py
│ └── widgets
│ ├── __init__.py
│ └── text.py
├── main.py
├── pyproject.toml
└── setup.py-
Create a branch
Branch frommasterwith descriptive naming:git checkout -b feat/new-reactive-component
-
Implement changes
- Keep commits atomic
- Document new features
-
Run tests
uv pip install -e .[test]
pytest tests/- Submit a Pull Request
- Clearly describe changes
- Reference related issues
- Address code review feedback
- Follow PEP 8 (88 chars max line length)
- Type hints for all public functions
- Google-style docstrings for key modules
# Good
class ReactiveButton(ft.ElevatedButton, FletXWidget):
""" My Reactive Button which.... """
def __init__(self, text: RxStr, **kwargs):
super().__init__(**kwargs)
# Create a reactive object
self.rx_text: RxStr = RxStr('')
# And bind it to self (@ft.ElevatedButton) text attribute
self.bind('text', self.rx_text)- Prefix reactive widgets with
Reactive - Isolate state logic in dedicated classes
pytest tests/ --cov=fletx --cov-report=html- Maintain >90% code coverage
- All new widgets require:
- Unit tests
- Functional example
- Documentation
class ReactiveText(ft.Text, FletXWidget):
"""Text widget with reactive value binding.
Args:
value: RxStr to bind to text value
color: RxStr for text color (optional)
"""cd docs/
make html- Check existing issues for duplicates
- Include:
- Steps to reproduce
- Expected vs actual behavior
- FletX/Python versions
- Minimal reproducible example
- Clearly describe the use case
- Suggest technical approach
- Outline potential impacts
- Attach mockups if applicable
We adhere to the Contributor Covenant Code of Conduct. By participating:
- Be kind and open-minded
- Respect differing viewpoints
- Assume good faith
Thank you for helping build FletX! Together we're creating the best reactive framework for Flet. 🚀