Skip to content

Releases: brentyi/tyro

Release v0.1.6

12 Jul 10:29
Compare
Choose a tag to compare

Niche improvements for nesting:

  • Optionals:
    • Optional types in containers (eg List[Optional[T]]).
    • Optional nested structures (eg Optional[SomeDataclassType]).
  • Remove limit on # of nested unions/subparsers (previously: one union over child structures per parent class).

Enabling more useful "base configuration" design patterns via default_instance:

  • Introduce dcargs.MISSING for marking arguments as missing defaults.
  • Introduce avoid_subparsers argument for dcargs.cli().

Release v0.1.5

05 Jul 10:26
Compare
Choose a tag to compare
  • Added support for general dictionary annotations, via typing.Dict[K, V].
  • Refactored argument definition backend, which fixes some helptext corner cases for nested positional arguments.

Release v0.1.4

03 Jul 06:58
Compare
Choose a tag to compare

Improvements for non-dataclass nested structures:

  • Helptext fix for standard classes.
  • TypedDict support.
  • NamedTuple support.

Release v0.1.3

24 Jun 10:13
Compare
Choose a tag to compare

Minor bug fixes:

  • Underscores in positional arguments.
  • Booleans with defaults in positional arguments.
  • Docstring corner case for generics.

Release v0.1.2

22 Jun 01:36
Compare
Choose a tag to compare

Significantly more thorough checks for unsupported type annotations.

Release v0.1.1

20 Jun 04:46
Compare
Choose a tag to compare

Minor error handling improvements, better backward-compatibility.

Release v0.1.0

18 Jun 10:58
Compare
Choose a tag to compare

dcargs.parse() has been renamed dcargs.cli().
Instead of just dataclasses, we now support general typed callables: functions, standard classes, attrs, etc.

Release v0.0.21

30 May 17:29
88e8000
Compare
Choose a tag to compare

Docstring and helptext improvements:

  • Suppress TypeError from docstring parser in Jupyter notebooks.
  • Comment parsing is now more robust; it also now supports grouping,
    where the same comment is associated with multiple fields.
  • Printed defaults, particularly for sequence types (lists, tuples,
    sets), are now more consistently formatted.

Release v0.0.20

22 Apr 01:25
Compare
Choose a tag to compare

Improved readability of --help. We now group arguments and generate comment/docstring-based helptext for nested dataclasses.

Release v0.0.19

21 Apr 18:28
Compare
Choose a tag to compare

Redesigned how annotations are parsed and used to instantiate fields; an iterative process is now recursive.

This is simpler, enables more informative error messages, and makes containers slightly more robust; supported annotations now include sequence types containing literals or enums (eg List[Literal[0, 1, 2, 3]] or Tuple[SomeEnum, SomeEnum, SomeEnum]).