From 74a6b0a345f1ec24c71103e36ff3f85f31741c92 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Wed, 8 Nov 2023 08:48:40 +0100 Subject: [PATCH] Remove CLI in favour of plugin (#50) --- setup.cfg | 1 - src/zarpaint/_main.py | 39 --------------------------------------- 2 files changed, 40 deletions(-) delete mode 100644 src/zarpaint/_main.py diff --git a/setup.cfg b/setup.cfg index ac3c224..6d644f7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -43,7 +43,6 @@ python_requires = >=3.7 where = src [options.entry_points] -console_scripts = zarpaint = zarpaint._main:main napari.manifest = zarpaint = zarpaint:napari.yaml diff --git a/src/zarpaint/_main.py b/src/zarpaint/_main.py deleted file mode 100644 index 72bea8b..0000000 --- a/src/zarpaint/_main.py +++ /dev/null @@ -1,39 +0,0 @@ -import argparse -import ast -import sys - -from ._zarpaint import correct_labels - -parser = argparse.ArgumentParser( - 'zarpaint', - description='Paint segmentations directly to ' - 'on-disk/remote zarr arrays', - ) -parser.add_argument('image', help='The input image file.') -parser.add_argument('labels', help='The labels file (read/write).') -parser.add_argument('--frame', type=int, help='Load only this frame.') -parser.add_argument( - '-s', - '--scale', - type=ast.literal_eval, - default=(4, 1, 1), - help='Scale factors.', - ) -parser.add_argument( - '-c', - '--channel', - type=int, - default=2, - help='Which channel to load.', - ) - - -def main(): - args = parser.parse_args(sys.argv[1:]) - correct_labels( - args.image, - args.labels, - time_index=args.frame, - scale=args.scale, - c=args.channel, - )