diff --git a/flexmeasures/cli/data_add.py b/flexmeasures/cli/data_add.py index a9b39141d..d761d8d53 100755 --- a/flexmeasures/cli/data_add.py +++ b/flexmeasures/cli/data_add.py @@ -1133,7 +1133,8 @@ def add_schedule_for_storage( default="PandasReporter", required=True, type=click.STRING, - help="Reporter class registered in flexmeasures.data.models.reporting or in an available flexmeasures plugin.", + help="Reporter class registered in flexmeasures.data.models.reporting or in an available flexmeasures plugin." + " Use the command `flexmeasures show reporters` to list all the available reporters.", ) @click.option( "--sensor-id", diff --git a/flexmeasures/cli/data_show.py b/flexmeasures/cli/data_show.py index 9c28d038c..59b8fe2cf 100644 --- a/flexmeasures/cli/data_show.py +++ b/flexmeasures/cli/data_show.py @@ -376,4 +376,27 @@ def plot_beliefs( click.secho("Data saved to file.", **MsgStyle.SUCCESS) +@fm_show_data.command("reporters") +@with_appcontext +def list_reporters(): + """ + Show available reporters. + """ + + click.echo("Reporters:\n") + click.echo( + tabulate( + [ + ( + reporter_name, + reporter_class.__version__, + str(reporter_class.__author__), + ) + for reporter_name, reporter_class in app.reporters.items() + ], + headers=["name", "version", "author"], + ) + ) + + app.cli.add_command(fm_show_data)