Development Guide
Style
Generally, use Google’s Python style guide.
Quality Standards
The following quality standards are required before any code is merged into the master branch:
-
Code Formatting: Use Black to automatically format all Python code.
-
Type Hinting: Compliance with MyPy type hinting is mandatory.
-
Code Style: Source code must conform to PEP 8 standards. Both isort and flake8 must be run prior to committing code.
-
Security Checks: All Bandit checks must pass to ensure there are no common security issues.
-
Linting: A perfect pylint score of 10.0 is required for all files.
Pre-commit is used to enforce these standards and is configured in the development environment. For more information, refer to the .pre-commit-config.yaml
file. To manually run the pre-commit checks, execute the default make
target:
Standards
- Python: Use Python 3.11
- Pydantic: use Pyantic 2.x syntax
- LangChain: Langechain’s Langchain Expression Control Language (LECL) syntax must be used to invoke LLMs where needed.
Project Submodules
Submodules are external repositories that can be either required or optional dependencies to the Eleanor Framework. Submodules must be placed under submodules/
. To add a submodule, use the following command:
For example: