File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed
Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 22
33## [ Unreleased] [ ]
44
5- [ Unreleased ] : https://github.com/chaostoolkit/chaostoolkit-reporting/compare/0.16.0...HEAD
5+ [ Unreleased ] : https://github.com/chaostoolkit/chaostoolkit-reporting/compare/0.17.0...HEAD
6+
7+ ## [ 0.17.0] [ ] - 2024-01-05
8+
9+ [ 0.17.0 ] : https://github.com/chaostoolkit/chaostoolkit-reporting/compare/0.16.0...0.17.0
10+
11+ ### Added
12+
13+ - The ` --title ` option to the ` report ` command so you can force the title
14+ in the report header
615
716## [ 0.16.0] [ ] - 2023-12-05
817
Original file line number Diff line number Diff line change 3434 "generate_report_header" ,
3535 "save_report" ,
3636]
37- __version__ = "0.16 .0"
37+ __version__ = "0.17 .0"
3838
3939curdir = os .getcwd ()
4040basedir = os .path .dirname (__file__ )
4343
4444
4545def generate_report_header (
46- journal_paths : List [str ], export_format : str = "markdown"
46+ journal_paths : List [str ],
47+ export_format : str = "markdown" ,
48+ title : str = None ,
4749) -> str :
4850 header_template = get_report_template (None , "header.md" )
4951
5052 header_info = {}
51- header_info ["title" ] = "Chaos Engineering Report"
53+ header_info ["title" ] = "Chaos Engineering Report" or title
5254 header_info ["today" ] = datetime .now ().strftime ("%d %B %Y" )
5355 header_info ["export_format" ] = export_format
5456 tags = []
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ def validate_vars(
2929
3030
3131@click .command ()
32+ @click .option (
33+ "--title" ,
34+ help = "Title to use in the header of the report" ,
35+ )
3236@click .option (
3337 "--export-format" ,
3438 default = "markdown" ,
@@ -63,11 +67,12 @@ def report(
6367 var_file : List [str ] = None ,
6468 journal : str = "journal.json" ,
6569 report : str = "report.md" ,
70+ title : str = None ,
6671):
6772 """
6873 Generate a report from the run journal(s).
6974 """
70- header = generate_report_header (journal , export_format )
75+ header = generate_report_header (journal , export_format , title )
7176 report_path = report
7277 reports = []
7378
You can’t perform that action at this time.
0 commit comments