vellum-workflow-server 0.14.71.post3__py3-none-any.whl → 0.14.71.post5__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-workflow-server
3
- Version: 0.14.71.post3
3
+ Version: 0.14.71.post5
4
4
  Summary:
5
5
  License: AGPL
6
6
  Requires-Python: >=3.9.0,<4
@@ -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=39-Q7aSZwzTSpDJD13Ol17ZOga3dUTSuKHc-K0wrwKk,8716
7
+ workflow_server/api/tests/test_workflow_view.py,sha256=zMG__ktijsxHAR0qfgp_crueCuqNUDpbYgMuEjTC1Wk,8509
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=WRsD8Wjs2O9G2p_X5USx1D3b2HzBqgb1bfSzjcZ7O2o,16193
9
+ workflow_server/api/workflow_view.py,sha256=eNNao-TiM5x3-Ikcg9qxaJ5PNjd7NJGCAlRjCAAkVMw,16236
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.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,,
29
+ vellum_workflow_server-0.14.71.post5.dist-info/METADATA,sha256=OQeNKXKETaOWTvWrjPSsAHgza3O-LL2j0GI5nWLu-UY,2243
30
+ vellum_workflow_server-0.14.71.post5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
+ vellum_workflow_server-0.14.71.post5.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
32
+ vellum_workflow_server-0.14.71.post5.dist-info/RECORD,,
@@ -31,7 +31,6 @@ class TestNode(BaseNode):
31
31
 
32
32
  This is a detailed description of what the node does.
33
33
  \"""
34
- label = "Test Node"
35
34
  """
36
35
  )
37
36
 
@@ -51,7 +50,7 @@ class TestNode(BaseNode):
51
50
  # AND the node should have the correct metadata
52
51
  node = nodes[0]
53
52
  assert UUID(node["id"])
54
- assert node["module"] == "vellum_custom_nodes"
53
+ assert node["module"] == ["vellum_custom_nodes"]
55
54
  assert node["name"] == "TestNode"
56
55
  assert node["label"] == "Test Node"
57
56
  assert "A test node for processing data." in node["description"]
@@ -71,7 +70,6 @@ from vellum.workflows.nodes import BaseNode
71
70
 
72
71
  class SomeNode(BaseNode):
73
72
  \"""This is Some Node.\"""
74
- label = "Some node"
75
73
  """
76
74
  )
77
75
 
@@ -83,7 +81,6 @@ from vellum.workflows.nodes import BaseNode
83
81
 
84
82
  class SomeOtherNode(BaseNode):
85
83
  \"""This is Some Other Node.\"""
86
- label = "Some other node"
87
84
  """
88
85
  )
89
86
 
@@ -102,17 +99,17 @@ class SomeOtherNode(BaseNode):
102
99
 
103
100
  # AND the first node should have correct metadata
104
101
  some_node = nodes[0]
105
- assert some_node["label"] == "Some node"
102
+ assert some_node["label"] == "Some Node"
106
103
  assert some_node["description"] == "This is Some Node."
107
104
  assert UUID(some_node["id"])
108
- assert some_node["module"] == "vellum_custom_nodes"
105
+ assert some_node["module"] == ["vellum_custom_nodes"]
109
106
 
110
107
  # AND the second node should have correct metadata
111
108
  some_other_node = nodes[1]
112
- assert some_other_node["label"] == "Some other node"
109
+ assert some_other_node["label"] == "Some Other Node"
113
110
  assert some_other_node["description"] == "This is Some Other Node."
114
111
  assert UUID(some_other_node["id"])
115
- assert some_other_node["module"] == "vellum_custom_nodes"
112
+ assert some_other_node["module"] == ["vellum_custom_nodes"]
116
113
 
117
114
 
118
115
  def test_version_route__no_custom_nodes_dir(tmp_path):
@@ -143,11 +140,9 @@ from vellum.workflows.nodes import BaseNode
143
140
 
144
141
  class ProcessingNode(BaseNode):
145
142
  \"""Processes input data.\"""
146
- label = "Processing Node"
147
143
 
148
144
  class TransformationNode(BaseNode):
149
145
  \"""Transforms data format.\"""
150
- label = "Transformation Node"
151
146
 
152
147
  # This class should not be discovered
153
148
  class HelperClass:
@@ -185,7 +180,6 @@ from vellum.workflows.nodes import BaseNode
185
180
 
186
181
  class SomeNode(BaseNode):
187
182
  \"\"\"This is Some Node.\"\"\"
188
- label = "Some node"
189
183
  """
190
184
  )
191
185
 
@@ -197,7 +191,6 @@ from vellum.workflows.nodes import BaseNode
197
191
 
198
192
  class BrokenNode(BaseNode)
199
193
  \"\"\"This node has a syntax error.\"\"\"
200
- label = "Broken Node"
201
194
  """
202
195
  )
203
196
 
@@ -216,10 +209,10 @@ class BrokenNode(BaseNode)
216
209
 
217
210
  # AND the valid node should have correct metadata
218
211
  valid_node = nodes[0]
219
- assert valid_node["label"] == "Some node"
212
+ assert valid_node["label"] == "Some Node"
220
213
  assert valid_node["description"] == "This is Some Node."
221
214
  assert UUID(valid_node["id"])
222
- assert valid_node["module"] == "vellum_custom_nodes"
215
+ assert valid_node["module"] == ["vellum_custom_nodes"]
223
216
 
224
217
  # AND the error should be logged with full traceback
225
218
  assert len(caplog.records) > 0
@@ -248,7 +241,6 @@ class Inputs(BaseInputs):
248
241
 
249
242
  class MyAdditionNode(BaseNode):
250
243
  \"\"\"Custom node that performs simple addition.\"\"\"
251
- label = "Addition Node"
252
244
  arg1: int = Inputs.arg1
253
245
  arg2: int = Inputs.arg2
254
246
 
@@ -276,8 +268,8 @@ class MyAdditionNode(BaseNode):
276
268
 
277
269
  # AND the node should have the correct metadata
278
270
  node = nodes[0]
279
- assert node["label"] == "Addition Node"
271
+ assert node["label"] == "My Addition Node"
280
272
  assert node["description"] == "Custom node that performs simple addition."
281
273
  assert UUID(node["id"])
282
- assert node["module"] == "vellum_custom_nodes"
274
+ assert node["module"] == ["vellum_custom_nodes"]
283
275
  assert node["name"] == "MyAdditionNode"
@@ -17,6 +17,7 @@ from flask import Blueprint, Response, current_app as app, request, stream_with_
17
17
  from pydantic import ValidationError
18
18
 
19
19
  from vellum.workflows.nodes import BaseNode
20
+ from vellum.workflows.utils.names import pascal_to_title_case
20
21
  from workflow_server.config import MEMORY_LIMIT_MB
21
22
  from workflow_server.core.events import (
22
23
  STREAM_FINISHED_EVENT,
@@ -370,15 +371,15 @@ def get_version_route() -> tuple[dict, int]:
370
371
  for _, name, _ in pkgutil.iter_modules([custom_nodes_path]):
371
372
  try:
372
373
  module = importlib.import_module(f"{CUSTOM_NODES_DIRECTORY}.{name}")
373
- for _, obj in inspect.getmembers(module):
374
+ for label, obj in inspect.getmembers(module):
374
375
  # Look for classes that inherit from BaseNode
375
376
  if inspect.isclass(obj) and obj != BaseNode and issubclass(obj, BaseNode):
376
377
  nodes.append(
377
378
  {
378
379
  "id": str(uuid4()),
379
- "module": CUSTOM_NODES_DIRECTORY,
380
+ "module": CUSTOM_NODES_DIRECTORY.split("/"),
380
381
  "name": obj.__name__,
381
- "label": obj.label.instance if hasattr(obj, "label") else obj.__name__,
382
+ "label": pascal_to_title_case(label),
382
383
  "description": inspect.getdoc(obj) or "",
383
384
  }
384
385
  )