lebrice / SimpleParsing

Simple, Elegant, Typed Argument Parsing with argparse
MIT License
399 stars 49 forks source link

Fix ser/deserialization for enums and Path #137

Closed ivanprado closed 2 years ago

ivanprado commented 2 years ago

I have noticed that by default Enum and Path classes are not serialized/deserialized properly. This PR fixes the problem. It includes a few tests to check that it is working.

ivanprado commented 2 years ago

@lebrice thank you for the review!. I went through your comments and addressed them.

I've also noticed that is better to use the Enum name instead of value: the latter may not be unique and can be less representative (e.g. if automatic integers are used as value). This change was implemented in https://github.com/lebrice/SimpleParsing/pull/137/commits/6296025dff72d413545a0ee91eb6a251f57475d6