Python Configuration
Codeflash stores its configuration inpyproject.toml under the [tool.codeflash] section.
Full Reference
pyproject.toml file.
Required Options
module-root: The Python module to optimize. Only code under this directory will be optimized. It should have an__init__.pyfile to make the module importable.tests-root: The directory where your tests are located. Codeflash discovers existing tests and generates new ones here.
Optional Options
benchmarks-root: Directory for benchmarks. Required when running with--benchmark.ignore-paths: Paths withinmodule-rootto skip. Useful for build directories or generated code.pytest-cmd: Command to run your tests. Defaults topytest. You can add extra arguments here.formatter-cmds: Formatter/linter commands.$filerefers to the file being optimized. Disable with["disabled"].- ruff (recommended):
["ruff check --exit-zero --fix $file", "ruff format $file"] - black:
["black $file"]
- ruff (recommended):
disable-imports-sorting: Disable isort import sorting. Defaults tofalse.disable-telemetry: Disable anonymized telemetry. Defaults tofalse.git-remote: Git remote for pull requests. Defaults to"origin".override-fixtures: Override pytest fixtures during optimization. Defaults tofalse.