trevorld / r-argparse

command-line optional and positional argument parser
GNU General Public License v2.0
103 stars 11 forks source link

Pure R version #48

Open MLopez-Ibanez opened 1 year ago

MLopez-Ibanez commented 1 year ago

What would be the most appropriate way to work on a pure R version? Create a fork?

trevorld commented 1 year ago

Contribute pure R version to {argparse}

I don't consider a pure R version to be out of scope for {argparse}. Just seemed like enough work that I didn't particularly want to do it myself when the python backend already works sufficiently for my purposes. But if you (and others in the community) wanted to do the work I'd be happy to colloborate on pull requests and act as CRAN maintainer for a pure R version.

If you wanted to contribute to {argparse} one approach would be to create a new R6 class called RParser that is a pure R implementation of an ArgumentParser() object. Once there is a Minimum Viable Product we could add an engine argument to ArgumentParser() and let users choose which engine to use.

Contribute to pre-existing pure R parsers

By now there are several pure R argument/option parsers. I think a couple of them even use {argparse}-like syntax (although with less overall features) i.e. perhaps {argparser} and {Xmisc}? You could try to add your desired features to an existing parser...

Forking 'argparse'

You could fork {argparse}. Presumably the most valuable part for a pure R version would be its unit tests. A more interesting forking opportunity could be to fork the python version of argparse and then port that to R.