def generate_coasts(env: Env, from_stage: Optional[AnyStr] = None): """Runs coasts generation.""" stages = ( sd.StageDownloadAndConvertPlanet(), sd.StageUpdatePlanet(), sd.StageCoastline(use_old_if_fail=False), sd.StageCleanup(), ) run_generation(env, stages, from_stage)
def build_coastline(**kwargs): env = Env() kwargs["ti"].xcom_push(key="build_name", value=env.build_name) run_generation( env, ( sd.StageDownloadAndConvertPlanet(), sd.StageCoastline(use_old_if_fail=False), sd.StageCleanup(), ), ) env.finish()
def build_prolog(**kwargs): params = MapsGenerationDAG.get_params(**kwargs) env = Env(**params) kwargs["ti"].xcom_push(key="build_name", value=env.build_name) run_generation( env, ( sd.StageDownloadAndConvertPlanet(), sd.StageCoastline(), sd.StagePreprocess(), sd.StageFeatures(), sd.StageDownloadDescriptions(), ), )
def update_planet(**kwargs): env = Env() kwargs["ti"].xcom_push(key="build_name", value=env.build_name) if settings.DEBUG: env.add_skipped_stage(sd.StageUpdatePlanet) run_generation( env, ( sd.StageDownloadAndConvertPlanet(), sd.StageUpdatePlanet(), sd.StageCleanup(), ), ) env.finish()
def generate_maps(env: Env, from_stage: Optional[AnyStr] = None): """"Runs maps generation.""" stages = ( sd.StageDownloadAndConvertPlanet(), sd.StageUpdatePlanet(), sd.StageCoastline(), sd.StagePreprocess(), sd.StageFeatures(), sd.StageDownloadDescriptions(), sd.StageMwm(), sd.StageCountriesTxt(), sd.StageExternalResources(), sd.StageLocalAds(), sd.StageStatistics(), sd.StageCleanup(), ) run_generation(env, stages, from_stage)