cursus.steps.scripts.package

ensure_directory(directory)[source]

Ensure a directory exists, creating it if necessary.

check_file_exists(path, description)[source]

Check if a file exists and log its details.

list_directory_contents(path, description)[source]

List and log the contents of a directory.

copy_file_robust(src, dst)[source]

Copy a file and log the operation, ensuring destination directory exists.

copy_scripts(src_dir, dst_dir)[source]

Recursively copy scripts from source to destination.

extract_tarfile(tar_path, extract_path)[source]

Extract a tar file to the specified path.

create_tarfile(output_tar_path, source_dir)[source]

Create a tar file from the contents of a directory.

main(input_paths, output_paths, environ_vars, job_args=None)[source]

Main entry point for the packaging script.

Parameters:
  • input_paths (Dict[str, str]) – Dictionary of input paths with logical names

  • output_paths (Dict[str, str]) – Dictionary of output paths with logical names

  • environ_vars (Dict[str, str]) – Dictionary of environment variables

  • job_args (Namespace | None) – Command line arguments (optional)

Returns:

Path to the packaged model.tar.gz output

Return type:

Path