Virtue Package Registration#

Virtue uses Pluggy to register Virtue packages and include their SKILL packages in the Virtue SKILL environment. A package can register itself as a Virtue SKILL plugin by registering a dictionary by implementing a hook.

Softworks Example#

Softworks is registered as a Virtue SKILL package with the following steps

  1. Include all your SKILL code under your top-level Python module.

  2. Add a Virtue entry-point in your “pyproject.toml” (recommended) or “setup.py” files which points to the module containing the hook implementation.

    pyproject.toml#
    1[project.entry-points.virtue]
    2softworks = "softworks.virtue_softworks"
    
  3. Add a Virtue hook implementation to register the Virtue SKILL package. The hook must be defined in the module selected in the entry-point.

Reference#

Virtue defines a subset of these for itself: