Skip to content

shell: Dispatch standard into multiple modules

Valentin Valls requested to merge split-standard into master

This PR replace the module bliss.shell.standard by a package.

The aim is to

  • Manage the exposed function a bit more easily (this can be done from bliss/shell/standard/__init__.py)
    • There is no more __all__, everything imported will be exposed
  • Split the module which was far to big for maintainability
  • Try to group common functions together (to allow to share some stuffs)
  • Do not change anything to the client

This is only a reorganization of the source code, this must not change the way the module was used before.

Few comments:

  • The modules are prefixed by _ because it is not intended to import anything from them directly.

  • I have also exported static which was not previously exposed. This is because of the following comment, which was kind of weird in the context. It is maybe better to remove static from the list if you like.

############## imports for internal usage in this script

from bliss.config import static
  • Finally it was previously possible to import from bliss.shell.standard stuffs that was not part of the __all__. This is not the case anymore. This have to be taken case by case, but i think usually the client side have to be fixed.

For example

from bliss.shell.standard import subprocess

I have already fixed few stuffs like that in the BLISS base code.

FYI @cyril.guilloud

Edited by Valentin Valls

Merge request reports