Project

General

Profile

Feature #24324

Merge jobsub client ArgumentParsers into a parent JobsubClientArgumentParser

Added by Shreyas Bhat 3 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
04/17/2020
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

Right now, in the jobsub client, we define an ArgumentParser for each jobsub_client command separately. A lot of these are reused:

$ grep add_argument * | grep -v add_argument_group | cut -f 2 -d "'" | sort | uniq -c | sort --reverse         
  18 -G
  18 --jobsub-server
  18 --debug
  16 -h
  16 --version
  14 --role
  13 --user
  11 --jobid
   8 --constraint
   4 --dag
   3 --use-cvmfs-dropbox
   3 --jobid-output-only
   3 --dropbox-server
   2 -J
   2 --timeout
   2 --tarball-exclusion-file
   2 --summary
   2 --run
   2 --qdate-le
   2 --qdate-ge
   2 --partial
   2 --long
   2 --list-sandboxes
   2 --json-config
   2 --idle
   2 --hold
   2 --forcex
   2 --dest-dir
   2 --better-analyze
   2 --archive-format
   1 --sites
   1 --prio
   1 --post-data
   1 --foo
   1 --endpoint
   1 --action

Combine the top 5 into a master JobsubClientArgumentParser, defined in jobsubClient.py, and which can be inherited by all the commands so that it can be added to. Perhaps make a second JobsubClientArgumentParserWithUserRole that encompasses the top 7 items here.

Also, do same analysis for server and add options as necessary.



Also available in: Atom PDF