lebrice / SimpleParsing

Simple, Elegant, Typed Argument Parsing with argparse
MIT License
384 stars 46 forks source link

Proper support for subgroups in yaml configs #231

Closed norabelrose closed 1 year ago

norabelrose commented 1 year ago

Fixes #173.

For subgroup fields, a __subgroup__ entry is added inside the yaml file whose value is the name of the subgroup that was selected. This is used upon loading to select the appropriate class to instantiate.

Probably some tests need to be added for this; will look at doing this ASAP

norabelrose commented 1 year ago

Update: added a test_subgroups test in test_decoding.py

lebrice commented 1 year ago

Hey @norabelrose , I replied on #173. Let's have a chat there. There's also #211 that addresses this.

lebrice commented 1 year ago

Closing in favor of #233