From d0d0e5fbcacbbe326ba8799c6c7a88ae199ec2c6 Mon Sep 17 00:00:00 2001 From: ejseqera Date: Thu, 2 Nov 2023 11:20:19 -0400 Subject: [PATCH] feat: add support for importing cli module --- seqerakit/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/seqerakit/cli.py b/seqerakit/cli.py index 7e6c58d..8b6c7ec 100644 --- a/seqerakit/cli.py +++ b/seqerakit/cli.py @@ -19,6 +19,7 @@ """ import argparse import logging +import sys from pathlib import Path from seqerakit import seqeraplatform, helper, overwrite @@ -122,7 +123,10 @@ def handle_block(self, block, args, destroy=False): logger.error(f"Unrecognized resource block in YAML: {block}") -def main(): +def main(args=None): + if args is None: + args = sys.argv[1:] + options = parse_args() logging.basicConfig(level=options.log_level)