ReproNim / reproman

ReproMan (AKA NICEMAN, AKA ReproNim TRD3)
https://reproman.readthedocs.io
Other
24 stars 14 forks source link

move <backend-parameters> #597

Open asmacdo opened 1 year ago

asmacdo commented 1 year ago

resource type strings not listed. reproman create docs should show available resource types (and backend parameters).

The command reproman backend-parameters is fine, but it doesn't pass the "Principle of Least Surprise" IMO.

Usage: reproman create [--version] [-h] [-l {critical,error,warning,info,debug,1,2,3,4,5,6,7,8,9}] [-t RESOURCE_TYPE] [-b PARAM] NAME

Create a computation environment

*Arguments*
  NAME                  Name of the resource to create. Constraints: value must be a string

*Options*
  --version             show the program's version and license information and exit
  -h, --help, --help-np
                        show this help message and exit. --help-np forcefully disables the use of a pager for displaying the help message
  -l {critical,error,warning,info,debug,1,2,3,4,5,6,7,8,9}, --log-level {critical,error,warning,info,debug,1,2,3,4,5,6,7,8,9}
                        level of verbosity. Integers provide even more debugging information
  -t RESOURCE_TYPE, --resource-type RESOURCE_TYPE
                        Resource type to create. Constraints: value must be a string
  -b PARAM, --backend-parameters PARAM
                        One or more backend parameters in the form KEY=VALUE. Use the command `reproman backend-parameters` to see the list of available backend parameters.

workaround:

reproman create fail -t FAIL 2023-01-29 18:39:01,854 [ERROR ] Failed to import resource: No module named 'reproman.resource.FAIL' [:_find_and_load_unlocked:1004]. Known backends: aws-condor, aws-ec2, docker-container, session, shell, singularity, ssh [base.py:get_resource_class:75] (ResourceError)

asmacdo commented 1 year ago

IMO backend-parameters should belong to the resource, and documented there rather than a top level command