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:

After Change


        dps.append(datapackage.DataPackage(descriptor=path))

    logger.info("Merging datapackages.")
    with tempfile.TemporaryDirectory() as tmpdir:
        out_path = pathlib.Path(tmpdir)
        merge_datapkgs(dps, out_path, clobber=args.clobber)
        logger.info("Loading merged datapackage into an SQLite database.")
        datapkg_to_sqlite(pudl_settings["pudl_db"], out_path, clobber=args.clobber)
    logger.info("Success! You can connect to the PUDL DB at this URL:")
    logger.info(f"{pudl_settings["pudl_db"]}")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: pantsbuild/pants
Commit Name: f2a35263aacacf10e1b2d622cd39c7c66ea39acb
Time: 2019-11-25
Author: ericarellano@me.com
File Name: src/python/pants/fs/fs_test.py
Class Name: WorkspaceInConsoleRuleTest
Method Name: test


Project Name: pantsbuild/pants
Commit Name: f2a35263aacacf10e1b2d622cd39c7c66ea39acb
Time: 2019-11-25
Author: ericarellano@me.com
File Name: src/python/pants/fs/fs_test.py
Class Name: FileSystemTest
Method Name: test_workspace_materialize_directories_result