aeat.domain.categories._registry module¶
Read-only spending-category profile registry.
load_category_profile_registry() reads committed TOML profile files into
immutable mappings from SpendingCategory to CategoryProfile;
resolve_category_profiles() selects the exact year registry used by
classification and filing review surfaces.
- load_category_profile_file(path)[source]¶
Load one year-keyed spending-category profile TOML file.
- Return type:
- Returns:
Mapping from
SpendingCategorytoCategoryProfilefor the file’s year.- Parameters:
path (Path)
- load_category_profile_registry(root=None)[source]¶
Load every committed year-keyed spending-category profile registry.
Resolves the bundled categories root on every call when no override is supplied; the
bundled_pathboundary is the single resolution surface.- Return type:
- Returns:
Mapping from year to a per-year mapping from
SpendingCategorytoCategoryProfile.- Parameters:
root (Path | None)
- resolve_category_profiles(year)[source]¶
Return the exact category profile registry for
year.- Return type:
- Returns:
Mapping from
SpendingCategorytoCategoryProfileforyear.- Parameters:
year (int)