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

Command-line parsing library #178

Open
marcelocantos opened this issue May 1, 2020 · 0 comments
Open

Command-line parsing library #178

marcelocantos opened this issue May 1, 2020 · 0 comments
Assignees
Labels
enhancement P0 High priority issue

Comments

@marcelocantos
Copy link
Contributor

marcelocantos commented May 1, 2020

Implement a library that implements command-line parsing for arr.ai programs, with support for the usual patterns, such as -f, --flag, --option=foo, --help and --version.

Wild idea

Consider opportunities to use arr.ai's grammar system to define the command-line. It might be possible to make the config look like the output of --help, e.g.:

let args = //cmdline{
    arrai - the ultimate data engine

    USAGE: arrai [global options] command [command options] [arguments...]

    COMMANDS:
       shell, i      start the arrai interactive shell
       run, r        evaluate an arrai file
       eval, e       evaluate an arrai expression
       json, jx      Convert json to arrai
       observe, o    observe an expression on a server
       serve, s      start arrai as a gRPC server
       sync, s       sync local files to a server
       transform, x  transform a stream of input data with an expression
       update, u     update a server with an expression
       help, h       Shows a list of commands or help for one command

    GLOBAL OPTIONS:
       --help, -h  show help
}.parse(//os.args);
args.command cond (
    "shell": //{./cmd_shellargs),
    "run": //{./cmd_run}(args),
    ...
)
@ChloePlanet ChloePlanet added the P1 Medium priority issue label May 4, 2020
@marcelocantos marcelocantos added P0 High priority issue and removed P1 Medium priority issue labels Jun 9, 2020
anzopensource pushed a commit that referenced this issue Jun 2, 2021
Adds `Relation` type to optimise join operations.

Co-authored-by: Oliver <Oliver.Lade@anz.com>
Co-authored-by: Marcelo Cantos <anzdaddy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement P0 High priority issue
Projects
None yet
Development

No branches or pull requests

4 participants