Change downloadable file names (#708)

* Change downloadable file names

* Remove constants because we're dynamically creating these
* Update to "communities" for the descriptor word based on team convo
* Add timestamp in 2020-09-20-0930 format because I personally think
this is the best ^.^

* Add a CLI command to run ETL Score Post so that we don't have to
  run the score generation just to get new downloadable files.
* Also make sure the old downloadable files are cleaned up on the
  run of this command.

* Remove unused library, thanks pylint!

Co-authored-by: Shelby Switzer <shelby.switzer@cms.hhs.gov>
This commit is contained in:
Shelby Switzer 2021-10-01 15:04:37 -04:00 committed by GitHub
commit d8c73e6a02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 4 deletions

View file

@ -3,7 +3,7 @@ import sys
import click
from data_pipeline.config import settings
from data_pipeline.etl.runner import etl_runner, score_generate, score_geo
from data_pipeline.etl.runner import etl_runner, score_generate, score_geo, score_post
from data_pipeline.etl.sources.census.etl_utils import (
reset_data_directories as census_reset,
)
@ -12,6 +12,7 @@ from data_pipeline.utils import (
data_folder_cleanup,
get_module_logger,
score_folder_cleanup,
downloadable_cleanup,
temp_folder_cleanup,
check_first_run,
)
@ -136,6 +137,17 @@ def generate_map_tiles():
sys.exit()
@cli.command(
help="Run etl_score_post to create score csv, tile csv, and downloadable zip",
)
def generate_score_post():
"""CLI command to generate score, tile, and downloadable files"""
downloadable_cleanup()
score_post()
sys.exit()
@cli.command(
help="Data Full Run (Census download, ETLs, score, combine and tile generation)",
)