modernjuliaworkflows.github.io icon indicating copy to clipboard operation
modernjuliaworkflows.github.io copied to clipboard

Command line interfaces

Open willow-ahrens opened this issue 9 months ago • 5 comments

It would be really helpful to have a section on command line tools, I know that there are: https://github.com/carlobaldassi/ArgParse.jl https://github.com/comonicon/Comonicon.jl https://github.com/zachmatson/ArgMacros.jl

There's a blog post here: https://work.sparktseung.com/pages/2022-01-02-Julia-Argparse/

There's the related issue of precompiling the CLI: https://discourse.julialang.org/t/how-to-packagecompile-argparse/31994/6 https://comonicon.org/stable/project/#Enable-System-Image

I was somewhat bewildered by this ecosystem, so I came to this website hoping for an opinionated answer.

willow-ahrens avatar May 03 '24 15:05 willow-ahrens

also https://github.com/admercs/SimpleArgParse.jl

willow-ahrens avatar May 03 '24 15:05 willow-ahrens

A PR would be welcome, but I'm not sure which page this belongs to? Perhaps the time of the fourth page has arrived?

gdalle avatar May 03 '24 18:05 gdalle

Maybe it's worth it to have a page on deployment, including packagcompiler, compiling apps, and argument parsing.

willow-ahrens avatar May 04 '24 16:05 willow-ahrens

also: https://github.com/kmsquire/ArgParse2.jl and https://github.com/docopt/DocOpt.jl

willow-ahrens avatar May 04 '24 17:05 willow-ahrens

also https://github.com/attractivechaos/Getopt.jl

willow-ahrens avatar May 04 '24 17:05 willow-ahrens

+1 for this suggestion. I'm just getting back into this again after a couple of years, and "bewildering" is definitely the right adjective. Note also the new (@main)(ARGS) entrypoint macro, and upcoming juliac, and it gets even worse

kescobo avatar Oct 18 '24 14:10 kescobo

I suppose I can add my 2 cents here now: After considering all of these in a team where many developers are new to julia programming, I ultimately decided that docopt was the easiest to explain and use. Many of the other interfaces are very "magic", and use advanced features like macros or modules. I would have liked to use https://github.com/kmsquire/ArgParse2.jl because it is simple and many programmers are familiar with python's argparse, but the code is not feature complete.

willow-ahrens avatar Oct 18 '24 14:10 willow-ahrens

Maybe it's worth it to have a page on deployment, including packagcompiler, compiling apps, and argument parsing.

This makes sense to me, a page for anything related to running Julia outside of the interpreter / REPL session. While we're at it, some pointers on running Julia jobs on common compute cluster environments would be useful as well.

adrhill avatar Oct 18 '24 14:10 adrhill

I have never used any of these tools so I don't feel very comfortable writing such a page but I'll happily review

gdalle avatar Oct 18 '24 15:10 gdalle

Maybe it's worth it to have a page on deployment, including packagcompiler, compiling apps, and argument parsing.

Opened #130 to add such a new page.

adrhill avatar Jan 13 '25 17:01 adrhill