Skip to content

Commit 15efdf1

Browse files
committed
Added integration tests
1 parent 21c796e commit 15efdf1

File tree

6 files changed

+1270
-8
lines changed

6 files changed

+1270
-8
lines changed

src/amp/admin/datasets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
including registration, deployment, versioning, and manifest operations.
55
"""
66

7-
from typing import TYPE_CHECKING, Dict, Optional
7+
from typing import TYPE_CHECKING, Dict, List, Optional, Union
88

99
from amp.utils.manifest_inspector import describe_manifest, print_schema
1010

@@ -200,7 +200,7 @@ def get_manifest(self, namespace: str, name: str, revision: str) -> dict:
200200
response = self._admin._request('GET', path)
201201
return response.json()
202202

203-
def describe(self, namespace: str, name: str, revision: str = 'latest') -> Dict[str, list[Dict[str, str | bool]]]:
203+
def describe(self, namespace: str, name: str, revision: str = 'latest') -> Dict[str, List[Dict[str, Union[str, bool]]]]:
204204
"""Get a structured summary of tables and columns in a dataset.
205205
206206
Returns a dictionary mapping table names to lists of column information,

src/amp/registry/datasets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
import logging
6-
from typing import TYPE_CHECKING, Any, Dict, Optional
6+
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
77

88
from amp.utils.manifest_inspector import describe_manifest, print_schema
99

@@ -199,7 +199,7 @@ def get_manifest(self, namespace: str, name: str, version: str) -> dict:
199199
response = self._registry._request('GET', path)
200200
return response.json()
201201

202-
def describe(self, namespace: str, name: str, version: str = 'latest') -> Dict[str, list[Dict[str, str | bool]]]:
202+
def describe(self, namespace: str, name: str, version: str = 'latest') -> Dict[str, List[Dict[str, Union[str, bool]]]]:
203203
"""Get a structured summary of tables and columns in a dataset.
204204
205205
Returns a dictionary mapping table names to lists of column information,

src/amp/streaming/state.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from abc import ABC, abstractmethod
1010
from dataclasses import dataclass, field
1111
from datetime import UTC, datetime
12-
from typing import Dict, List, Optional, Set, Tuple
12+
from typing import Dict, List, Optional, Set, Tuple, Union
1313

1414
from amp.streaming.types import BlockRange, ResumeWatermark
1515

@@ -235,7 +235,7 @@ def __init__(self):
235235

236236
def _get_key(
237237
self, connection_name: str, table_name: str, network: Optional[str] = None
238-
) -> Tuple[str, str, str] | List[Tuple[str, str, str]]:
238+
) -> Union[Tuple[str, str, str], List[Tuple[str, str, str]]]:
239239
"""Get storage key(s) for the given parameters."""
240240
if network:
241241
return (connection_name, table_name, network)

src/amp/utils/manifest_inspector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
from manifest files in a human-readable format.
55
"""
66

7-
from typing import Any, Dict
7+
from typing import Any, Dict, List, Union
88

99

10-
def describe_manifest(manifest: dict) -> Dict[str, list[Dict[str, str | bool]]]:
10+
def describe_manifest(manifest: dict) -> Dict[str, List[Dict[str, Union[str, bool]]]]:
1111
"""Extract structured schema information from a manifest.
1212
1313
Args:

0 commit comments

Comments
 (0)