siesta-project / aiida_siesta_plugin

Source code for the AiiDA-Siesta package (plugin and workflows). See wiki
Other
6 stars 11 forks source link

Command line PSF commands #12

Closed vdikan closed 6 years ago

vdikan commented 6 years ago

Replicated old plugin command-line commands with the new interface for aiida_core v.0.11:

verdi data psf -h
Usage: verdi data psf [OPTIONS] COMMAND [ARGS]...

  PSF pseudos command line interface for SIESTA plugin.

Options:
  -h, --help  Show this message and exit.

Commands:
  exportfamily  Export a pseudopotential family into a new...
  listfamilies  Print on screen the list of installed...
  uploadfamily  Upload a collection of *.psf files from...

Command line behavior is defined in commands/data_psf.py and uses a (great!) python click package as an interface for console.

Note how (almost) all command line arguments, options and validation is defined within click's decorators, leaving only query-like logic in bodies of the functions.