Skip to content

Commit

Permalink
SDK - Removed SourceSpec structure (#1119)
Browse files Browse the repository at this point in the history
It has never been used and ComponentSpec.metadata.annotations['source'] is a better place for such metadata.
  • Loading branch information
Ark-kun authored and k8s-ci-robot committed Apr 24, 2019
1 parent 4de2017 commit 6920ace
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions sdk/python/kfp/components/_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
'ContainerSpec',
'ContainerImplementation',

'SourceSpec',

'ComponentSpec',

'ComponentReference',
Expand Down Expand Up @@ -217,14 +215,6 @@ def __init__(self,
ImplementationType = Union[ContainerImplementation, 'GraphImplementation']


class SourceSpec(ModelBase):
'''Specifies the location of the component source code.'''
def __init__(self,
url: str = None
):
super().__init__(locals())


class MetadataSpec(ModelBase):
def __init__(self,
annotations: Optional[Dict[str, str]] = None,
Expand All @@ -234,13 +224,12 @@ def __init__(self,


class ComponentSpec(ModelBase):
'''Component specification. Describes the metadata (name, description, source), the interface (inputs and outputs) and the implementation of the component.'''
'''Component specification. Describes the metadata (name, description, annotations and labels), the interface (inputs and outputs) and the implementation of the component.'''
def __init__(
self,
implementation: ImplementationType,
name: Optional[str] = None, #? Move to metadata?
description: Optional[str] = None, #? Move to metadata?
source: Optional[SourceSpec] = None, #? Move to metadata?
metadata: Optional[MetadataSpec] = None,
inputs: Optional[List[InputSpec]] = None,
outputs: Optional[List[OutputSpec]] = None,
Expand Down

0 comments on commit 6920ace

Please sign in to comment.