First off, thank you for considering contributing to Flare AI Kit!
We welcome contributions from the community to help make this SDK robust, feature-rich, and easy to use.
- Search existing issues/PRs to avoid duplicates.
- For opening an issue, use labels
bug,feature,docs, orquestion. - Fork the repo and create a feature branch:
git checkout -b feature/your-feature-name
- Implement, test, then submit a PR referencing the issue.
We strive for high-quality, maintainable code. Please adhere to the following principles:
-
Clean Interfaces & Simplicity:
- Follow the Zen of Python principle: "There should be one-- and preferably only one --obvious way to do it."
- Design clear, minimal, and predictable interfaces for functions and classes.
- Use descriptive names for variables, functions, and classes.
- Keep code focused and avoid unnecessary complexity.
- Use Google-style docstrings.
-
Use dependencies sparingly:
- Every dependency added is a potential security risk.
- If the dependency is required, it should live in under
[project.optional-dependencies]with a key marking the high level function, e.g.rag,consensus.
-
Formatting, Linting & Type-Checking:
- Use ruff for formatting and linting, both settings are defined in
pyproject.toml. - Use pyright for type checking, all new code MUST include accurate type hints. Avoid using
typing.Anyunless absolutely necessary and clearly justified in comments. - You can also install Pylance into VSCode for an easier experience.
- Ensure your code passes all checks locally without errors:
uv run ruff format uv run ruff check --fix uv run pyright
- Use ruff for formatting and linting, both settings are defined in
-
Test Extensively:
- New features must include appropriate unit and/or integration tests using
pytest. - Bug fixes should include tests demonstrating the fix.
- All tests must pass locally before submitting a pull request. Run tests via:
uv run pytest tests/unit/your-test.py -v uv run pytest tests/integration/your-test.py -v
- New features must include appropriate unit and/or integration tests using
-
Use Conventional Commits:
- All commit messages must adhere to the Conventional Commits specification. This helps automate changelog generation and provides a clear commit history.
- Read the spec: https://www.conventionalcommits.org/
- Format:
<type>[optional scope]: <description> - Examples:
feat(rag): add support for Neo4j AuraDB connectionfix(ecosystem): correct decimal calculation in FTSO price feeddocs(readme): update README with installation instructionstest(rag): add unit tests for GraphDbSettingsModelchore(deps): update ruff version in pyproject.toml
Before you mark your PR as ready-to-review:
- Branch is up-to-date with
main. - All linting, formatting, and type checks pass.
- Tests cover new code (unit + integration).
- Commit messages follow Conventional Commits.
- PR description includes purpose and implementation details.
By contributing to Flare AI Kit, you agree that your contributions will be licensed under the Apache License 2.0. See the LICENSE file for more information.
Thank you for contributing!