vellum-workflow-server 0.14.71.post1__py3-none-any.whl → 0.14.71.post3__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.
Potentially problematic release.
This version of vellum-workflow-server might be problematic. Click here for more details.
- {vellum_workflow_server-0.14.71.post1.dist-info → vellum_workflow_server-0.14.71.post3.dist-info}/METADATA +1 -1
- {vellum_workflow_server-0.14.71.post1.dist-info → vellum_workflow_server-0.14.71.post3.dist-info}/RECORD +6 -6
- workflow_server/api/tests/test_workflow_view.py +55 -0
- workflow_server/api/workflow_view.py +1 -1
- {vellum_workflow_server-0.14.71.post1.dist-info → vellum_workflow_server-0.14.71.post3.dist-info}/WHEEL +0 -0
- {vellum_workflow_server-0.14.71.post1.dist-info → vellum_workflow_server-0.14.71.post3.dist-info}/entry_points.txt +0 -0
|
@@ -4,9 +4,9 @@ workflow_server/api/auth_middleware.py,sha256=IlZaCiwZ5nwQqk5sYQorvOFj7lt0p1ZSSE
|
|
|
4
4
|
workflow_server/api/healthz_view.py,sha256=itiRvBDBXncrw8Kbbc73UZLwqMAhgHOR3uSre_dAfgY,404
|
|
5
5
|
workflow_server/api/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
workflow_server/api/tests/test_input_display_mapping.py,sha256=drBZqMudFyB5wgiUOcMgRXz7E7ge-Qgxbstw4E4f0zE,2211
|
|
7
|
-
workflow_server/api/tests/test_workflow_view.py,sha256=
|
|
7
|
+
workflow_server/api/tests/test_workflow_view.py,sha256=39-Q7aSZwzTSpDJD13Ol17ZOga3dUTSuKHc-K0wrwKk,8716
|
|
8
8
|
workflow_server/api/tests/test_workflow_view_stream_workflow_route.py,sha256=2gro4GD3FBuaA8T2-0oQxOOXh6zTf6hwxKb9CGU3x8g,24813
|
|
9
|
-
workflow_server/api/workflow_view.py,sha256=
|
|
9
|
+
workflow_server/api/workflow_view.py,sha256=WRsD8Wjs2O9G2p_X5USx1D3b2HzBqgb1bfSzjcZ7O2o,16193
|
|
10
10
|
workflow_server/code_exec_runner.py,sha256=tfijklTVkX4y45jeFTfrY2hVhdwo0VrLFc3SMeIiVYs,3096
|
|
11
11
|
workflow_server/config.py,sha256=K5Tavm7wiqCZt0RWWue7zzb8N6e8aWnFOTNlBqEJPcI,1330
|
|
12
12
|
workflow_server/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -26,7 +26,7 @@ workflow_server/utils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
|
26
26
|
workflow_server/utils/tests/test_system_utils.py,sha256=MdBxI9gxUOpR_JBAHpEz6dGFY6JjxhMSM2oExpqFvNA,4314
|
|
27
27
|
workflow_server/utils/tests/test_utils.py,sha256=qwK5Rmy3RQyjtlUrYAuGuDlBeRzZKsf1yS-y2IpUizQ,6452
|
|
28
28
|
workflow_server/utils/utils.py,sha256=Wqqn-1l2ugkGgy5paWWdt0AVxAyPMQCYcnRSSOMjXlA,4355
|
|
29
|
-
vellum_workflow_server-0.14.71.
|
|
30
|
-
vellum_workflow_server-0.14.71.
|
|
31
|
-
vellum_workflow_server-0.14.71.
|
|
32
|
-
vellum_workflow_server-0.14.71.
|
|
29
|
+
vellum_workflow_server-0.14.71.post3.dist-info/METADATA,sha256=r4Qhqly9YQRo_edwbtklqfx5H2C-fUY0nsMPF14isQs,2243
|
|
30
|
+
vellum_workflow_server-0.14.71.post3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
31
|
+
vellum_workflow_server-0.14.71.post3.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
|
|
32
|
+
vellum_workflow_server-0.14.71.post3.dist-info/RECORD,,
|
|
@@ -226,3 +226,58 @@ class BrokenNode(BaseNode)
|
|
|
226
226
|
error_message = caplog.records[0].message
|
|
227
227
|
assert "Failed to load node from module invalid_node" in error_message
|
|
228
228
|
assert "invalid_node.py, line 4" in error_message
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
def test_version_route__with_inputs(tmp_path):
|
|
232
|
+
# GIVEN a temporary custom_nodes directory
|
|
233
|
+
custom_nodes_dir = tmp_path / "vellum_custom_nodes"
|
|
234
|
+
custom_nodes_dir.mkdir()
|
|
235
|
+
|
|
236
|
+
# AND an addition node file
|
|
237
|
+
node_file = custom_nodes_dir / "addition_node.py"
|
|
238
|
+
node_file.write_text(
|
|
239
|
+
"""
|
|
240
|
+
from vellum.workflows.inputs import BaseInputs
|
|
241
|
+
from vellum.workflows.nodes import BaseNode
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class Inputs(BaseInputs):
|
|
245
|
+
arg1: int
|
|
246
|
+
arg2: int
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
class MyAdditionNode(BaseNode):
|
|
250
|
+
\"\"\"Custom node that performs simple addition.\"\"\"
|
|
251
|
+
label = "Addition Node"
|
|
252
|
+
arg1: int = Inputs.arg1
|
|
253
|
+
arg2: int = Inputs.arg2
|
|
254
|
+
|
|
255
|
+
class Outputs(BaseNode.Outputs):
|
|
256
|
+
result: int
|
|
257
|
+
|
|
258
|
+
def run(self) -> BaseNode.Outputs:
|
|
259
|
+
result = self.arg1 + self.arg2
|
|
260
|
+
return self.Outputs(result=result)
|
|
261
|
+
"""
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
flask_app = create_app()
|
|
265
|
+
|
|
266
|
+
# WHEN we make a request to the version route
|
|
267
|
+
with patch("os.getcwd", return_value=str(tmp_path)), flask_app.test_client() as test_client:
|
|
268
|
+
response = test_client.get("/workflow/version")
|
|
269
|
+
|
|
270
|
+
# THEN we should get a successful response
|
|
271
|
+
assert response.status_code == 200
|
|
272
|
+
|
|
273
|
+
# AND we should find the addition node
|
|
274
|
+
nodes = response.json["nodes"]
|
|
275
|
+
assert len(nodes) == 1
|
|
276
|
+
|
|
277
|
+
# AND the node should have the correct metadata
|
|
278
|
+
node = nodes[0]
|
|
279
|
+
assert node["label"] == "Addition Node"
|
|
280
|
+
assert node["description"] == "Custom node that performs simple addition."
|
|
281
|
+
assert UUID(node["id"])
|
|
282
|
+
assert node["module"] == "vellum_custom_nodes"
|
|
283
|
+
assert node["name"] == "MyAdditionNode"
|
|
@@ -378,7 +378,7 @@ def get_version_route() -> tuple[dict, int]:
|
|
|
378
378
|
"id": str(uuid4()),
|
|
379
379
|
"module": CUSTOM_NODES_DIRECTORY,
|
|
380
380
|
"name": obj.__name__,
|
|
381
|
-
"label": obj
|
|
381
|
+
"label": obj.label.instance if hasattr(obj, "label") else obj.__name__,
|
|
382
382
|
"description": inspect.getdoc(obj) or "",
|
|
383
383
|
}
|
|
384
384
|
)
|
|
File without changes
|
|
File without changes
|