Skip to content

Commit

Permalink
Merge 1d1ed72 into 1a73c1a
Browse files Browse the repository at this point in the history
  • Loading branch information
victorgarcia98 committed May 18, 2023
2 parents 1a73c1a + 1d1ed72 commit 4a304d0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flexmeasures/cli/data_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
23 changes: 23 additions & 0 deletions flexmeasures/cli/data_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 4a304d0

Please sign in to comment.