Skip to content

Commit

Permalink
exposing type checking (#1022)
Browse files Browse the repository at this point in the history
* exposing types under dsl.types
  • Loading branch information
gaoning777 authored Mar 26, 2019
1 parent 1b1c2f6 commit 1c4f9eb
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion sdk/python/kfp/components/_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from ._structures import ComponentSpec
from ._structures import *
from kfp.dsl import PipelineParam
from kfp.dsl._types import InconsistentTypeException, check_types
from kfp.dsl.types import InconsistentTypeException, check_types
import kfp

_default_component_name = 'Component'
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/kfp/dsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
from ._pipeline import Pipeline, pipeline, get_pipeline_conf
from ._container_op import ContainerOp
from ._ops_group import OpsGroup, ExitHandler, Condition
from ._component import python_component
from ._component import python_component, component
#TODO: expose the component decorator when ready
2 changes: 1 addition & 1 deletion sdk/python/kfp/dsl/_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from ._metadata import ComponentMeta, ParameterMeta, TypeMeta, _annotation_to_typemeta
from ._pipeline_param import PipelineParam
from ._types import check_types, InconsistentTypeException
from .types import check_types, InconsistentTypeException
import kfp

def python_component(name, description=None, base_image=None, target_component_file: str = None):
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/kfp/dsl/_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from typing import Dict, List
from abc import ABCMeta, abstractmethod
from ._types import BaseType, _check_valid_type_dict, _instance_to_dict
from .types import BaseType, _check_valid_type_dict, _instance_to_dict

class BaseMeta(object):
__metaclass__ = ABCMeta
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion sdk/python/tests/compiler/compiler_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from kfp.dsl._component import component
from kfp.dsl import ContainerOp, pipeline
from kfp.dsl._types import Integer, InconsistentTypeException
from kfp.dsl.types import Integer, InconsistentTypeException

class TestCompiler(unittest.TestCase):

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tests/components/test_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import kfp
import kfp.components as comp
from kfp.components._yaml_utils import load_yaml
from kfp.dsl._types import InconsistentTypeException
from kfp.dsl.types import InconsistentTypeException

class LoadComponentTestCase(unittest.TestCase):
def _test_load_component_from_file(self, component_path: str):
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/tests/dsl/component_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# limitations under the License.

import kfp
from kfp.dsl._component import component
from kfp.dsl import component
from kfp.dsl._metadata import ComponentMeta, ParameterMeta, TypeMeta
from kfp.dsl._types import GCSPath, Integer, InconsistentTypeException
from kfp.dsl.types import Integer, GCSPath, InconsistentTypeException
from kfp.dsl import ContainerOp, Pipeline
import unittest

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tests/dsl/pipeline_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import kfp
from kfp.dsl import Pipeline, PipelineParam, ContainerOp, pipeline
from kfp.dsl._metadata import PipelineMeta, ParameterMeta, TypeMeta
from kfp.dsl._types import GCSPath, Integer
from kfp.dsl.types import GCSPath, Integer
import unittest


Expand Down
3 changes: 1 addition & 2 deletions sdk/python/tests/dsl/type_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from kfp.dsl._types import _instance_to_dict, check_types, GCSPath
from kfp.dsl.types import _instance_to_dict, check_types, GCSPath
import unittest

class TestTypes(unittest.TestCase):
Expand Down

0 comments on commit 1c4f9eb

Please sign in to comment.