Validate v7r2 pre39#5032
Conversation
[v7r1] Add FTSOnly and ExcludeSE options to dirac-dms-protocol-matrix
|
The warning in the docs is: |
| from DIRAC.Core.Base import Script | ||
| from DIRAC.Core.Utilities.DIRACScript import DIRACScript | ||
|
|
||
| Script.registerSwitch('', 'FromSE=', 'SE1[,SE2,...]') |
There was a problem hiding this comment.
This will need to be inside main
There was a problem hiding this comment.
Yes. Script.setUsageMessage(... should also go inside main ?
There was a problem hiding this comment.
Or it can be simply scrapped ?
There was a problem hiding this comment.
Everything with Script.xxxx must go inside main. Actually I think the Script stuff is broken again as from DIRAC.Core.Base import Script is setting it globally...
There was a problem hiding this comment.
I see other scripts where import Script is outside main()
There was a problem hiding this comment.
The doc build is successful. Should the script be still fixed to bring everything inside main ?
There was a problem hiding this comment.
The docs are still wrong when you call --help (see below). The issue is from #4958:
DIRAC/src/DIRAC/Core/Base/Script.py
Lines 22 to 23 in 00f9c4f
Examples:
$ dirac-info --help
Core implementation of import.
This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing version of this module.
Usage:
dirac-info [options] ...
General options:
-o --option <value> : Option=value to add
-s --section <value> : Set base section for relative parsed options
-c --cert <value> : Use server certificate to connect to Core Services
-d --debug : Set debug mode (-ddd is extra debug)
- --cfg= : Load additional config file
- --autoreload : Automatically restart if there's any change in the module
- --license : Show DIRAC's LICENSE
-h --help : Shows this help
Options:
-v --version : print version of current DIRAC installation
-p --platform : print platform of current DIRAC installation
$ dirac-proxy-info --help
Core implementation of import.
This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing version of this module.
Usage:
dirac-proxy-info [options] ...
General options:
-o --option <value> : Option=value to add
-s --section <value> : Set base section for relative parsed options
-c --cert <value> : Use server certificate to connect to Core Services
-d --debug : Set debug mode (-ddd is extra debug)
- --cfg= : Load additional config file
- --autoreload : Automatically restart if there's any change in the module
- --license : Show DIRAC's LICENSE
-h --help : Shows this help
Options:
-f --file <value> : File to use as user key
-i --version : Print version
-n --novoms : Disable VOMS
-v --checkvalid : Return error if the proxy is invalid
-x --nocs : Disable CS
-e --steps : Show steps info
-j --noclockcheck : Disable checking if time is ok
-m --uploadedinfo : Show uploaded proxies info
There was a problem hiding this comment.
If you look in the readthedocs all scripts have the same description: https://dirac--5032.org.readthedocs.build/en/5032/UserGuide/CommandReference/WorkloadManagement/index.html
There was a problem hiding this comment.
It looks like the __doc__ strings are not added to the command descriptions if there is no setUsageMessage() call
| Script.setUsageMessage('\n'.join([__doc__, | ||
| 'Usage:', | ||
| ' %s [option|cfgfile] % Script.scriptName'])) |
There was a problem hiding this comment.
OK, I have scrapped it
No description provided.