diff --git a/amundsen_common/models/table.py b/amundsen_common/models/table.py index 55dba54..0bc60ca 100644 --- a/amundsen_common/models/table.py +++ b/amundsen_common/models/table.py @@ -99,6 +99,17 @@ class Meta: target = Source register_as_scheme = True +@attr.s(auto_attribs=True, kw_only=True) +class ResourceReport: + name: str + url: str + + +class ResourceReportSchema(AttrsSchema): + class Meta: + target = ResourceReport + register_as_scheme = True + # this is a temporary hack to satisfy mypy. Once https://github.com/python/mypy/issues/6136 is resolved, use # `attr.converters.default_if_none(default=False)` @@ -132,6 +143,7 @@ class Table: owners: List[User] = [] watermarks: List[Watermark] = [] table_writer: Optional[Application] = None + resource_reports: Optional[List[ResourceReport]] = None last_updated_timestamp: Optional[int] = None source: Optional[Source] = None is_view: Optional[bool] = attr.ib(default=None, converter=default_if_none) diff --git a/requirements.txt b/requirements.txt index 5a217ba..e480d4f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ Flask==1.1.1 marshmallow==2.15.3 marshmallow-annotations==2.4.0 mypy==0.720 -pytest +pytest>=4.6 pytest-cov pytest-mock mock