Skip to content

Add lb-dirac command

Chris Burr requested to merge add-lb-dirac-command into master

Hopefully the help text is self explanatory:

$ lb-dirac --help
usage: lb-dirac [-h] [--list] [version] [command] ...

Run a command in the LHCbDIRAC environment

positional arguments:
  version  optional, the version of LHCbDIRAC to use (default: prod)
  command  optional, the command to run (default: bash)
  ...      optional, any additional arguments

optional arguments:
  -h, --help            show this help message and exit
  --list                List available versions
  • It aims to look like lb-run with --list (and eventually --container?)
  • It looks for versions in /cvmfs/lhcb.cern.ch/lhcbdirac/ then /cvmfs/lhcb.cern.ch/lib/lhcb/LHCBDIRAC/ then /cvmfs/lhcbdev.cern.ch/lhcbdirac/.
  • It defaults to starting a bash shell without being affected by any rc files
  • Non-bash shells are explicitly forbidden
  • No environment variables are inherited by the child process except a few white listed ones
  • It ensures the certificate and VOMS files can be found by setting the environment variables (if not already set)

This PR also runs black on the code base. I'll add some tests shortly then unmark as WIP.

Edited by Chris Burr

Merge request reports