53022d273f6a6acd1bef8667b504a20dfc0523c8,pudl/datastore.py,,organize,#Any#Any#Any#Any#Any#Any#,230
Before Change
if not os.path.exists(destdir):
os.makedirs(destdir)
os.rename(newfile, destfile)
After Change
tmpdir = os.path.join(datadir, "tmp" )
newfiles = [os.path.join(tmpdir, os.path.basename(f))
for f in paths_for_year (source, year) ]
destfiles = paths_for_year(source, year, file=True, datadir=datadir)
destdir = path(source, year, file=False, datadir=datadir)
if not no_download:
if os.path.exists(destdir):
shutil.rmtree(destdir)
if not os.path.exists(destdir):
os.makedirs(destdir)
for newfile, destfile in zip (newfiles, destfiles) :
assert os.path.basename (newfile) == os.path.basename(destfile)
shutil.move(newfile, destfile)
if (unzip and source != "epacems" ):
zip_ref = zipfile.ZipFile(destfile, "r" )
zip_ref.extractall(destdir)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: catalyst-cooperative/pudl
Commit Name: 53022d273f6a6acd1bef8667b504a20dfc0523c8
Time: 2018-05-31
Author: karldw@users.noreply.github.com
File Name: pudl/datastore.py
Class Name:
Method Name: organize
Project Name: has2k1/plotnine
Commit Name: 3c4c60ef5dce4695ebe29f2680058310daef77b9
Time: 2015-04-20
Author: has2k1@gmail.com
File Name: ggplot/layer.py
Class Name: layer
Method Name: compute_aesthetics
Project Name: catalyst-cooperative/pudl
Commit Name: 5c0fc16071aa5ed0c459702bddc73df7e6ae7a49
Time: 2018-06-15
Author: karldw@users.noreply.github.com
File Name: pudl/datastore.py
Class Name:
Method Name: organize