def render_set_maps(s3, db, the_set):
    dirname = mkdtemp(prefix='set-maps-')

    try:
        s3_prefix = join('/sets', str(the_set.id))
        runs = new_read_completed_set_runs(db, the_set.id)
        good_sources = _prepare_render_sources(runs, dirname)
        s3_urls = _render_and_upload_maps(s3, good_sources, s3_prefix, dirname)
        update_set_renders(db, the_set.id, *s3_urls)
    finally:
        rmtree(dirname)
Render set maps, upload them to S3 and add to the database.
dataset/ETHPy150Open openaddresses/machine/openaddr/ci/__init__.py/render_set_maps