1.1.2.3. pmpm.util module#

pmpm.util.append_env(dependencies: list[str], package: str) None[source]#

Append a package to conda environment definition.

pmpm.util.append_path(environ: dict[str, str], path: str) None[source]#

Append to PATH in environment dictionary in-place.

pmpm.util.check_dir(path: Path, msg: str) None[source]#

Check if a directory exists.

pmpm.util.check_file(path: Path, msg: str) None[source]#

Check if a file exists.

pmpm.util.prepend_path(environ: dict[str, str], path: str) None[source]#

Prepend to PATH in environment dictionary in-place.

pmpm.util.run(command: str | list[str], **kwargs) None[source]#

Run command while logging what is running.

Parameters:
  • command – can be in string or list of string that subprocess.run accepts.

  • kwargs – passes to subprocess.run

pmpm.util.split_conda_dep_from_pip(dep: list[str] | list[str | dict[str, list[str]]]) tuple[list[str], list[str]][source]#

Split conda and pip dependencies.