-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove old cli * Update theme * Remove shim * display_version: True
- Loading branch information
Showing
16 changed files
with
49 additions
and
617 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +0,0 @@ | ||
import argparse | ||
import logging | ||
import sys | ||
|
||
from pydantic.error_wrappers import ValidationError | ||
|
||
from nebari.cli.cost import create_cost_subcommand | ||
from nebari.cli.deploy import create_deploy_subcommand | ||
from nebari.cli.destroy import create_destroy_subcommand | ||
from nebari.cli.initialize import create_init_subcommand | ||
from nebari.cli.keycloak import create_keycloak_subcommand | ||
from nebari.cli.render import create_render_subcommand | ||
from nebari.cli.support import create_support_subcommand | ||
from nebari.cli.upgrade import create_upgrade_subcommand | ||
from nebari.cli.validate import create_validate_subcommand | ||
from nebari.provider.terraform import TerraformException | ||
from nebari.version import __version__ | ||
|
||
|
||
def cli(args): | ||
parser = argparse.ArgumentParser(description="Nebari command line") | ||
parser.add_argument( | ||
"-v", | ||
"--version", | ||
action="version", | ||
version=__version__, | ||
help="Nebari version number", | ||
) | ||
parser.set_defaults(func=None) | ||
|
||
subparser = parser.add_subparsers(help=f"Nebari - {__version__}") | ||
create_deploy_subcommand(subparser) | ||
create_render_subcommand(subparser) | ||
create_init_subcommand(subparser) | ||
create_validate_subcommand(subparser) | ||
create_destroy_subcommand(subparser) | ||
create_support_subcommand(subparser) | ||
create_upgrade_subcommand(subparser) | ||
create_keycloak_subcommand(subparser) | ||
create_cost_subcommand(subparser) | ||
|
||
args = parser.parse_args(args) | ||
|
||
if args.func is None: | ||
parser.print_help(sys.stderr) | ||
sys.exit(1) | ||
|
||
logging.basicConfig(level=logging.INFO) | ||
|
||
try: | ||
args.func(args) | ||
except ValidationError as valerr: | ||
sys.exit( | ||
"Error: The schema validation of the nebari-config.yaml failed." | ||
" The following error message may be helpful in determining what went wrong:\n\n" | ||
+ str(valerr) | ||
) | ||
except ValueError as ve: | ||
sys.exit("\nProblem encountered: " + str(ve) + "\n") | ||
except TerraformException: | ||
sys.exit("\nProblem encountered: Terraform error\n") | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.