a64224316790548d4ff6ba4b98601eaed7ecff4c,src/pudl/convert/datapkg_to_sqlite.py,,main,#,135
Before Change
dps.append(datapackage.DataPackage(descriptor=path))
// Check whether the output destination exists if we"re not clobbering
out_path = pathlib.Path(args.out_path)
// If it exists we either fail (because we"re not clobbering) or we remove
// the whole directory (if we are clobbering)
if out_path.exists():
if args.clobber is False:
raise FileExistsError(
f"Output directory {out_path} exists and clobber is False.")
shutil.rmtree(out_path)
merge_datapkgs(dps, out_path, clobber=args.clobber)
if args.load_sqlite is True:
logger.info("Loading merged datapackage into an SQLite database.")
After Change
logger.info(f"pudl_out={pudl_settings["pudl_out"]}")
// Check if there"s already a PUDL SQLite DB that we should not clobber:
if not args.clobber and pathlib.Path(pudl_settings["pudl_db"]).exists() :
raise FileExistsError(
f"SQLite DB at {pudl_settings["pudl_db"]} exists and clobber is False.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: catalyst-cooperative/pudl
Commit Name: a64224316790548d4ff6ba4b98601eaed7ecff4c
Time: 2020-08-06
Author: zane.selvans@catalyst.coop
File Name: src/pudl/convert/datapkg_to_sqlite.py
Class Name:
Method Name: main
Project Name: ultralytics/yolov3
Commit Name: 0bc1db58d82c2482bfac1e32a3a43cfd5a533da2
Time: 2021-01-10
Author: glenn.jocher@ultralytics.com
File Name: utils/google_utils.py
Class Name:
Method Name: attempt_download
Project Name: deepmipt/DeepPavlov
Commit Name: 00de689e6624b4b3c312c921226ad23f49a79229
Time: 2018-01-19
Author: ol.gure@gmail.com
File Name: deeppavlov/core/models/keras_model.py
Class Name: KerasModel
Method Name: load