snakedeploy package

Submodules

snakedeploy.client module

snakedeploy.client.get_parser()[source]
snakedeploy.client.main()[source]

main entrypoint for snakedeploy

snakedeploy.providers module

class snakedeploy.providers.Github(source_url)[source]

Bases: Provider

checkout(path: str, ref: str)[source]
clone(path: str)[source]

Clone the known source URL to a temporary directory

get_raw_file(path: str, tag: str)[source]
get_source_file_declaration(path: str, tag: str, branch: str)[source]
classmethod matches(source_url: str)[source]
property name
class snakedeploy.providers.Gitlab(source_url)[source]

Bases: Github

get_raw_file(path: str, tag: str)[source]
class snakedeploy.providers.Local(source_url)[source]

Bases: Provider

checkout(path: str, ref: str)[source]
clone(tmpdir: str)[source]

A local “clone” means moving files.

get_raw_file(path: str, tag: str)[source]
get_source_file_declaration(path: str, tag: str, branch: str)[source]
classmethod matches(source_url: str)[source]
class snakedeploy.providers.Provider(source_url)[source]

Bases: ABC

abstract checkout(path: str, ref: str)[source]
abstract clone(path: str)[source]
abstract get_raw_file(path: str, tag: str)[source]
get_repo_name()[source]
abstract classmethod matches(source_url: str)[source]
snakedeploy.providers.get_provider(source_url)[source]

snakedeploy.logging module

class snakedeploy.logger.ColorizingStreamHandler(nocolor=False, stream=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>)[source]

Bases: StreamHandler

BLACK = 0
BLUE = 4
BOLD_SEQ = '\x1b[1m'
COLOR_SEQ = '\x1b[%dm'
CYAN = 6
GREEN = 2
MAGENTA = 5
RED = 1
RESET_SEQ = '\x1b[0m'
WHITE = 7
YELLOW = 3
can_color_tty()[source]
colors = {'CRITICAL': 1, 'DEBUG': 4, 'ERROR': 1, 'INFO': 2, 'WARNING': 3}
decorate(record)[source]
emit(record)[source]

Emit a record.

If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an ‘encoding’ attribute, it is used to determine how to do the output to the stream.

property is_tty
class snakedeploy.logger.Logger[source]

Bases: object

cleanup()[source]
debug(msg)[source]
error(msg)[source]
exit(msg, return_code=1)[source]
handler(msg)[source]
info(msg)[source]
location(msg)[source]
progress(done=None, total=None)[source]
set_level(level)[source]
set_stream_handler(stream_handler)[source]
shellcmd(msg)[source]
text_handler(msg)[source]

The default snakemake log handler. Prints the output to the console. Args:

msg (dict): the log message dictionary

warning(msg)[source]
snakedeploy.logger.setup_logger(quiet=False, nocolor=False, stdout=False, debug=False)[source]