open-autonomy icon indicating copy to clipboard operation
open-autonomy copied to clipboard

FSM scaffold tool help does not work properly.

Open jmoreira-valory opened this issue 2 years ago • 4 comments

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

  • OS: Ubuntu
  • Python version: 3.10.9
  • Package Version 0.6.0

Steps to reproduce

See above

Expected behaviour

Help message should be displayed unconditionally.

Actual behaviour

See above

jmoreira-valory avatar Dec 20 '22 15:12 jmoreira-valory

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

autonomy scaffold -tlr fsm --help

angrybayblade avatar Feb 09 '23 08:02 angrybayblade

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.

jmoreira-valory avatar Mar 13 '23 15:03 jmoreira-valory

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

8ball030 avatar Mar 14 '23 12:03 8ball030

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.

dagacha avatar Mar 14 '23 15:03 dagacha