valory-xyz / open-autonomy

A framework for the creation of autonomous agent services.
https://docs.autonolas.network
Apache License 2.0
80 stars 27 forks source link

FSM scaffold tool help does not work properly. #1684

Open jmoreira-valory opened 1 year ago

jmoreira-valory commented 1 year ago

Subject of the issue

when executing autonomy scaffold fsm --help it outputs: Error: Agent configuration file 'aea-config.yaml' not found in the current directory.

when executed inside an agent directory (hello world agent) it produces

autonomy scaffold fsm --help Error: Cannot find connection: 'valory/abci:0.1.0:bafybeiaw3tzlg3rkvnn5fcufblktmfwngmxugn4yo7pyjp76zz6aqtqcay'

Your environment

Steps to reproduce

See above

Expected behaviour

Help message should be displayed unconditionally.

Actual behaviour

See above

angrybayblade commented 1 year ago

When running the command outside of an aea project you need to use -tlr flag, eg

autonomy scaffold -tlr fsm --help

jmoreira-valory commented 1 year ago

Sorry but I am not satisfied with the solution.

IMO, as an user, I do not expect to use a specific flag to see a help message. Whenever we include a "--help" flag in a command, it should not start doing any operation (as it seems it is doing above, because it does not find the .yaml file); it should simply print the help message with the available parameters. How can the user know otherwise what is the flag required to display the --help message? This should apply not only to this but to all commands in the framework.

Of course, my complain can be overridden by @dagacha or @DavidMinarsch and they can close this ticket if the solution proposed above satisfies them.

8ball030 commented 1 year ago

i have fallen foul of this multiple times, and very odd that this help is shown on the main cli group

dagacha commented 1 year ago

The standard behaviour of --help is to display information on options related to the command being run. In particular, it should not return any error.