You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often I want to reuse the same schema/model for multiple different purposes.
When loading data from an outside source, I want to run parsers, including the built-in type coercion, and set strict=False to avoid crashing at runtime due to the presence of extra columns that I don't care about. But when running my unit tests, I want strict=True to assert that extra columns are not present, but I do not want to run any parsers or coercion.
In the current setup, I need to create separate schemas/models with different configs for different purposes, and that's very verbose.
Often I want to reuse the same schema/model for multiple different purposes.
When loading data from an outside source, I want to run parsers, including the built-in type coercion, and set
strict=False
to avoid crashing at runtime due to the presence of extra columns that I don't care about. But when running my unit tests, I wantstrict=True
to assert that extra columns are not present, but I do not want to run any parsers or coercion.In the current setup, I need to create separate schemas/models with different configs for different purposes, and that's very verbose.
Currently I have to write this:
But I want to be able to write this:
The examples above use the class-based "model" syntax, but this request applies equally to the functional "schema" syntax as well.
The text was updated successfully, but these errors were encountered: