-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove linting comments * move global variable to local * simplify diagnose_me command * use f-strings * idiomatic python refactorings * remove unused import * add typestub library * silence unresolvable mypy error * update type information * remove unused variable * remove unused import * use __main__.py for cli entrypoint * expand imports
- Loading branch information
1 parent
265e9f5
commit b58a31b
Showing
21 changed files
with
160 additions
and
174 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Global options: | ||
|
||
[mypy] | ||
ignore_missing_imports = true |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2018-2022 The Kubeflow Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import logging | ||
import sys | ||
|
||
import click | ||
import typer | ||
from kfp.cli import cli | ||
from kfp.cli import components | ||
from kfp.cli import diagnose_me_cli | ||
from kfp.cli import experiment | ||
from kfp.cli import pipeline | ||
from kfp.cli import recurring_run | ||
from kfp.cli import run | ||
|
||
|
||
def main(): | ||
logging.basicConfig(format='%(message)s', level=logging.INFO) | ||
cli.cli.add_command(run.run) | ||
cli.cli.add_command(recurring_run.recurring_run) | ||
cli.cli.add_command(pipeline.pipeline) | ||
cli.cli.add_command(diagnose_me_cli.diagnose_me) | ||
cli.cli.add_command(experiment.experiment) | ||
cli.cli.add_command(typer.main.get_command(components.app)) | ||
try: | ||
cli.cli(obj={}, auto_envvar_prefix='KFP') | ||
except Exception as e: | ||
click.echo(str(e), err=True) | ||
sys.exit(1) |
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.