hubmap-search-sdk 1.0.0a2__tar.gz → 1.0.0a4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. hubmap_search_sdk-1.0.0a4/.release-please-manifest.json +3 -0
  2. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/CHANGELOG.md +24 -0
  3. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/PKG-INFO +1 -1
  4. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/pyproject.toml +1 -1
  5. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/_transform.py +46 -1
  6. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/_typing.py +2 -0
  7. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_version.py +1 -1
  8. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_client.py +1 -1
  9. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_transform.py +20 -1
  10. hubmap_search_sdk-1.0.0a2/.release-please-manifest.json +0 -3
  11. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/.gitignore +0 -0
  12. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/CONTRIBUTING.md +0 -0
  13. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/LICENSE +0 -0
  14. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/README.md +0 -0
  15. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/SECURITY.md +0 -0
  16. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/api.md +0 -0
  17. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/bin/check-release-environment +0 -0
  18. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/bin/publish-pypi +0 -0
  19. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/examples/.keep +0 -0
  20. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/mypy.ini +0 -0
  21. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/noxfile.py +0 -0
  22. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/release-please-config.json +0 -0
  23. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/requirements-dev.lock +0 -0
  24. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/requirements.lock +0 -0
  25. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/__init__.py +0 -0
  26. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_base_client.py +0 -0
  27. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_client.py +0 -0
  28. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_compat.py +0 -0
  29. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_constants.py +0 -0
  30. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_exceptions.py +0 -0
  31. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_files.py +0 -0
  32. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_models.py +0 -0
  33. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_qs.py +0 -0
  34. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_resource.py +0 -0
  35. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_response.py +0 -0
  36. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_streaming.py +0 -0
  37. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_types.py +0 -0
  38. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/__init__.py +0 -0
  39. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/_logs.py +0 -0
  40. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/_proxy.py +0 -0
  41. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/_reflection.py +0 -0
  42. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/_streams.py +0 -0
  43. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/_sync.py +0 -0
  44. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/_utils/_utils.py +0 -0
  45. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/lib/.keep +0 -0
  46. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/py.typed +0 -0
  47. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/__init__.py +0 -0
  48. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/add.py +0 -0
  49. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/clear_docs.py +0 -0
  50. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/indices.py +0 -0
  51. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/mapping.py +0 -0
  52. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/mget.py +0 -0
  53. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/param_search.py +0 -0
  54. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/reindex.py +0 -0
  55. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/scroll_search.py +0 -0
  56. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/search.py +0 -0
  57. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/resources/update.py +0 -0
  58. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/__init__.py +0 -0
  59. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/add_create_document_params.py +0 -0
  60. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/add_create_document_with_index_params.py +0 -0
  61. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/add_update_document_with_scope_params.py +0 -0
  62. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/index_list_response.py +0 -0
  63. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/mget_retrieve_multiple_by_index_params.py +0 -0
  64. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/mget_retrieve_multiple_params.py +0 -0
  65. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/param_search_execute_params.py +0 -0
  66. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/scroll_search_create_params.py +0 -0
  67. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/search_execute_index_query_params.py +0 -0
  68. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/search_execute_query_params.py +0 -0
  69. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/update_update_document_at_index_params.py +0 -0
  70. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/update_update_document_params.py +0 -0
  71. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/src/hubmap_search_sdk/types/update_update_document_with_scope_params.py +0 -0
  72. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/__init__.py +0 -0
  73. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/__init__.py +0 -0
  74. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_add.py +0 -0
  75. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_clear_docs.py +0 -0
  76. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_indices.py +0 -0
  77. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_mapping.py +0 -0
  78. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_mget.py +0 -0
  79. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_param_search.py +0 -0
  80. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_reindex.py +0 -0
  81. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_scroll_search.py +0 -0
  82. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_search.py +0 -0
  83. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/api_resources/test_update.py +0 -0
  84. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/conftest.py +0 -0
  85. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/sample_file.txt +0 -0
  86. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_deepcopy.py +0 -0
  87. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_extract_files.py +0 -0
  88. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_files.py +0 -0
  89. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_models.py +0 -0
  90. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_qs.py +0 -0
  91. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_required_args.py +0 -0
  92. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_response.py +0 -0
  93. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_streaming.py +0 -0
  94. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_utils/test_proxy.py +0 -0
  95. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/test_utils/test_typing.py +0 -0
  96. {hubmap_search_sdk-1.0.0a2 → hubmap_search_sdk-1.0.0a4}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.0.0-alpha.4"
3
+ }
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-alpha.4 (2025-04-12)
4
+
5
+ Full Changelog: [v1.0.0-alpha.3...v1.0.0-alpha.4](https://github.com/hubmapconsortium/search-python-sdk/compare/v1.0.0-alpha.3...v1.0.0-alpha.4)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **perf:** optimize some hot paths ([5212433](https://github.com/hubmapconsortium/search-python-sdk/commit/5212433093ec3d9cce2270a07d825a88c852bded))
10
+ * **perf:** skip traversing types for NotGiven values ([383d6b2](https://github.com/hubmapconsortium/search-python-sdk/commit/383d6b222bfa396b9b083027178c27c1fb057df6))
11
+
12
+
13
+ ### Chores
14
+
15
+ * **internal:** expand CI branch coverage ([5cb57ca](https://github.com/hubmapconsortium/search-python-sdk/commit/5cb57ca2e66a71d85e638df9c377b2305a136c66))
16
+ * **internal:** reduce CI branch coverage ([3d69904](https://github.com/hubmapconsortium/search-python-sdk/commit/3d699046bc26aa7bebf84061cf0d34aee6e944c5))
17
+
18
+ ## 1.0.0-alpha.3 (2025-04-09)
19
+
20
+ Full Changelog: [v1.0.0-alpha.2...v1.0.0-alpha.3](https://github.com/hubmapconsortium/search-python-sdk/compare/v1.0.0-alpha.2...v1.0.0-alpha.3)
21
+
22
+ ### Chores
23
+
24
+ * **internal:** remove trailing character ([#20](https://github.com/hubmapconsortium/search-python-sdk/issues/20)) ([eba7907](https://github.com/hubmapconsortium/search-python-sdk/commit/eba7907ee5740d1280a2e8644505539d7e0f2bd2))
25
+ * **internal:** slight transform perf improvement ([#23](https://github.com/hubmapconsortium/search-python-sdk/issues/23)) ([4605f8b](https://github.com/hubmapconsortium/search-python-sdk/commit/4605f8b1836a291ab658811a196cb46a3df818b0))
26
+
3
27
  ## 1.0.0-alpha.2 (2025-04-03)
4
28
 
5
29
  Full Changelog: [v1.0.0-alpha.1...v1.0.0-alpha.2](https://github.com/hubmapconsortium/search-python-sdk/compare/v1.0.0-alpha.1...v1.0.0-alpha.2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: hubmap_search_sdk
3
- Version: 1.0.0a2
3
+ Version: 1.0.0a4
4
4
  Summary: The official Python library for the hubmap-search-sdk API
5
5
  Project-URL: Homepage, https://github.com/hubmapconsortium/search-python-sdk
6
6
  Project-URL: Repository, https://github.com/hubmapconsortium/search-python-sdk
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hubmap_search_sdk"
3
- version = "1.0.0-alpha.2"
3
+ version = "1.0.0-alpha.4"
4
4
  description = "The official Python library for the hubmap-search-sdk API"
5
5
  dynamic = ["readme"]
6
6
  license = "MIT"
@@ -5,13 +5,15 @@ import base64
5
5
  import pathlib
6
6
  from typing import Any, Mapping, TypeVar, cast
7
7
  from datetime import date, datetime
8
- from typing_extensions import Literal, get_args, override, get_type_hints
8
+ from typing_extensions import Literal, get_args, override, get_type_hints as _get_type_hints
9
9
 
10
10
  import anyio
11
11
  import pydantic
12
12
 
13
13
  from ._utils import (
14
14
  is_list,
15
+ is_given,
16
+ lru_cache,
15
17
  is_mapping,
16
18
  is_iterable,
17
19
  )
@@ -108,6 +110,7 @@ def transform(
108
110
  return cast(_T, transformed)
109
111
 
110
112
 
113
+ @lru_cache(maxsize=8096)
111
114
  def _get_annotated_type(type_: type) -> type | None:
112
115
  """If the given type is an `Annotated` type then it is returned, if not `None` is returned.
113
116
 
@@ -142,6 +145,10 @@ def _maybe_transform_key(key: str, type_: type) -> str:
142
145
  return key
143
146
 
144
147
 
148
+ def _no_transform_needed(annotation: type) -> bool:
149
+ return annotation == float or annotation == int
150
+
151
+
145
152
  def _transform_recursive(
146
153
  data: object,
147
154
  *,
@@ -184,6 +191,15 @@ def _transform_recursive(
184
191
  return cast(object, data)
185
192
 
186
193
  inner_type = extract_type_arg(stripped_type, 0)
194
+ if _no_transform_needed(inner_type):
195
+ # for some types there is no need to transform anything, so we can get a small
196
+ # perf boost from skipping that work.
197
+ #
198
+ # but we still need to convert to a list to ensure the data is json-serializable
199
+ if is_list(data):
200
+ return data
201
+ return list(data)
202
+
187
203
  return [_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
188
204
 
189
205
  if is_union_type(stripped_type):
@@ -245,6 +261,11 @@ def _transform_typeddict(
245
261
  result: dict[str, object] = {}
246
262
  annotations = get_type_hints(expected_type, include_extras=True)
247
263
  for key, value in data.items():
264
+ if not is_given(value):
265
+ # we don't need to include `NotGiven` values here as they'll
266
+ # be stripped out before the request is sent anyway
267
+ continue
268
+
248
269
  type_ = annotations.get(key)
249
270
  if type_ is None:
250
271
  # we do not have a type annotation for this field, leave it as is
@@ -332,6 +353,15 @@ async def _async_transform_recursive(
332
353
  return cast(object, data)
333
354
 
334
355
  inner_type = extract_type_arg(stripped_type, 0)
356
+ if _no_transform_needed(inner_type):
357
+ # for some types there is no need to transform anything, so we can get a small
358
+ # perf boost from skipping that work.
359
+ #
360
+ # but we still need to convert to a list to ensure the data is json-serializable
361
+ if is_list(data):
362
+ return data
363
+ return list(data)
364
+
335
365
  return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
336
366
 
337
367
  if is_union_type(stripped_type):
@@ -393,6 +423,11 @@ async def _async_transform_typeddict(
393
423
  result: dict[str, object] = {}
394
424
  annotations = get_type_hints(expected_type, include_extras=True)
395
425
  for key, value in data.items():
426
+ if not is_given(value):
427
+ # we don't need to include `NotGiven` values here as they'll
428
+ # be stripped out before the request is sent anyway
429
+ continue
430
+
396
431
  type_ = annotations.get(key)
397
432
  if type_ is None:
398
433
  # we do not have a type annotation for this field, leave it as is
@@ -400,3 +435,13 @@ async def _async_transform_typeddict(
400
435
  else:
401
436
  result[_maybe_transform_key(key, type_)] = await _async_transform_recursive(value, annotation=type_)
402
437
  return result
438
+
439
+
440
+ @lru_cache(maxsize=8096)
441
+ def get_type_hints(
442
+ obj: Any,
443
+ globalns: dict[str, Any] | None = None,
444
+ localns: Mapping[str, Any] | None = None,
445
+ include_extras: bool = False,
446
+ ) -> dict[str, Any]:
447
+ return _get_type_hints(obj, globalns=globalns, localns=localns, include_extras=include_extras)
@@ -13,6 +13,7 @@ from typing_extensions import (
13
13
  get_origin,
14
14
  )
15
15
 
16
+ from ._utils import lru_cache
16
17
  from .._types import InheritsGeneric
17
18
  from .._compat import is_union as _is_union
18
19
 
@@ -66,6 +67,7 @@ def is_type_alias_type(tp: Any, /) -> TypeIs[typing_extensions.TypeAliasType]:
66
67
 
67
68
 
68
69
  # Extracts T from Annotated[T, ...] or from Required[Annotated[T, ...]]
70
+ @lru_cache(maxsize=8096)
69
71
  def strip_annotated_type(typ: type) -> type:
70
72
  if is_required_type(typ) or is_annotated_type(typ):
71
73
  return strip_annotated_type(cast(type, get_args(typ)[0]))
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "hubmap_search_sdk"
4
- __version__ = "1.0.0-alpha.2" # x-release-please-version
4
+ __version__ = "1.0.0-alpha.4" # x-release-please-version
@@ -1637,7 +1637,7 @@ class TestAsyncHubmapSearchSDK:
1637
1637
  import threading
1638
1638
 
1639
1639
  from hubmap_search_sdk._utils import asyncify
1640
- from hubmap_search_sdk._base_client import get_platform
1640
+ from hubmap_search_sdk._base_client import get_platform
1641
1641
 
1642
1642
  async def test_main() -> None:
1643
1643
  result = await asyncify(get_platform)()
@@ -8,7 +8,7 @@ from typing_extensions import Required, Annotated, TypedDict
8
8
 
9
9
  import pytest
10
10
 
11
- from hubmap_search_sdk._types import Base64FileInput
11
+ from hubmap_search_sdk._types import NOT_GIVEN, Base64FileInput
12
12
  from hubmap_search_sdk._utils import (
13
13
  PropertyInfo,
14
14
  transform as _transform,
@@ -432,3 +432,22 @@ async def test_base64_file_input(use_async: bool) -> None:
432
432
  assert await transform({"foo": io.BytesIO(b"Hello, world!")}, TypedDictBase64Input, use_async) == {
433
433
  "foo": "SGVsbG8sIHdvcmxkIQ=="
434
434
  } # type: ignore[comparison-overlap]
435
+
436
+
437
+ @parametrize
438
+ @pytest.mark.asyncio
439
+ async def test_transform_skipping(use_async: bool) -> None:
440
+ # lists of ints are left as-is
441
+ data = [1, 2, 3]
442
+ assert await transform(data, List[int], use_async) is data
443
+
444
+ # iterables of ints are converted to a list
445
+ data = iter([1, 2, 3])
446
+ assert await transform(data, Iterable[int], use_async) == [1, 2, 3]
447
+
448
+
449
+ @parametrize
450
+ @pytest.mark.asyncio
451
+ async def test_strips_notgiven(use_async: bool) -> None:
452
+ assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"}
453
+ assert await transform({"foo_bar": NOT_GIVEN}, Foo1, use_async) == {}
@@ -1,3 +0,0 @@
1
- {
2
- ".": "1.0.0-alpha.2"
3
- }