Wiptools API reference

wip

Command line interface wip.

Usage:

wip [OPTIONS] COMMAND [ARGS]...

Options:

  -v, --verbosity  The verbosity of the program output.
  --version        Print the wiptools version number.
  --help           Show this message and exit.

add

Add components, such as submodules and CLIs, to the project.

Args: name: For submodules the name can contain a path to an already existion component relative to the package directory. CLI names must not contain a path, only a name.

Usage:

wip add [OPTIONS] NAME

Options:

  --py      Add a Python submodule to the project.
  --cli     Add a Python CLI (with a single command) to the project.
  --clisub  Add a Python CLI with subcommands to the project.
  --cpp     Add a C++ binary extension module to the project (building
            requires nanobind and CMake).
  --f90     Add a Modern Fortran binary extension module to the project
            (building requires numpy.f2py and CMake).
  --help    Show this message and exit.

build

Build binary extension modules.

Args: component: Path to the component to build, relative to package directory.

Usage:

wip build [OPTIONS] [COMPONENT]

Options:

  --cpp   Build all C++ binary extension modules.
  --f90   Build all Modern Fortran binary extension modules.
  --help  Show this message and exit.

bump

Bump2version wrapper.

Args: args: a quoted str containing the bump2version arguments.

Usage:

wip bump [OPTIONS] [ARGS]

Options:

  --help  Show this message and exit.

docs

Add documentation to the project.

Usage:

wip docs [OPTIONS]

Options:

  -f, --fmt [md|rst|]  Documentation format to be used (md=Markdown (default),
                       rst=restructuredText).
  --help               Show this message and exit.

env

Check the environment for needed components.

Usage:

wip env [OPTIONS]

Options:

  --help  Show this message and exit.

info

List info about the project's structure.

Usage:

wip info [OPTIONS]

Options:

  -p, --pkg  Lists the package tree, with information about submodules and
             CLIs.
  -d, --dev  Lists the developer info.
  -e, --env  Run environment check.
  --help     Show this message and exit.

init

Initialize a new project skeleton.

Args: project_name: name of the project folder to create.

Usage:

wip init [OPTIONS] PROJECT_NAME

Options:

  --python-version TEXT   The minimal Python version for the project.
  -d, --description TEXT  A short (1 line) description of the project.
  --remote TEXT           Create a remote GitHub repo with visibility 'public'
                          (default) or 'private'. If 'none' is specified no
                          remote is created. This option is case-
                          insensitive.The creation of a remote GitHub repo
                          requires a GitHub username and a personal access
                          token with `repo` and `read:org` permissions.
  -f, --fmt [md|rst|]     Documentation format to be used (md=Markdown,
                          rst=restructuredText).
  --config PATH           The location (path) of the config.file with
                          developer information (name, e-mail address, GitHub
                          username). If the file does not exist, it is created
                          and the user is prompted to supply the fields. If
                          the file exists, but has missing information, the
                          user is prompted to supply the missing fields, but
                          the file is NOT updated.
  --help                  Show this message and exit.

init-remote

Add a remote GitHub repo.

Usage:

wip init-remote [OPTIONS]

Options:

  --private  Add a private remote GitHub repo, otherwise a public one.
  --help     Show this message and exit.

Python package wiptools

Common tools between the CLIs