Run all Census, ETL, Score, Combine and Tilefy in one command (#662)

* Run all Census, ETL, Score, Combine and Tilefy in one command

* docker cmd

* some docker improvements

* feedback updates

* lint
This commit is contained in:
Jorge Escobar 2021-09-14 14:15:34 -04:00 committed by GitHub
commit 5bd63c083b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 99 additions and 13 deletions

View file

@ -187,6 +187,7 @@ def score_folder_cleanup() -> None:
remove_all_from_dir(data_path / "score" / "csv")
remove_all_from_dir(data_path / "score" / "geojson")
remove_all_from_dir(data_path / "score" / "downloadable")
remove_all_from_dir(data_path / "score" / "tiles")
def temp_folder_cleanup() -> None:
@ -198,6 +199,19 @@ def temp_folder_cleanup() -> None:
remove_all_from_dir(data_path / "tmp")
def check_first_run() -> bool:
"""Checks if a local flag file has been set and returns False
if it hasn't"""
data_path = settings.APP_ROOT / "data"
file = "first_run.txt"
if not os.path.isfile(data_path / file):
return True
return False
def get_excel_column_name(index: int) -> str:
"""Map a numeric index to the appropriate column in Excel. E.g., column #95 is "CR".
Only works for the first 1000 columns.