vgi-python 0.8.3__py3-none-any.whl → 0.8.5__py3-none-any.whl
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.
- vgi/_test_fixtures/table/_common.py +2 -2
- vgi/_test_fixtures/worker.py +1 -0
- vgi/argument_spec.py +23 -0
- vgi/catalog/catalog_interface.py +1 -0
- vgi/catalog/descriptors.py +5 -0
- {vgi_python-0.8.3.dist-info → vgi_python-0.8.5.dist-info}/METADATA +1 -1
- {vgi_python-0.8.3.dist-info → vgi_python-0.8.5.dist-info}/RECORD +10 -10
- {vgi_python-0.8.3.dist-info → vgi_python-0.8.5.dist-info}/WHEEL +0 -0
- {vgi_python-0.8.3.dist-info → vgi_python-0.8.5.dist-info}/entry_points.txt +0 -0
- {vgi_python-0.8.3.dist-info → vgi_python-0.8.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -61,7 +61,7 @@ class CountBatchArgs:
|
|
|
61
61
|
"""
|
|
62
62
|
|
|
63
63
|
count: Annotated[int, Arg(0, doc="Number of rows to generate", ge=0)]
|
|
64
|
-
batch_size: Annotated[int, Arg("batch_size", default=
|
|
64
|
+
batch_size: Annotated[int, Arg("batch_size", default=2048, doc="Batch size for output", ge=1)]
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
@dataclass(slots=True, frozen=True)
|
|
@@ -91,7 +91,7 @@ class _BaseSequenceFunction(TableFunctionGenerator[Any, CountdownState]):
|
|
|
91
91
|
NUMPY_DTYPE: ClassVar[type[np.generic]] = np.int64
|
|
92
92
|
STATS_ARROW_TYPE: ClassVar[pa.DataType] = pa.int64()
|
|
93
93
|
STATS_COLUMN_NAME: ClassVar[str] = "n"
|
|
94
|
-
BATCH_SIZE_FALLBACK: ClassVar[int] =
|
|
94
|
+
BATCH_SIZE_FALLBACK: ClassVar[int] = 2048
|
|
95
95
|
|
|
96
96
|
@classmethod
|
|
97
97
|
def initial_state(cls, params: ProcessParams[Any]) -> CountdownState:
|
vgi/_test_fixtures/worker.py
CHANGED
|
@@ -320,6 +320,7 @@ _EXAMPLE_CATALOG = Catalog(
|
|
|
320
320
|
default_schema="main",
|
|
321
321
|
comment="Example VGI catalog for testing",
|
|
322
322
|
tags={"source": "vgi-fixture-worker", "version": "1"},
|
|
323
|
+
source_url="https://github.com/query-farm/vgi-python",
|
|
323
324
|
schemas=[
|
|
324
325
|
Schema(
|
|
325
326
|
name="main",
|
vgi/argument_spec.py
CHANGED
|
@@ -38,6 +38,7 @@ __all__ = [
|
|
|
38
38
|
"VGI_VARARGS_TRUE",
|
|
39
39
|
"VGI_CONST_KEY",
|
|
40
40
|
"VGI_CONST_TRUE",
|
|
41
|
+
"VGI_DOC_KEY",
|
|
41
42
|
]
|
|
42
43
|
|
|
43
44
|
# =============================================================================
|
|
@@ -61,6 +62,11 @@ VGI_VARARGS_TRUE = b"true"
|
|
|
61
62
|
VGI_CONST_KEY = b"vgi_const"
|
|
62
63
|
VGI_CONST_TRUE = b"true"
|
|
63
64
|
|
|
65
|
+
# Key carrying the per-argument description (UTF-8 text). Presence-only: the key
|
|
66
|
+
# is omitted entirely when there is no doc (absent = undocumented). The
|
|
67
|
+
# ``vgi_doc_*`` prefix is reserved for future per-argument doc variants.
|
|
68
|
+
VGI_DOC_KEY = b"vgi_doc"
|
|
69
|
+
|
|
64
70
|
|
|
65
71
|
def _argument_spec_sort_key(spec: "ArgumentSpec") -> tuple[int, int | str]:
|
|
66
72
|
"""Sort key: positional first (by index), then named (alphabetically)."""
|
|
@@ -98,6 +104,9 @@ class ArgumentSpec:
|
|
|
98
104
|
is_const: True if this argument is constant-folded ([`ConstParam`][]).
|
|
99
105
|
Constant arguments are scalar values known at planning time,
|
|
100
106
|
rather than columnar data processed at runtime.
|
|
107
|
+
doc: Optional human/agent-facing description of the argument. Surfaced
|
|
108
|
+
through the catalog as the ``vgi_doc`` Arrow field metadata key
|
|
109
|
+
(UTF-8); empty string means undocumented.
|
|
101
110
|
|
|
102
111
|
Note:
|
|
103
112
|
For named arguments, the Python attribute name (``name``) and the SQL
|
|
@@ -119,6 +128,7 @@ class ArgumentSpec:
|
|
|
119
128
|
is_any_type: bool = False
|
|
120
129
|
is_varargs: bool = False
|
|
121
130
|
is_const: bool = False
|
|
131
|
+
doc: str = ""
|
|
122
132
|
|
|
123
133
|
def __repr__(self) -> str:
|
|
124
134
|
"""Return concise repr showing key attributes."""
|
|
@@ -197,6 +207,10 @@ def argument_specs_to_schema(specs: Sequence[ArgumentSpec]) -> pa.Schema:
|
|
|
197
207
|
if spec.is_const:
|
|
198
208
|
metadata[VGI_CONST_KEY] = VGI_CONST_TRUE
|
|
199
209
|
|
|
210
|
+
# Per-argument description (UTF-8; presence-only — omit when empty)
|
|
211
|
+
if spec.doc:
|
|
212
|
+
metadata[VGI_DOC_KEY] = spec.doc.encode("utf-8")
|
|
213
|
+
|
|
200
214
|
# Create field with or without metadata
|
|
201
215
|
field = pa.field(
|
|
202
216
|
spec.name,
|
|
@@ -246,6 +260,10 @@ def schema_to_argument_specs(schema: pa.Schema) -> list[ArgumentSpec]:
|
|
|
246
260
|
# Check const
|
|
247
261
|
is_const = metadata.get(VGI_CONST_KEY) == VGI_CONST_TRUE
|
|
248
262
|
|
|
263
|
+
# Per-argument description (UTF-8; absent = undocumented)
|
|
264
|
+
doc_bytes = metadata.get(VGI_DOC_KEY)
|
|
265
|
+
doc = doc_bytes.decode("utf-8") if doc_bytes else ""
|
|
266
|
+
|
|
249
267
|
specs.append(
|
|
250
268
|
ArgumentSpec(
|
|
251
269
|
name=field.name,
|
|
@@ -255,6 +273,7 @@ def schema_to_argument_specs(schema: pa.Schema) -> list[ArgumentSpec]:
|
|
|
255
273
|
is_any_type=is_any_type,
|
|
256
274
|
is_varargs=is_varargs,
|
|
257
275
|
is_const=is_const,
|
|
276
|
+
doc=doc,
|
|
258
277
|
)
|
|
259
278
|
)
|
|
260
279
|
|
|
@@ -312,6 +331,7 @@ def extract_argument_specs(
|
|
|
312
331
|
is_any_type=param_arg.is_any,
|
|
313
332
|
is_varargs=param_arg.varargs,
|
|
314
333
|
is_const=False,
|
|
334
|
+
doc=param_arg.doc or "",
|
|
315
335
|
)
|
|
316
336
|
)
|
|
317
337
|
|
|
@@ -328,6 +348,7 @@ def extract_argument_specs(
|
|
|
328
348
|
is_any_type=const_arg.is_any,
|
|
329
349
|
is_varargs=const_arg.varargs,
|
|
330
350
|
is_const=True,
|
|
351
|
+
doc=const_arg.doc or "",
|
|
331
352
|
)
|
|
332
353
|
)
|
|
333
354
|
|
|
@@ -392,6 +413,7 @@ def extract_argument_specs(
|
|
|
392
413
|
is_any_type=is_any_type,
|
|
393
414
|
is_varargs=arg_instance.varargs,
|
|
394
415
|
is_const=getattr(arg_instance, "const", False),
|
|
416
|
+
doc=getattr(arg_instance, "doc", "") or "",
|
|
395
417
|
)
|
|
396
418
|
)
|
|
397
419
|
|
|
@@ -466,6 +488,7 @@ def extract_argument_specs(
|
|
|
466
488
|
is_any_type=is_any_type,
|
|
467
489
|
is_varargs=is_varargs,
|
|
468
490
|
is_const=is_const,
|
|
491
|
+
doc=getattr(arg_legacy, "doc", "") or "",
|
|
469
492
|
)
|
|
470
493
|
)
|
|
471
494
|
|
vgi/catalog/catalog_interface.py
CHANGED
|
@@ -2319,6 +2319,7 @@ class ReadOnlyCatalogInterface(CatalogInterface):
|
|
|
2319
2319
|
implementation_version=None,
|
|
2320
2320
|
data_version_spec=None,
|
|
2321
2321
|
attach_option_specs=[spec.serialize() for spec in self.attach_option_specs],
|
|
2322
|
+
source_url=self.catalog.source_url if self.catalog is not None else None,
|
|
2322
2323
|
)
|
|
2323
2324
|
]
|
|
2324
2325
|
|
vgi/catalog/descriptors.py
CHANGED
|
@@ -873,6 +873,10 @@ class Catalog:
|
|
|
873
873
|
schemas: Sequence of Schema objects defining the catalog contents.
|
|
874
874
|
comment: Optional comment describing the catalog.
|
|
875
875
|
tags: Optional key-value tags associated with the catalog.
|
|
876
|
+
source_url: Where this worker's code lives — repo, build, or docs
|
|
877
|
+
homepage. ``None`` (the default) when the worker doesn't advertise
|
|
878
|
+
a source location. Surfaced via the ``catalog_catalogs()`` discovery
|
|
879
|
+
record (``CatalogInfo.source_url``).
|
|
876
880
|
|
|
877
881
|
"""
|
|
878
882
|
|
|
@@ -881,6 +885,7 @@ class Catalog:
|
|
|
881
885
|
schemas: Sequence[Schema] = ()
|
|
882
886
|
comment: str | None = None
|
|
883
887
|
tags: dict[str, str] = field(default_factory=dict)
|
|
888
|
+
source_url: str | None = None
|
|
884
889
|
|
|
885
890
|
def __post_init__(self) -> None:
|
|
886
891
|
"""Validate catalog configuration."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vgi-python
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.5
|
|
4
4
|
Summary: Vector Gateway Interface - Connect DuckDB to external programs via Apache Arrow
|
|
5
5
|
Project-URL: Homepage, https://query.farm
|
|
6
6
|
Project-URL: Repository, https://github.com/Query-farm/vgi-python
|
|
@@ -2,7 +2,7 @@ vgi/__init__.py,sha256=PRtFvXxhHEbY_0KVhyXIbGigZDYKHzMS-4gp0p6IJSQ,3414
|
|
|
2
2
|
vgi/_duckdb.py,sha256=YB5D7N3Bwg_xP6X8a5QlumtlAovSej1A1Go5XlNGVko,2162
|
|
3
3
|
vgi/_storage_profile.py,sha256=VkTsXojuE0tHEzurmteQSAiL1vI3CZSgYkL6D_h8GvE,5061
|
|
4
4
|
vgi/aggregate_function.py,sha256=vn9TjQEHxAKJl_xzQOzdj5TY_6LplcZjv06JkQMnUyo,25184
|
|
5
|
-
vgi/argument_spec.py,sha256=
|
|
5
|
+
vgi/argument_spec.py,sha256=FFtCNVXhUnEvft51HICOVA7jGJilDW0CHYeyuYexGsg,18142
|
|
6
6
|
vgi/arguments.py,sha256=02tIMGIR_cRS73u-bsgpFERxhje-rnTokjBgGsm9pQA,67019
|
|
7
7
|
vgi/auth.py,sha256=3HD2zM-Mt0Ie-_HT5RorpND1OusUw2CPROjPNs7rgbo,1478
|
|
8
8
|
vgi/exceptions.py,sha256=oX_sZc9xGWi7Xf8cJQf89fX19i3ocDEj_V_76GINgBQ,7294
|
|
@@ -41,7 +41,7 @@ vgi/_test_fixtures/simple_writable.py,sha256=CGmDBUY8kthauEm8eJN2lV72cJ9_TRxOAQC
|
|
|
41
41
|
vgi/_test_fixtures/table_in_out.py,sha256=7QckA3NJhYAYuSctcwZLul5yOM2V3KWvLuG_33K0B_w,50459
|
|
42
42
|
vgi/_test_fixtures/versioned.py,sha256=Itm-x_Zt9WDwLGT4Dl4VzU5GtFF4HkcaJEqg9ErB8As,5784
|
|
43
43
|
vgi/_test_fixtures/versioned_tables.py,sha256=KRllGGRrwH8JUtqH-tLHT1JL09rKN-EcEYZVeQdbaLs,22112
|
|
44
|
-
vgi/_test_fixtures/worker.py,sha256=
|
|
44
|
+
vgi/_test_fixtures/worker.py,sha256=5G3shpiPoKWV_DP28UN1LYNp1wIJ2Q-TB8mJ3qok2q4,71230
|
|
45
45
|
vgi/_test_fixtures/accumulate/__init__.py,sha256=4hYT8jqRoVHSjV9TB7v0Z1CMJtdLuPaDWSz4J2fvMDs,868
|
|
46
46
|
vgi/_test_fixtures/accumulate/worker.py,sha256=yal9m-GjKNKUdLOLtwkCyFkeHVv_nnpUjh8amwueT48,30163
|
|
47
47
|
vgi/_test_fixtures/aggregate/__init__.py,sha256=tjCVKdCuHlIAZL7uDi-o_q82oMieXsAyoKExesr-7a0,2156
|
|
@@ -71,7 +71,7 @@ vgi/_test_fixtures/scalar/type_info.py,sha256=2WeTxakT-_tcWybPfkCrAHVAMOadFN3tb8
|
|
|
71
71
|
vgi/_test_fixtures/schema_reconcile/__init__.py,sha256=rCCtM5bd67-PTPeIYg9SCJaKUSglA6YeXsedQBEUlmA,1324
|
|
72
72
|
vgi/_test_fixtures/schema_reconcile/worker.py,sha256=qkGRdKvI2AKItenlribd3cvUfvWUwPbAc2WrW7_7Ijc,23570
|
|
73
73
|
vgi/_test_fixtures/table/__init__.py,sha256=PndeOVcsqi17XLwn0VnmPabjw3tFUfvOQFtETMOCjaU,7371
|
|
74
|
-
vgi/_test_fixtures/table/_common.py,sha256=
|
|
74
|
+
vgi/_test_fixtures/table/_common.py,sha256=9HYDW8aH7eD7V3CabTWTE7ZeVL_ELxUXdiJfuyuZjaQ,5961
|
|
75
75
|
vgi/_test_fixtures/table/batch_index.py,sha256=P5ds0xgikuEQanSEWVWKMLbdvIzUeJraI-GuSoPdb6U,11641
|
|
76
76
|
vgi/_test_fixtures/table/batch_index_broken.py,sha256=kZOGrLL7ZW1rmwPmNEYRmiF_vqIfHsfXioq5vKPWHk0,7314
|
|
77
77
|
vgi/_test_fixtures/table/catalog_scans.py,sha256=5j1Sx02-HWK7bFurDu4e9HiS3Q9BmBukA3sAErH4GHE,5080
|
|
@@ -98,8 +98,8 @@ vgi/_test_fixtures/writable/worker.py,sha256=nH8KSZqyKv1gqdKn-_OFVh3h02FbyE0NFQ2
|
|
|
98
98
|
vgi/catalog/__init__.py,sha256=SCpeP2TtPfhWhwaqK5qGmmtHCM2z-EL66OoCkyefy7c,2064
|
|
99
99
|
vgi/catalog/_descriptor_spec.py,sha256=iMqId2fSBqlZ9HU6ct5AkYUAxtRGG_MVTLClDC1WPUs,7673
|
|
100
100
|
vgi/catalog/attach_option.py,sha256=nLGxsfAFR_-NqDrw7v18dtkNNNQIYLr3fuhpVw4XhFc,1739
|
|
101
|
-
vgi/catalog/catalog_interface.py,sha256=
|
|
102
|
-
vgi/catalog/descriptors.py,sha256=
|
|
101
|
+
vgi/catalog/catalog_interface.py,sha256=aCMSpYczcEb11TmOFdaGTN_F_yOywyR2go1Z6vC_0zY,120231
|
|
102
|
+
vgi/catalog/descriptors.py,sha256=oH-Ld02yQ5oUJb7J9sqGYwhZwaWzZiL3ZPtublmKXzc,39366
|
|
103
103
|
vgi/catalog/duckdb_statistics.py,sha256=fARQupgq0fD46rDgxDXvdCFsgs-rvCOHhls7WXHmnFY,15615
|
|
104
104
|
vgi/catalog/secret_type.py,sha256=MKtAypBa3xXyr-NC5CHjdX1R00JEnuMtvgboFWC2T9o,3336
|
|
105
105
|
vgi/catalog/setting.py,sha256=06QfgaAR-0BKflIJ0du6PGqA5BPMdrkwr6u7f4nddII,1846
|
|
@@ -122,8 +122,8 @@ vgi/transactor/_duckdb_compat.py,sha256=sXVZ9JLKAQyGR1BjWczSwdQEavtr-TcZPoVZZnTr
|
|
|
122
122
|
vgi/transactor/client.py,sha256=7DTeMksogsw6ANjQjGOPpKYrV76rg4_kGjktMJf54jg,4486
|
|
123
123
|
vgi/transactor/protocol.py,sha256=Mtmll3CdrLFL1B4NY4NZUTO_yi3PT0qhvMQnzapuBWU,4780
|
|
124
124
|
vgi/transactor/server.py,sha256=WpIqjzy2Mebw17Jui4-w7vyGEo9pD-pEZJG-3Ob1Sk8,29705
|
|
125
|
-
vgi_python-0.8.
|
|
126
|
-
vgi_python-0.8.
|
|
127
|
-
vgi_python-0.8.
|
|
128
|
-
vgi_python-0.8.
|
|
129
|
-
vgi_python-0.8.
|
|
125
|
+
vgi_python-0.8.5.dist-info/METADATA,sha256=1dqjWdLcM1MrxAIF8CVYkGA8YCaZF3T5pamDdUYdIj0,24725
|
|
126
|
+
vgi_python-0.8.5.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
127
|
+
vgi_python-0.8.5.dist-info/entry_points.txt,sha256=3Kz1vgodw3pOL_xjtSyDB55-ZRy-U2X-X_Bdr582x0Q,165
|
|
128
|
+
vgi_python-0.8.5.dist-info/licenses/LICENSE,sha256=pbJb4zZasP6n5ifEV81wFu017TarjydaYVmGbHcehtY,6103
|
|
129
|
+
vgi_python-0.8.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|