Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group help text by parser #166

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Group help text by parser #166

merged 1 commit into from
Mar 19, 2024

Conversation

thomas-bc
Copy link
Collaborator

@thomas-bc thomas-bc commented Mar 12, 2024

Related Issue(s)
Has Unit Tests (y/n)
Documentation Included (y/n)

Change Description

Groups --help text by Parser class, using its description as title for the help section. Also ordering the set of parser on iteration, so that the output is deterministically ordered.

Ends up displaying like the following (text is truncated cause it's kinda long...)

GUI options:
  -g {none,html}, --gui {none,html}
                        Set the desired GUI system for running the deployment. [default: html]
  --gui-addr GUI_ADDR   Set the GUI server address [default: 127.0.0.1]
  --gui-port GUI_PORT   Set the GUI server address [default: 5000]

Logging options:
  -l LOGS, --logs LOGS  Logging directory. Created if non-existent. [default: /Users/chammard/Work/fp/fprime-tutorial-math-component/MathDeployment/logs]
  --log-directly        Logging directory is used directly, no extra dated directories created. (default: False)
  --log-to-stdout       Log to standard out along with log output files (default: False)

Middleware options:
  --zmq                 Switch to using the ZMQ transportation layer (default: False)
  --zmq-transport serverInUrl serverOutUrl
                        Pair of URls used with --zmq to setup ZeroMQ transportation [default: ['ipc:///tmp/fprime-server-in', 'ipc:///tmp/fprime-server-out']]
  --tts-port TTS_PORT   Set the threaded TCP socket server port [default: 50050]
  --tts-addr TTS_ADDR   Set the threaded TCP socket server address [default: 0.0.0.0]

Future Work

One little nit is that all the PluginParser stuff is listed in a section:

Plugin options:
  --framing-selection {fprime}
                        Select framing implementer. (default: fprime)
  --comm-checksum-type {fixed,crc32}
                        Setup the checksum algorithm. [default: crc32]
  --communication-selection {uart,ip,none}
                        Select communication implementer. (default: ip)
  --uart-device DEVICE  UART device representing the FSW. (default: /dev/cu.Bluetooth-Incoming-Port)
  --uart-baud BAUD      Baud rate of the serial device. (default: 9600)
  --ip-address ADDRESS  Address of the IP adapter server. (default: 0.0.0.0)
  --ip-port PORT        Port of the IP adapter server. (default: 50000)
  --ip-client           Run the IP adapter as the client (connects to FSW running TcpServer) (default: True)

which isn't the best... but it's always better than what we currently have.
As we mature PluginParser, it could be good to keep in mind that we might benefit from knowing which plugin each option is coming from and somehow parse that accordingly... just food for thought!

@thomas-bc thomas-bc requested a review from LeStarch March 12, 2024 18:39
@LeStarch LeStarch merged commit 5056beb into nasa:devel Mar 19, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants