pisces.commands.main#
The main entrypoint to the Pisces CLI.
This module imports functions from elsewhere in Pisces, wraps them inside local functions to perform certain common tasks, and uses Click to provide a command-line interface. These interfaces functions are organized under a single nested interface, which is then exported to the command-line using setuptools entry_points.
DEVELOPERS: To add a subcommand to the main command, do the following: 1. Add a module file in pisces/commands/ for your implementation 2. Program your functionality into a single function in your modules, and import it here. The module should really just be an ordering of Pisces library functions/classes. The Pisces library functions/classes work with native Python objects. The commands submodules do the business of converting command-line arguments to a useful form for those library functions. 3. Write a wrapper function for your implementation function here, and decorate it with Click. The docstring for this wrapper function is the one that is exposed at the command-line.
@cli.command(‘command_name’) adds a new “pisces command_name” @cli.group(‘subcommand_name’) adds a new “pisces subcommand_name” subcommand