georust / rinex

RINEX and GNSS data processing :artificial_satellite:
Apache License 2.0
76 stars 19 forks source link

Cli improvements #198

Closed gwbres closed 9 months ago

gwbres commented 9 months ago

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

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 current opmodes are (use -h for each of them):

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...

lnicola commented 9 months ago

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

gwbres commented 9 months ago

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 commented 9 months ago

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

image

vs.

image

gwbres commented 9 months ago

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