cicdgood first issuehelp wanted
Repository metrics
- Stars
- (282 stars)
- PR merge metrics
- (PR metrics pending)
Description
Most tests currently use handpicked input values and assert specific outputs. Hypothesis generates inputs automatically and finds edge cases you wouldn't think to write. E.g. https://github.com/ecmwf/anemoi already uses it for testing attention and MLP layers.
Candidates
- Standardization: output should always have mean ~0 and std ~1 regardless of input shape or value range
- Clamping: model output should always stay within declared bounds for any input tensor.
test_clamping.pyalready tests specific cases, hypothesis would test the invariant more thoroughly - Dataset slicing:
test_time_slicing.pyhardcodes specific input/output pairs - these could be expressed as properties that hold for any valid combination ofar_steps,num_past_forcing_steps,num_future_forcing_steps - Datastore interface contracts:
get_dataarrayoutput shape should always matchnum_grid_pointsfor any valid split and category
Setup
hypothesis would be a dev dependency only and integrates directly with pytest via @given decorators, so no CI changes are needed.