π€ Contributing
π€ Contributing to FlowyML
We welcome contributions of all kinds β from bug reports and documentation improvements to new features and integrations. FlowyML is built by the community, for the community.
π Bug Reports π Documentation β¨ Features π§ͺ Testing
Development Setup π οΈ
Prerequisites
- Python 3.10+
- Node.js 16+ (for UI development)
- Poetry (recommended) or pip
Setting up the Environment
-
Clone the repository:
-
Install dependencies:
-
Install pre-commit hooks:
UI Development π₯οΈ
The UI consists of a FastAPI backend and a React frontend.
Running in Development Mode
-
Start the Backend:
This starts the FastAPI server on port 8000 with auto-reload. -
Start the Frontend:
This starts the Vite dev server on port 5173 with Hot Module Replacement (HMR).
The frontend proxies API requests to the backend at http://localhost:8000.
Building for Production π¦
To build the frontend for production distribution:
This generates static assets in flowyml/ui/frontend/dist, which are served by the Python backend in production mode.
Testing π§ͺ
Running Tests
Run the full test suite:
Run specific tests:
Writing Tests
- Place unit tests in the
tests/directory. - Use the
BaseTestCaseclass for tests that require a temporary directory or isolated configuration. - Ensure all new features have accompanying tests.
Code Style π¨
We follow PEP 8 and use black for formatting.
Pull Request Process π
- Fork the repository.
- Create a feature branch (
git checkout -b feature/amazing-feature). - Commit your changes.
- Push to the branch.
- Open a Pull Request.
Documentation π
Documentation is built with MkDocs.
Update documentation in the docs/ directory for any API changes.
Commit Messages π¬
We follow Conventional Commits:
feat: add new evaluation scorer for toxicity
fix: resolve cache invalidation on context change
docs: update getting-started guide with new API
refactor: simplify step execution engine
test: add integration tests for GCP stack
chore: update dependencies
Good Commit Messages
- Use the imperative mood: "add feature" not "added feature"
- Keep the subject line under 72 characters
- Reference issues:
fix: resolve #123 cache invalidation bug