ncaa_eval.ingest.schema module¶
Pydantic v2 schema models for NCAA basketball data entities.
Defines the core data structures — Team, Game, and Season — that form the internal representation layer. All downstream code operates on these models regardless of the upstream data source (Kaggle, BartTorvik, ESPN, etc.) or the storage backend (Parquet, SQLite, …).
- class ncaa_eval.ingest.schema.Game(*, GameID: Annotated[str, MinLen(min_length=1)], Season: Annotated[int, Ge(ge=1985)], DayNum: Annotated[int, Ge(ge=0)], Date: date | None = None, WTeamID: Annotated[int, Ge(ge=1)], LTeamID: Annotated[int, Ge(ge=1)], WScore: Annotated[int, Ge(ge=0)], LScore: Annotated[int, Ge(ge=0)], Loc: Literal['H', 'A', 'N'], NumOT: Annotated[int, Ge(ge=0)] = 0, IsTournament: bool = False)[source]¶
Bases:
BaseModelA single NCAA basketball game result.
- date: datetime.date | None¶
- day_num: int¶
- game_id: str¶
- is_tournament: bool¶
- l_score: int¶
- l_team_id: int¶
- loc: Literal['H', 'A', 'N']¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- num_ot: int¶
- season: int¶
- w_score: int¶
- w_team_id: int¶
- class ncaa_eval.ingest.schema.Season(*, Year: Annotated[int, Ge(ge=1985)])[source]¶
Bases:
BaseModelA single NCAA basketball season (identified by calendar year).
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- year: int¶
- class ncaa_eval.ingest.schema.Team(*, TeamID: Annotated[int, Ge(ge=1)], TeamName: Annotated[str, MinLen(min_length=1)], CanonicalName: str = '')[source]¶
Bases:
BaseModelA college basketball team.
- canonical_name: str¶
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- team_id: int¶
- team_name: str¶