Module: src/init_migration/generate_pipeline.py
Method:
def should_create_jurisdiction(self, division: Division) -> JurisdictionLevel:
"""Determine what type of Jurisdiction should be created for this Division"""
TODO: Define jurisdiction creation rules based on Division classification/type.
Currently: Create jurisdiction for all cases (placeholder logic).
Args:
division: The Division object to evaluate
Returns:
True if Jurisdiction should be created, False otherwise
"""
# Placeholder: Create jurisdiction for all Divisions
return True
Output: JurisdictionLevel
JurisdictionLevel(BaseModel):
ocdid_level: Literal["county", "place", "governing board"] -- check that this is correct that we only have places and county subs.
The method will:
- Examine the LSAD code against an Enum of LSAD codes. The Enum needs to be created. See ticket:
This logic would perform the following logical checks:
- If cousub, and not special district (based on LSAD designation) then set to True and ocdid_level = county
- If cousub, and special district (i.e. marin city) based on LSAD designation, then set to True and ocdid_level = governing board
- If place, then set to True and ocdid_level = place
Module: src/init_migration/generate_pipeline.py
Method:
def should_create_jurisdiction(self, division: Division) -> JurisdictionLevel:
"""Determine what type of Jurisdiction should be created for this Division"""
Output: JurisdictionLevel
JurisdictionLevel(BaseModel):
ocdid_level: Literal["county", "place", "governing board"] -- check that this is correct that we only have places and county subs.
The method will:
This logic would perform the following logical checks: