omnata-plugin-runtime 0.5.7a135__tar.gz → 0.5.7a136__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/omnata_plugin.py +8 -6
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/LICENSE +0 -0
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/README.md +0 -0
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/rate_limiting.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "omnata-plugin-runtime"
|
3
|
-
version = "0.5.7-
|
3
|
+
version = "0.5.7-a136"
|
4
4
|
description = "Classes and common runtime components for building and running Omnata Plugins"
|
5
5
|
authors = ["James Weakley <james.weakley@omnata.com>"]
|
6
6
|
readme = "README.md"
|
@@ -2254,7 +2254,8 @@ def consumer_udtf(
|
|
2254
2254
|
original_process = getattr(cls, 'process')
|
2255
2255
|
sig = signature(original_process)
|
2256
2256
|
params = sig.parameters
|
2257
|
-
|
2257
|
+
if len(params) < 2:
|
2258
|
+
raise ValueError("The function must have the self parameter, plus at least the mandatory 'connection_parameters' parameter.")
|
2258
2259
|
# Ensure the first argument is mandatory and positional
|
2259
2260
|
if list(params.keys())[0] != 'self':
|
2260
2261
|
raise ValueError("The first argument should be 'self' for class methods.")
|
@@ -2262,8 +2263,8 @@ def consumer_udtf(
|
|
2262
2263
|
if list(params.keys())[1] != 'connection_parameters':
|
2263
2264
|
raise ValueError("The second argument should be 'connection_parameters'.")
|
2264
2265
|
|
2265
|
-
if params[list(params.keys())[1]].annotation !=
|
2266
|
-
raise ValueError("The second argument must be a
|
2266
|
+
if params[list(params.keys())[1]].annotation != ConnectionConfigurationParameters:
|
2267
|
+
raise ValueError("The second argument must be a ConnectionConfigurationParameters.")
|
2267
2268
|
|
2268
2269
|
@wraps(original_process)
|
2269
2270
|
def wrapped_process(self, connection_parameters, *args, **kwargs):
|
@@ -2321,12 +2322,13 @@ def consumer_udf(
|
|
2321
2322
|
def decorator(func):
|
2322
2323
|
sig = signature(func)
|
2323
2324
|
params = sig.parameters
|
2324
|
-
|
2325
|
+
if len(params) == 0:
|
2326
|
+
raise ValueError("The function must have at least one parameter.")
|
2325
2327
|
# Ensure the first argument is mandatory and positional
|
2326
2328
|
if list(params.keys())[0] != 'connection_parameters':
|
2327
2329
|
raise ValueError("The first argument should be 'connection_parameters'.")
|
2328
|
-
if params[list(params.keys())[0]].annotation !=
|
2329
|
-
raise ValueError("The first argument must be a
|
2330
|
+
if params[list(params.keys())[0]].annotation != ConnectionConfigurationParameters:
|
2331
|
+
raise ValueError("The first argument must be a ConnectionConfigurationParameters.")
|
2330
2332
|
|
2331
2333
|
@wraps(func)
|
2332
2334
|
def wrapper(self, connection_parameters, *args, **kwargs):
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.5.7a135 → omnata_plugin_runtime-0.5.7a136}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|