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

Cli improvements #198

Merged
merged 38 commits into from
Dec 28, 2023
Merged

Cli improvements #198

merged 38 commits into from
Dec 28, 2023

Conversation

gwbres
Copy link
Collaborator

@gwbres gwbres commented Dec 28, 2023

Convert existing (RINEX-cli) opmodes into clap::Subcommands.

The application has several opmodes that are exclusive.
Subcommands which are exclusive by nature, are the ideal way to depict them.

Subcommands then has several benefits

  • it makes it easier to understand the CLI with one common panel and then subcommands
  • each panel (including the subcommands) have their own "help" menu. So it makes it easier to document and easier to understand
  • this drastically reduce the quantity of information we have to display:

I merged the RNX2CGGTTS binary into a RINEX-cli -p -cggtts opmode.
Indeed, this one uses the -p behavior, with a customized output. The previous implementation had the code duplicated.
It also required to update both applications on any dependency upgrade.

I renamed the previous "default opmode" to "--graph -G". Considering it's more data visualization oriented.

I'm also introducing a script to test the major applications. Since we're shipping those applications online now, it is almost mandatory to have more CLI/applications continuous integration.

Details

We only have a couple of commands that are shared accross opmodes:

  • the general file loading infrastructure (-f, -d)
  • the workspace and env definition (verbosity -q + workspace location -w)
  • the RX antenna definition (RX position definition --rx-ecef/--rx-geo)
  • the preprocessor: -P to filter data prior running an opmode

The current opmodes are (use -h for each of them):

  • -i: identification opmode, documentation initiated in the Wiki.
  • --split -s: documentation initiated in the Wiki
  • --merge -m: documentation initiated in the Wiki
  • --tbin: time binning opmode, documentation initiated in the Wiki
  • -Q: quality check. See work in progress in the wiki
  • -g: graph mode - See work in progress in the wiki
    It's basically the previous ""default"" opmode, that would generate
    Record visualization.

image

(1) is the general front panel: basically everything that is shared with other opmodes
(2) are the opmodes: you have to select one (and can only select one) to actually do something

Example of subcommand help/documentation :

image

image

(3): RNX2CGGTTS is now a precise positioning opmode. It makes maintaining this operation easier.
It reduces the code quantity: can share the solver logic. It allows sharing the Solver configuration file -c...

Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
@gwbres gwbres added documentation Improvements or additions to documentation enhancement New feature provided labels Dec 28, 2023
@gwbres gwbres self-assigned this Dec 28, 2023
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
rinex-cli/src/cli/graph.rs Outdated Show resolved Hide resolved
rinex-cli/src/cli/mod.rs Outdated Show resolved Hide resolved
@lnicola
Copy link
Member

lnicola commented Dec 28, 2023

rinex-cli/src/file_generation.rs looks like another empty file.

rinex-cli/src/main.rs Outdated Show resolved Hide resolved
Copy link
Member

@lnicola lnicola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubber-stamping this, I can't really review it properly.

Co-authored-by: Laurențiu Nicola <[email protected]>
@gwbres
Copy link
Collaborator Author

gwbres commented Dec 28, 2023

rinex-cli/src/file_generation.rs looks like another empty file.

Hum, I don't have this one on my side.
It did exist at some point indeed, but it was either merged someplace else and partially replaced by the current fops.rs

@lnicola
Copy link
Member

lnicola commented Dec 28, 2023

Right, sorry, the GitHub display is a bit misleading:

image

vs.

image

Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
@gwbres
Copy link
Collaborator Author

gwbres commented Dec 28, 2023

Yeah indeed, I spotted that one and removed it.
The new fops infrastructure regroups this kind of thing.
It could benefit some more logic for the process of file creation, because we happen to do the same thing in a couple of places.
Will try to improve that aswell

Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
Signed-off-by: Guillaume W. Bres <[email protected]>
@gwbres gwbres merged commit 6fc9190 into main Dec 28, 2023
4 checks passed
@gwbres gwbres deleted the cli-improvements branch December 28, 2023 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants