GMLC-TDC / HELICS

Hierarchical Engine for Large-scale Infrastructure Co-Simulation (HELICS)
https://docs.helics.org/en/latest/
BSD 3-Clause "New" or "Revised" License
126 stars 40 forks source link

`helics_broker --help` prints docstring to console twice #1085

Open kdheepak opened 4 years ago

kdheepak commented 4 years ago

This is the output of running helics_broker --help:

$ helics_broker --help
All core types have similar options
Arguments applying to all Brokers and Cores
Usage: [OPTIONS]

Options:
  -h,-?,--help                Print this help message and exit
  --config-file=helics_config.ini
                              specify base configuration file
  -v,--version
  -f,-m,--federates,--minfederates,--minfed INT
                              the minimum number of federates that will be connecting
  -n,--name,--identifier TEXT the name of the broker/core
  --maxiter,--maxiterations INT=10000
                              the maximum number of iterations allowed
  --minbrokers,--minbroker,--minbrokercount INT
                              the minimum number of cores/brokers that need to be connected (ignored in cores)
  --key,--broker_key TEXT     specify a key to use for all connections to/from a broker
  --no_ping,--slow_responding specify that a broker might be slow or unresponsive to ping requests from other brokers
  --conservative_time_policy,--restrictive_time_policy
                              specify that a broker should use a conservative time policy in the time coordinator
[Option Group: quiet]
  Options:
    --quiet                     silence most print output
[Option Group: logging]
  Options related to file and message logging
  Options:
    --force_logging_flush       flush the log after every message
    --logfile TEXT              the file to log the messages to
    --loglevel,--log-level INT:value in {connections->3,data->6,error->0,interfaces->4,no_print->-1,none->-1,summary->2,timing->5,trace->7,warning->1} OR {3,6,0,4,-1,-1,2,5,7,1}
                                the level which to log the higher this is set to the more gets logs(-1) for no logging
    --fileloglevel INT:value in {connections->3,data->6,error->0,interfaces->4,no_print->-1,none->-1,summary->2,timing->5,trace->7,warning->1} OR {3,6,0,4,-1,-1,2,5,7,1}
                                the level at which messages get sent to the file
    --consoleloglevel INT:value in {connections->3,data->6,error->0,interfaces->4,no_print->-1,none->-1,summary->2,timing->5,trace->7,warning->1} OR {3,6,0,4,-1,-1,2,5,7,1}
                                the level at which messages get sent to the file
    --dumplog                   capture a record of all messages and dump a complete log to file or console on termination
[Option Group: timeouts]
  Options related to network and process timeouts
  Options:
    --tick TIME                 heartbeat time in ms, if there is no broker communication for 2 ticks then secondary actions are taken  (can also be entered as a time like '10s' or '45ms')
    --disable_timer,--no_tick   if set to true the timeout timer is disabled, cannot be re-enabled later
    --timeout TIME              time to wait to establish a network or for a connection to communicate, default unit is in ms (can also be entered as a time like '10s' or '45ms')
    --networktimeout TIME       time to wait for a broker connection default unit is in ms(can also be entered as a time like '10s' or '45ms')
[Option Group: Subcommands]
  Option for Broker
  Options:
    --root                      specify whether the broker is a root
  [Option Group: Subcommands]
    Network connection information
    (arguments allow '_' characters in the names and ignore them)
    Options:
      --config-file=helics_config.ini
                                  specify base configuration file
      -v,--version
      --local{0},--ipv4{4},--ipv6{6},--all{10},--external{10}
                                  specify external interface to use, default is --local
      --brokeraddress TEXT        location of the broker i.e network address
      --reuse_address             allow the server to reuse a bound address, mostly useful for tcp cores
      --noack,--noack_connect     specify that a connection_ack message is not required to be connected with a broker
      --broker TEXT               identifier for the broker, this is either the name or network address use --broker_address or --brokername to explicitly set the network address or name the search for the broker is first by name
      --brokername TEXT           the name of the broker
      --maxsize INT:POSITIVE=4096 The message buffer size
      --maxcount INT:POSITIVE=256 The maximum number of message to have in a queue
      --networkretries INT=5      the maximum number of network retries
      --osport,--use_os_port      specify that the ports should be allocated by the host operating system
      --autobroker                allow a broker to be automatically created if one is not available
      --brokerinit TEXT           the initialization string for the broker
      --client{0},--server{1}     specify that the network connection should be a server or client
      --interface,--localinterface TEXT
                                  the local interface to use for the receive ports
      -p,--port INT:{auto->-1}    port number to use
      --brokerport INT            The port number to use to connect with the broker
      --localport INT:{auto->-1,os->-999}
                                  port number for the local receive port
      --portstart INT             starting port for automatic port definitions
    [Option Group: quiet]
      Options:
        --quiet                     silence most print output

Arguments applying to all Brokers and Cores
Usage: [OPTIONS]

Options:
  -h,-?,--help                Print this help message and exit
  --config-file=helics_config.ini
                              specify base configuration file
  -v,--version
  -f,-m,--federates,--minfederates,--minfed INT
                              the minimum number of federates that will be connecting
  -n,--name,--identifier TEXT the name of the broker/core
  --maxiter,--maxiterations INT=10000
                              the maximum number of iterations allowed
  --minbrokers,--minbroker,--minbrokercount INT
                              the minimum number of cores/brokers that need to be connected (ignored in cores)
  --key,--broker_key TEXT     specify a key to use for all connections to/from a broker
  --no_ping,--slow_responding specify that a broker might be slow or unresponsive to ping requests from other brokers
  --conservative_time_policy,--restrictive_time_policy
                              specify that a broker should use a conservative time policy in the time coordinator
[Option Group: quiet]
  Options:
    --quiet                     silence most print output
[Option Group: logging]
  Options related to file and message logging
  Options:
    --force_logging_flush       flush the log after every message
    --logfile TEXT              the file to log the messages to
    --loglevel,--log-level INT:value in {connections->3,data->6,error->0,interfaces->4,no_print->-1,none->-1,summary->2,timing->5,trace->7,warning->1} OR {3,6,0,4,-1,-1,2,5,7,1}
                                the level which to log the higher this is set to the more gets logs(-1) for no logging
    --fileloglevel INT:value in {connections->3,data->6,error->0,interfaces->4,no_print->-1,none->-1,summary->2,timing->5,trace->7,warning->1} OR {3,6,0,4,-1,-1,2,5,7,1}
                                the level at which messages get sent to the file
    --consoleloglevel INT:value in {connections->3,data->6,error->0,interfaces->4,no_print->-1,none->-1,summary->2,timing->5,trace->7,warning->1} OR {3,6,0,4,-1,-1,2,5,7,1}
                                the level at which messages get sent to the file
    --dumplog                   capture a record of all messages and dump a complete log to file or console on termination
[Option Group: timeouts]
  Options related to network and process timeouts
  Options:
    --tick TIME                 heartbeat time in ms, if there is no broker communication for 2 ticks then secondary actions are taken  (can also be entered as a time like '10s' or '45ms')
    --disable_timer,--no_tick   if set to true the timeout timer is disabled, cannot be re-enabled later
    --timeout TIME              time to wait to establish a network or for a connection to communicate, default unit is in ms (can also be entered as a time like '10s' or '45ms')
    --networktimeout TIME       time to wait for a broker connection default unit is in ms(can also be entered as a time like '10s' or '45ms')
[Option Group: Subcommands]
  TCP Single Socket Broker arguments
  Options:
    --root                      specify whether the broker is a root
    --connections TEXT ...      target link connections
    --no_outgoing_connection    disable outgoing connections
  [Option Group: Subcommands]
    Network connection information
    (arguments allow '_' characters in the names and ignore them)
    Options:
      --config-file=helics_config.ini
                                  specify base configuration file
      -v,--version
      --local{0},--ipv4{4},--ipv6{6},--all{10},--external{10}
                                  specify external interface to use, default is --local
      --brokeraddress TEXT        location of the broker i.e network address
      --reuse_address             allow the server to reuse a bound address, mostly useful for tcp cores
      --noack,--noack_connect     specify that a connection_ack message is not required to be connected with a broker
      --broker TEXT               identifier for the broker, this is either the name or network address use --broker_address or --brokername to explicitly set the network address or name the search for the broker is first by name
      --brokername TEXT           the name of the broker
      --maxsize INT:POSITIVE=4096 The message buffer size
      --maxcount INT:POSITIVE=256 The maximum number of message to have in a queue
      --networkretries INT=5      the maximum number of network retries
      --osport,--use_os_port      specify that the ports should be allocated by the host operating system
      --autobroker                allow a broker to be automatically created if one is not available
      --brokerinit TEXT           the initialization string for the broker
      --client{0},--server{1}     specify that the network connection should be a server or client
      --interface,--localinterface TEXT
                                  the local interface to use for the receive ports
      -p,--port INT:{auto->-1}    port number to use
      --brokerport INT            The port number to use to connect with the broker
      --localport INT:{auto->-1,os->-999}
                                  port number for the local receive port
      --portstart INT             starting port for automatic port definitions
    [Option Group: quiet]
      Options:
        --quiet                     silence most print output

Broker application
Usage: [OPTIONS]

Options:
  -h,-?,--help                Print this help message and exit
  --config-file=helics_config.ini
                              specify base configuration file
  -v,--version
  -n,--name TEXT              name of the broker
[Option Group: quiet]
  Options:
    --quiet                     silence most print output
[Option Group: network type]
  Options:
    -t,--coretype,--type,--core TEXT=()
                                type of the core to connect to

helics broker command line
Usage: helics_broker [OPTIONS] [SUBCOMMAND]

Options:
  -h,-?,--help                Print this help message and exit
  --config-file=helics_config.ini
                              specify base configuration file
  -v,--version
  --autorestart               helics_broker --autorestart <broker args ...> will start a continually regenerating broker there is a 3 second countdown on broker completion to halt the program via ctrl-C

  --http                      start an http webserver that can respond to queries on the broker
[Option Group: quiet]
  Options:
    --quiet                     silence most print output

Subcommands:
  term                        helics_broker term <broker args...> will start a broker and open a terminal control window for the broker run help in a terminal for more commands

helics_broker <broker args ..> starts a broker with the given args and waits for it to complete

This is the only difference in the two sections of repeated help output.

Screen Shot 2020-02-11 at 2 00 47 PM

trevorhardy commented 2 years ago

Still present in v3.1.0