Tools for setting up and managing PUDL workspaces.
- class pudl.workspace.setup.MissingPath#
Validates potential path that doesn’t exist.
- classmethod __get_validators__() Any #
Validates that path doesn’t exist and is path-like.
- class pudl.workspace.setup.PudlPaths#
These settings provide access to various PUDL directories.
It is primarily configured via PUDL_INPUT and PUDL_OUTPUT environment variables. Other paths of relevance are derived from these.
- pudl_input: PotentialDirectoryPath#
- pudl_output: PotentialDirectoryPath#
- sqlite_db(name: str) str #
Returns url of locally stored pudl slqlite database with given name.
The name is expected to be the name of the database without the .sqlite suffix. E.g. pudl, ferc1 and so on.
Set up a new PUDL working environment based on the user settings.
clobber (bool) – if True, replace existing files. If False (the default) do not replace existing files.
- pudl.workspace.setup.deploy(pkg_path: str, deploy_dir: pathlib.Path, ignore_files: list[str], clobber: bool = False) None #
Deploy all files from a package_data directory into a workspace.
pkg_path – Dotted module path to the subpackage inside of package_data containing the resources to be deployed.
deploy_dir – Directory on the filesystem to which the files within pkg_path should be deployed.
ignore_files – List of filenames (strings) that may be present in the pkg_path subpackage, but that should be ignored.
clobber – if True, replace existing copies of the files that are being deployed from pkg_path to deploy_dir. If False, do not replace existing files.