Please provide a clear and concise description of what you want to add or change.
When an NDS user passes in an invalid argument (via settings.yaml or the command-line), NDS surfaces an error like:
pydantic.error_wrappers.ValidationError: 1 validation error for _Settings
log_level
value is not a valid enumeration member; permitted: 'DEBUG', 'INFO', 'ERROR', 'WARNING', 'CRITICAL' (type=type_error.enum; enum_values=[<LogLevel._DEBUG: 'DEBUG'>, <LogLevel._INFO: 'INFO'>, <LogLevel._ERROR: 'ERROR'>, <LogLevel._WARNING: 'WARNING'>, <LogLevel._CRITICAL: 'CRITICAL'>])
It indicates the field name and valid values, but not the passed-in invalid value. It would be helpful to also print the invalid value (or an abbreviated version of it).
Please describe how you would use this new feature.
This is particularly helpful for fixing command-line arguments, where it's not obvious how the run_*.py scripts parse the input arguments without looking at the source code.
Describe your proposed implementation
Describe how you think the feature or improvement should be implemented.
Use the input_value field of ValidationError, which is new in PyDantic V2.
Describe possible alternatives
If you've suggested an implementation above, list here any alternative implementations you can think of, and brief comments explaining why the chosen implementation is better.
Alternative = current behavior: don't print the value. NDS is meant to be user-friendly though, and printing the appropriate input would help users.
Prerequisite: https://github.com/agencyenterprise/neural-data-simulator/issues/48
Describe the new feature or enhancement
Please provide a clear and concise description of what you want to add or change. When an NDS user passes in an invalid argument (via
settings.yaml
or the command-line), NDS surfaces an error like:It indicates the field name and valid values, but not the passed-in invalid value. It would be helpful to also print the invalid value (or an abbreviated version of it).
Please describe how you would use this new feature. This is particularly helpful for fixing command-line arguments, where it's not obvious how the
run_*.py
scripts parse the input arguments without looking at the source code.Describe your proposed implementation
Describe how you think the feature or improvement should be implemented. Use the
input_value
field ofValidationError
, which is new in PyDantic V2.Describe possible alternatives
If you've suggested an implementation above, list here any alternative implementations you can think of, and brief comments explaining why the chosen implementation is better.