Skip to content

Commit

Permalink
Rename -f csv_export to -f csv for consistency with other formatt…
Browse files Browse the repository at this point in the history
…er names
  • Loading branch information
aantn committed Jun 15, 2024
1 parent bff9fe0 commit 39e6298
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
3 changes: 1 addition & 2 deletions robusta_krr/formatters/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 39e6298

Please sign in to comment.