From 39e629856874f5e388e9c6dc9aa632a36df12307 Mon Sep 17 00:00:00 2001 From: Robusta Runner Date: Sat, 15 Jun 2024 08:48:16 +0300 Subject: [PATCH] Rename `-f csv_export` to `-f csv` for consistency with other formatter names --- README.md | 2 +- robusta_krr/formatters/csv.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6815c0d1..542cf773 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,7 @@ Currently KRR ships with a few formatters to represent the scan data: - `json` - `yaml` - `pprint` - data representation from python's pprint library -- `csv_export` - export data to a csv file in the current directory +- `csv` - export data to a csv file in the current directory To run a strategy with a selected formatter, add a `-f` flag: diff --git a/robusta_krr/formatters/csv.py b/robusta_krr/formatters/csv.py index 3eaab73d..dd30432b 100644 --- a/robusta_krr/formatters/csv.py +++ b/robusta_krr/formatters/csv.py @@ -40,8 +40,7 @@ def _format_total_diff(item: ResourceScan, resource: ResourceType, pods_current: @formatters.register() -def csv_export(result: Result) -> str: - +def csv(result: Result) -> str: current_datetime = datetime.datetime.now().strftime("%Y%m%d%H%M%S") file_path = f"krr-{current_datetime}.csv"