How to use the pypyr.version.get_version function in pypyr

To help you get started, we’ve selected a few pypyr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pypyr / pypyr-cli / pypyr / cli.py View on Github external
default=25,
                        help=wrap(
                            'Integer log level. Defaults to 25 (NOTIFY).\n'
                            '10=DEBUG \n'
                            '20=INFO\n'
                            '25=NOTIFY\n'
                            '30=WARNING\n'
                            '40=ERROR\n'
                            '50=CRITICAL\n'
                            'Log Level < 10 gives full traceback on errors.'))
    parser.add_argument('--logpath', dest='log_path',
                        help=wrap(
                            'Log-file path. Append log output to this path.'))
    parser.add_argument('--version', action='version',
                        help='Echo version number.',
                        version=f'{pypyr.version.get_version()}')
    return parser
github pypyr / pypyr-cli / pypyr / steps / pypyrversion.py View on Github external
def run_step(context):
    """Outputs pypyr version in format 'pypyr x.y.z python a.b.c'"""
    logger.debug("started")

    logger.notify("pypyr version is: %s", pypyr.version.get_version())

    logger.debug("done")