Closed kschwab closed 3 months ago
Also, I deferred converting cmd:None
subcommands into flags (e.g. --cmd:None
) and instead just left them as is.
Attention: 18 lines
in your changes are missing coverage. Please review.
Comparison is base (
3962ed8
) 99.58% compared to head (5adcdb3
) 98.66%.
Files | Patch % | Lines |
---|---|---|
src/tyro/_fields.py | 42.85% | 12 Missing :warning: |
src/tyro/_arguments.py | 25.00% | 3 Missing :warning: |
src/tyro/_docstrings.py | 66.66% | 2 Missing :warning: |
src/tyro/_strings.py | 66.66% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hey @brentyi!
Here's a rough draft of what we covered in #60. I have to set this down for now but wanted to drop this here in case you could pull it across the finish line π
It mostly works. I haven't added tests etc. but did make sure all the existing tests pass. It should provide a decent feel for what we're trying to accomplish. There is still cleanup needed around required field handling and associated help text, lots of testing, etc.
One additional item I added was "HideNoneSubcommands". I think this would be really nice to have as well. For our use case,
None
is only intended as an invalid field that can be overridden (i.e., not used to invalidate an already valid object).Mutual exclusion I took the stance of using defaults, there are probably better ways to enforce this.
Lastly, it seems with the current implementation most of this will need to be constrained to the field list generation. There may be better ways to accomplish this. I had issues with types getting interpreted differently if I tried to resolve it at a higher level (i.e., mainly
field_list_from_callable
).