Skip to main content
tests/test_ml_features.py · chapter Tests and team tooling, file 10 · 55 lines · open in the repository

What it does

Tests for ml.features: the calendar and retailer features of the big-move model (decision 0007).

What it checks

  • feature names are unique and the label is not a feature (line 9)
  • the time split runs forward without overlap (line 15)
  • every event day is zero days from an event (line 19)
  • days count down to the next event and up since the last (line 25)
  • values are capped (line 36)
  • the calendar has one row per day (line 44)
  • is online follows config retailers (line 51)

Connections

Uses: src/common/contracts.py, src/common/study.py, src/ml/features.py

Source

tests/test_ml_features.py