pestifer.subcommands.modify_package module

Subcommand to modify the pestifer package. This subcommand is only exposed if the Pestifer installation includes the entire source tree (i.e., it was installed with pip -e from a git repository). The two main ways you can modify the package are

  1. Managing examples, including adding, updating, and deleting example scripts. Updating can include name-changes, adding new auxiliary inputs, and modifying expected outputs.

  2. Regenerating atomselect macros based on globals defined in core/labels.py.

class pestifer.subcommands.modify_package.ModifyPackageSubcommand(name: str = 'modify-package', aliases: list = <factory>, log_file: str = 'pestifer_diagnostics.log', short_help: str = 'modify the pestifer package', long_help: str = 'Modify the pestifer package by adding, updating, or deleting examples.', func_returns_type: type = <class 'bool'>, parser: argparse.ArgumentParser = None)[source]

Bases: Subcommand

add_subparser(subparsers)[source]

Adds the subcommand parser to the given subparsers. Subclasses declare arguments here, after a super().add_subparser() call.

static func(args: Namespace, **kwargs)[source]

Modify the pestifer source package. Current modifications allowed involve example addition/update/deletion, and updating atomselect macros based on globals defined in core/labels.py.

Note

The command pestifer modify-package can only be invoked if pestifer is installed as an editable source tree, i.e. the directory containing the pestifer package. A simple pip installation of the pestifer package will not allow this command to run, as the pestifer package will not have a full source tree available. If you want to modify the package, you must clone the repository from GitHub and then execute pip install -e . from the package root. Before modifying, it would also be a good idea to create a new branch, rather than modifying in the main branch.

long_help: str = 'Modify the pestifer package by adding, updating, or deleting examples.'

description

name: str = 'modify-package'

subcommand name

short_help: str = 'modify the pestifer package'

help string