- Install dependencies:
uv sync - Run project:
uv run python <script.py> - No linting tools configured - use your judgment for code quality
- No test framework configured - test manually by running scripts
- Use Python 3.11+ (as specified in .python-version and pyproject.toml)
- Group imports: standard library first, then third-party packages
- Use absolute imports
- Sort imports alphabetically within groups
- Variables/Functions: snake_case (e.g.,
get_weather,model_id) - Classes: PascalCase (not observed in codebase yet)
- Constants: UPPER_CASE (not observed in codebase yet)
- Use type hints for function parameters and return types
- Use
Optionalfromtypingfor optional parameters - Example:
def get_weather(location: str, celsius: Optional[bool] = False) -> str:
- Use docstrings for all functions with descriptions and Args sections
- Keep docstrings concise but informative
- Use context managers (
withstatements) for resource management - Handle exceptions appropriately (not extensively observed in codebase)
- Keep functions focused on single responsibilities
- Use meaningful variable names
- Prefer f-strings for string formatting
- Follow PEP 8 conventions
- Only use packages already in pyproject.toml: smolagents, sqlalchemy
- Check pyproject.toml before adding new dependencies