diff --git a/changes/367.feature.rst b/changes/367.feature.rst new file mode 100644 index 00000000..6074ccb3 --- /dev/null +++ b/changes/367.feature.rst @@ -0,0 +1 @@ +Modify warning filters to re-show identical ValidationWarnings on re-validation. diff --git a/src/stdatamodels/validate.py b/src/stdatamodels/validate.py index 4131ffea..a2113f0a 100644 --- a/src/stdatamodels/validate.py +++ b/src/stdatamodels/validate.py @@ -18,6 +18,11 @@ class ValidationWarning(Warning): pass +# always show validation warnings unless another filter was added that +# matches these warnings (by passing append=True) +warnings.filterwarnings("always", category=ValidationWarning, append=True) + + def value_change(path, value, schema, ctx): """ Validate a change in value against a schema.