Files
cellxgene/server/cli/cli.py
Matt Weiden 53a6d01fa3 Notify users of new versions of cellxgene (#1078)
* Notify users of new versions of cellxgene

Fixes https://github.com/chanzuckerberg/cellxgene/issues/683

* Do not use PyGithub client

* Protect against AttributeError

* Document that all version tags must follow SemVer

* Release tags `should -> MUST` follow semantic versioning
2019-12-31 17:43:11 -08:00

32 lines
839 B
Python

import click
from .. import __version__
from .launch import launch
from .prepare import prepare
from .upgrade import log_upgrade_check
@click.group(
name="cellxgene",
subcommand_metavar="COMMAND <args>",
options_metavar="<options>",
context_settings=dict(max_content_width=85, help_option_names=["-h", "--help"]),
)
@click.help_option("--help", "-h", help="Show this message and exit.")
@click.version_option(
version=__version__,
prog_name="cellxgene",
message="[%(prog)s] Version %(version)s",
help="Show the software version and exit.",
)
@click.option(
"--upgrade-check/--no-upgrade-check", default=True, show_default=True, help="Check for release upgrades on start.",
)
def cli(upgrade_check):
if upgrade_check:
log_upgrade_check()
cli.add_command(launch)
cli.add_command(prepare)