ProjectOperation Core and Mixin Behaviours

Source code for individual project operations and mixin behaviours.

class padocc.core.project.ProjectOperation(proj_code: str, workdir: str, groupID: str = None, first_time: bool = None, ft_kwargs: dict = None, logger: ~logging.Logger = None, bypass: ~padocc.core.utils.BypassSwitch = <padocc.core.utils.BypassSwitch object>, label: str = None, fh: str = None, logid: str = None, verbose: int = 0, forceful: bool = None, dryrun: bool = None, thorough: bool = None)

PADOCC Project Operation class, able to access project files and perform some simple functions. Single-project operations always inherit from this class (e.g. Scan, Compute, Validate)

file_exists(file: str)

Check if a named file exists (without extension)

help(fn=<built-in function print>)

Public user functions for the project operator.

info(fn=<built-in function print>)

Display some info about this particular project

move_to(new_directory: str) None

Move all associated files across to new directory.

run(mode: str = 'kerchunk', bypass: BypassSwitch | None = None, forceful: bool = None, thorough: bool = None, dryrun: bool = None, **kwargs) str

Main function for running any project operation. All subclasses act as plugins for this function, and require a _run method called from here. This means all error handling with status logs and log files can be dealt with here.

class padocc.core.mixins.DirectoryMixin(workdir: str, groupID: str = None, forceful: bool = None, dryrun: bool = None, thorough: bool = None, logger: Logger = None, bypass: BypassSwitch = None, label: str = None, fh: str = None, logid: str = None, verbose: int = 0)

Container class for Operations which require functionality to create directories (workdir, groupdir, cache etc.)