jsonargparse icon indicating copy to clipboard operation
jsonargparse copied to clipboard

Implement minimal boilerplate CLIs derived from type hints and parse from command line, config files and environment variables

Results 43 jsonargparse issues
Sort by recently updated
recently updated
newest added

## 🚀 Feature request Support attribute docstrings like [SimpleParsing does here](https://github.com/lebrice/SimpleParsing/blob/master/examples/docstrings/README.md). For example: **train.py** ```py from dataclasses import dataclass from jsonargparse import ArgumentParser from typing import Literal @dataclass class Hyperparameters:...

enhancement

This is about using `jsonargparse` within [LightningCLI](https://pytorch-lightning.readthedocs.io/en/latest/api/pytorch_lightning.utilities.cli.html#module-pytorch_lightning.utilities.cli) to generate a nice CLI easily, but the use case is likely more general. `pydantic` is a fantastic way to use structured types...

documentation

These 2 should be equal on Python>=3.7 ```python from typing import Optional from jsonargparse import ArgumentParser class Foo: def __init__(self, x: Optional[str] = None) -> None: self.x = x parser...

enhancement

This was my first day trying out this module I notice that repeated key names may lead to undesirable results. Even if they are separated by level I have given...

bug

## 📚 Documentation improvement Maybe I am just missing something from the documentation, but I would like to generate a config file from a parser with several sub_commands. I have...

documentation

Hi, I find jsonargparse incredibly useful for organizing code in ML experiments. Thank you for creating such an excellent project. I frequently encounter a use case where I need to...

enhancement

## 🐛 Bug report From [issue 309](https://github.com/omni-us/jsonargparse/issues/309) When the classmethod's parameters do not include their type, the error message indicates the failure to find the method instead of prompting the...

bug

## 🚀 Feature request I would like to request the ability to define multilevel subcommands using only class objects. ### Motivation Related: #334 We cannot define multilevel subcommands using class...

enhancement

Hello! I'm trying to do combine the CLI + config utility with subcommands and i'm not able to. The CLI takes an object as an argument and in the subcommand...

bug

## 🐛 Bug report ### To reproduce ```python from jsonargparse import ArgumentParser parser = ArgumentParser() parser.add_argument("--mode", type=int, default=1, choices=[0, 1]) cfg = parser.parse_args() print(cfg.mode) ``` Output: ```shell > python argparse_test.py...

bug