Skip to content
#

argument-parsing

Here are 117 public repositories matching this topic...

picocli

Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.

  • Updated Aug 19, 2021
  • Java
mz8i
mz8i commented Mar 23, 2021

It might be useful to provide some kind of error classes as part of this package.
For example, I use code like this:

from argparse import ArgumentError, ArgumentParser

def file_path(x: str):
   d = Path(x)
   if d.is_dir:
      raise ArgumentError(f"{d} is a directory")
   return d

parser = ArgumentParser()
parser.add_argument('output_file', type=file_path, help="Path to 
SimpleParsing
Ozziko
Ozziko commented Jul 23, 2021

simple-parsing is simply awesome (thanks!). I'd like to suggest a feature that is crucial for parsing nested args, in my opinion, and the support of other researchers in my group. Here is a minimal example to make things clear:

from dataclasses import dataclass
from simple_parsing import ArgumentParser, ConflictResolution

@dataclass
class WandbArgs:
    dir: str = ''  # Wandb run ca

Improve this page

Add a description, image, and links to the argument-parsing topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the argument-parsing topic, visit your repo's landing page and select "manage topics."

Learn more