vellum-ai 0.14.15__py3-none-any.whl → 0.14.16__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.
@@ -15,16 +15,16 @@ class Inputs(BaseInputs):
15
15
  input: str
16
16
 
17
17
 
18
- class BasicGenericNode(BaseNode):
19
- pass
20
-
21
-
22
18
  def test_serialize_node__basic(serialize_node):
19
+ class BasicGenericNode(BaseNode):
20
+ pass
21
+
23
22
  serialized_node = serialize_node(BasicGenericNode)
23
+
24
24
  assert not DeepDiff(
25
25
  {
26
- "id": "c2ed23f7-f6cb-4a56-a91c-2e5f9d8fda7f",
27
- "label": "BasicGenericNode",
26
+ "id": "8d7cbfe4-72ca-4367-a401-8d28723d2f00",
27
+ "label": "test_serialize_node__basic.<locals>.BasicGenericNode",
28
28
  "type": "GENERIC",
29
29
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
30
30
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -40,10 +40,10 @@ def test_serialize_node__basic(serialize_node):
40
40
  "test_ports_serialization",
41
41
  ],
42
42
  },
43
- "trigger": {"id": "9d3a1b3d-4a38-4f2e-bbf1-dd8be152bce8", "merge_behavior": "AWAIT_ATTRIBUTES"},
43
+ "trigger": {"id": "be19c63b-3492-46b1-be9d-16f8d2e6410b", "merge_behavior": "AWAIT_ATTRIBUTES"},
44
44
  "ports": [
45
45
  {
46
- "id": "89dccfa5-cc1a-4612-bd87-86cb444f6dd4",
46
+ "id": "8bec8d0c-113f-4110-afcb-4a6e566e7236",
47
47
  "name": "default",
48
48
  "type": "DEFAULT",
49
49
  }
@@ -57,12 +57,11 @@ def test_serialize_node__basic(serialize_node):
57
57
  )
58
58
 
59
59
 
60
- class IfGenericNode(BaseNode):
61
- class Ports(BaseNode.Ports):
62
- if_branch = Port.on_if(Inputs.input.equals("hello"))
63
-
64
-
65
60
  def test_serialize_node__if(serialize_node):
61
+ class IfGenericNode(BaseNode):
62
+ class Ports(BaseNode.Ports):
63
+ if_branch = Port.on_if(Inputs.input.equals("hello"))
64
+
66
65
  input_id = uuid4()
67
66
  serialized_node = serialize_node(
68
67
  node_class=IfGenericNode, global_workflow_input_displays={Inputs.input: WorkflowInputsDisplay(id=input_id)}
@@ -70,8 +69,8 @@ def test_serialize_node__if(serialize_node):
70
69
 
71
70
  assert not DeepDiff(
72
71
  {
73
- "id": "31da54ae-1abb-4e9e-8a7d-6f4f30a78c72",
74
- "label": "IfGenericNode",
72
+ "id": "bba4b15a-dea0-48c9-a79b-4e12e99db00f",
73
+ "label": "test_serialize_node__if.<locals>.IfGenericNode",
75
74
  "type": "GENERIC",
76
75
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
77
76
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -87,10 +86,10 @@ def test_serialize_node__if(serialize_node):
87
86
  "test_ports_serialization",
88
87
  ],
89
88
  },
90
- "trigger": {"id": "a8afaebc-7333-4e3f-b221-24452b4a1d47", "merge_behavior": "AWAIT_ATTRIBUTES"},
89
+ "trigger": {"id": "abe5abf8-9678-4606-be71-3104efc25c74", "merge_behavior": "AWAIT_ATTRIBUTES"},
91
90
  "ports": [
92
91
  {
93
- "id": "d713e346-b55a-4871-91de-f1470bfb3479",
92
+ "id": "9889fe69-62f8-4bb3-aac6-425b75700bea",
94
93
  "type": "IF",
95
94
  "name": "if_branch",
96
95
  "expression": {
@@ -119,13 +118,12 @@ def test_serialize_node__if(serialize_node):
119
118
  )
120
119
 
121
120
 
122
- class IfElseGenericNode(BaseNode):
123
- class Ports(BaseNode.Ports):
124
- if_branch = Port.on_if(Inputs.input.equals("hello"))
125
- else_branch = Port.on_else()
126
-
127
-
128
121
  def test_serialize_node__if_else(serialize_node):
122
+ class IfElseGenericNode(BaseNode):
123
+ class Ports(BaseNode.Ports):
124
+ if_branch = Port.on_if(Inputs.input.equals("hello"))
125
+ else_branch = Port.on_else()
126
+
129
127
  input_id = uuid4()
130
128
  serialized_node = serialize_node(
131
129
  node_class=IfElseGenericNode, global_workflow_input_displays={Inputs.input: WorkflowInputsDisplay(id=input_id)}
@@ -133,8 +131,8 @@ def test_serialize_node__if_else(serialize_node):
133
131
 
134
132
  assert not DeepDiff(
135
133
  {
136
- "id": "1f499f82-8cc0-4060-bf4d-d20ac409d4aa",
137
- "label": "IfElseGenericNode",
134
+ "id": "25c9c3f1-4014-47ac-90cf-5216de10d05c",
135
+ "label": "test_serialize_node__if_else.<locals>.IfElseGenericNode",
138
136
  "type": "GENERIC",
139
137
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
140
138
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -150,10 +148,10 @@ def test_serialize_node__if_else(serialize_node):
150
148
  "test_ports_serialization",
151
149
  ],
152
150
  },
153
- "trigger": {"id": "5b4f6553-69ca-4844-bbe4-9e5594bc8cae", "merge_behavior": "AWAIT_ATTRIBUTES"},
151
+ "trigger": {"id": "b5ef0133-0605-495f-a229-169d7490cd07", "merge_behavior": "AWAIT_ATTRIBUTES"},
154
152
  "ports": [
155
153
  {
156
- "id": "1b02eabf-f2bd-45bd-ab26-fe4034ed5978",
154
+ "id": "6fd9edea-9c1f-4463-aeb9-bfdde3231ee0",
157
155
  "type": "IF",
158
156
  "name": "if_branch",
159
157
  "expression": {
@@ -173,7 +171,7 @@ def test_serialize_node__if_else(serialize_node):
173
171
  },
174
172
  },
175
173
  {
176
- "id": "2c858834-8f65-4b6b-89d8-07b394764666",
174
+ "id": "7f9ea016-22da-49b3-be46-b80fb96beedf",
177
175
  "type": "ELSE",
178
176
  "name": "else_branch",
179
177
  "expression": None,
@@ -187,23 +185,23 @@ def test_serialize_node__if_else(serialize_node):
187
185
  )
188
186
 
189
187
 
190
- class IfElifElseGenericNode(BaseNode):
191
- class Ports(BaseNode.Ports):
192
- if_branch = Port.on_if(Inputs.input.equals("hello"))
193
- elif_branch = Port.on_elif(Inputs.input.equals("world"))
194
- else_branch = Port.on_else()
195
-
196
-
197
188
  def test_serialize_node__if_elif_else(serialize_node):
189
+ class IfElifElseGenericNode(BaseNode):
190
+ class Ports(BaseNode.Ports):
191
+ if_branch = Port.on_if(Inputs.input.equals("hello"))
192
+ elif_branch = Port.on_elif(Inputs.input.equals("world"))
193
+ else_branch = Port.on_else()
194
+
198
195
  input_id = uuid4()
199
196
  serialized_node = serialize_node(
200
197
  node_class=IfElifElseGenericNode,
201
198
  global_workflow_input_displays={Inputs.input: WorkflowInputsDisplay(id=input_id)},
202
199
  )
200
+
203
201
  assert not DeepDiff(
204
202
  {
205
- "id": "21c49bfb-a90c-4565-a4e6-8eb5187e81ca",
206
- "label": "IfElifElseGenericNode",
203
+ "id": "7b2b9cfc-12aa-432c-940d-cbe53e71de9c",
204
+ "label": "test_serialize_node__if_elif_else.<locals>.IfElifElseGenericNode",
207
205
  "type": "GENERIC",
208
206
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
209
207
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -219,10 +217,10 @@ def test_serialize_node__if_elif_else(serialize_node):
219
217
  "test_ports_serialization",
220
218
  ],
221
219
  },
222
- "trigger": {"id": "22d55b5b-3545-4498-8658-9d0464202e78", "merge_behavior": "AWAIT_ATTRIBUTES"},
220
+ "trigger": {"id": "d41d03f1-36f3-4cfe-ac9f-0f79a918a810", "merge_behavior": "AWAIT_ATTRIBUTES"},
223
221
  "ports": [
224
222
  {
225
- "id": "dcaa1d8e-01c6-48b4-a851-8828b49d0f57",
223
+ "id": "19a1cc62-1f18-49b0-8026-7c82709e34db",
226
224
  "type": "IF",
227
225
  "name": "if_branch",
228
226
  "expression": {
@@ -242,7 +240,7 @@ def test_serialize_node__if_elif_else(serialize_node):
242
240
  },
243
241
  },
244
242
  {
245
- "id": "e00351f8-f1f9-4f7b-bf7a-c24e3db40d6c",
243
+ "id": "dc0b680e-d7b3-4a44-a37d-df22b310bda3",
246
244
  "type": "ELIF",
247
245
  "name": "elif_branch",
248
246
  "expression": {
@@ -262,7 +260,7 @@ def test_serialize_node__if_elif_else(serialize_node):
262
260
  },
263
261
  },
264
262
  {
265
- "id": "90caeb67-5ab7-46aa-b65e-01c27f549eed",
263
+ "id": "16d0b698-1353-4eb3-9768-4a6e5ed4b1da",
266
264
  "type": "ELSE",
267
265
  "expression": None,
268
266
  "name": "else_branch",
@@ -276,21 +274,18 @@ def test_serialize_node__if_elif_else(serialize_node):
276
274
  )
277
275
 
278
276
 
279
- class NodeWithOutput(BaseNode):
280
- class Outputs(BaseNode.Outputs):
281
- output = Inputs.input
282
-
283
-
284
- class NodeWithOutputDisplay(BaseNodeDisplay[NodeWithOutput]):
285
- pass
286
-
277
+ def test_serialize_node__node_output_reference(serialize_node):
278
+ class NodeWithOutput(BaseNode):
279
+ class Outputs(BaseNode.Outputs):
280
+ output = Inputs.input
287
281
 
288
- class GenericNodeReferencingOutput(BaseNode):
289
- class Ports(BaseNode.Ports):
290
- if_branch = Port.on_if(NodeWithOutput.Outputs.output.equals("hello"))
282
+ class NodeWithOutputDisplay(BaseNodeDisplay[NodeWithOutput]):
283
+ pass
291
284
 
285
+ class GenericNodeReferencingOutput(BaseNode):
286
+ class Ports(BaseNode.Ports):
287
+ if_branch = Port.on_if(NodeWithOutput.Outputs.output.equals("hello"))
292
288
 
293
- def test_serialize_node__node_output_reference(serialize_node):
294
289
  workflow_input_id = uuid4()
295
290
  node_output_id = uuid4()
296
291
  serialized_node = serialize_node(
@@ -304,8 +299,8 @@ def test_serialize_node__node_output_reference(serialize_node):
304
299
 
305
300
  assert not DeepDiff(
306
301
  {
307
- "id": "c1e2ce60-ac3a-4b17-915e-abe861734e03",
308
- "label": "GenericNodeReferencingOutput",
302
+ "id": "ac067acc-6a6f-44b1-ae84-428e965ce691",
303
+ "label": "test_serialize_node__node_output_reference.<locals>.GenericNodeReferencingOutput",
309
304
  "type": "GENERIC",
310
305
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
311
306
  "definition": {
@@ -321,17 +316,17 @@ def test_serialize_node__node_output_reference(serialize_node):
321
316
  ],
322
317
  },
323
318
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
324
- "trigger": {"id": "449072ba-f7b6-4314-ac96-682123f225e5", "merge_behavior": "AWAIT_ATTRIBUTES"},
319
+ "trigger": {"id": "e949426f-9f3c-425e-a4de-8c0c5f6a8945", "merge_behavior": "AWAIT_ATTRIBUTES"},
325
320
  "ports": [
326
321
  {
327
- "id": "eecccf2b-82af-4559-8a1b-0c5de5890ac2",
322
+ "id": "500075dc-fc65-428a-b3c0-a410f8c7f8cf",
328
323
  "type": "IF",
329
324
  "name": "if_branch",
330
325
  "expression": {
331
326
  "type": "BINARY_EXPRESSION",
332
327
  "lhs": {
333
328
  "type": "NODE_OUTPUT",
334
- "node_id": "cd954d76-0b0a-4d9b-9bdf-347179c38cb6",
329
+ "node_id": "21213d1e-991c-405a-b4fa-a1e01c4dd088",
335
330
  "node_output_id": str(node_output_id),
336
331
  },
337
332
  "operator": "=",
@@ -354,12 +349,11 @@ def test_serialize_node__node_output_reference(serialize_node):
354
349
  )
355
350
 
356
351
 
357
- class GenericNodeReferencingSecret(BaseNode):
358
- class Ports(BaseNode.Ports):
359
- if_branch = Port.on_if(VellumSecretReference(name="hello").equals("hello"))
360
-
361
-
362
352
  def test_serialize_node__vellum_secret_reference(serialize_node):
353
+ class GenericNodeReferencingSecret(BaseNode):
354
+ class Ports(BaseNode.Ports):
355
+ if_branch = Port.on_if(VellumSecretReference(name="hello").equals("hello"))
356
+
363
357
  workflow_input_id = uuid4()
364
358
  serialized_node = serialize_node(
365
359
  node_class=GenericNodeReferencingSecret,
@@ -368,8 +362,8 @@ def test_serialize_node__vellum_secret_reference(serialize_node):
368
362
 
369
363
  assert not DeepDiff(
370
364
  {
371
- "id": "88272edd-fc81-403b-bb87-a116ef8f269e",
372
- "label": "GenericNodeReferencingSecret",
365
+ "id": "feb4b331-e25f-4a5c-9840-c5575b1efd5c",
366
+ "label": "test_serialize_node__vellum_secret_reference.<locals>.GenericNodeReferencingSecret",
373
367
  "type": "GENERIC",
374
368
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
375
369
  "definition": {
@@ -385,10 +379,10 @@ def test_serialize_node__vellum_secret_reference(serialize_node):
385
379
  ],
386
380
  },
387
381
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
388
- "trigger": {"id": "2709539b-352d-455a-bb86-dba070b59aa1", "merge_behavior": "AWAIT_ATTRIBUTES"},
382
+ "trigger": {"id": "d762741b-c137-4df4-ade6-65f31ea5a624", "merge_behavior": "AWAIT_ATTRIBUTES"},
389
383
  "ports": [
390
384
  {
391
- "id": "b6387c9c-2cce-4667-9567-97e433503e72",
385
+ "id": "3b6b4048-8622-446d-9772-2766357d7b18",
392
386
  "type": "IF",
393
387
  "name": "if_branch",
394
388
  "expression": {
@@ -414,20 +408,17 @@ def test_serialize_node__vellum_secret_reference(serialize_node):
414
408
  )
415
409
 
416
410
 
417
- class NodeWithExecutions(BaseNode):
418
- pass
419
-
420
-
421
- class NodeWithExecutionsDisplay(BaseNodeDisplay[NodeWithExecutions]):
422
- pass
423
-
411
+ def test_serialize_node__execution_count_reference(serialize_node):
412
+ class NodeWithExecutions(BaseNode):
413
+ pass
424
414
 
425
- class GenericNodeReferencingExecutions(BaseNode):
426
- class Ports(BaseNode.Ports):
427
- if_branch = Port.on_if(NodeWithExecutions.Execution.count.equals(5))
415
+ class NodeWithExecutionsDisplay(BaseNodeDisplay[NodeWithExecutions]):
416
+ pass
428
417
 
418
+ class GenericNodeReferencingExecutions(BaseNode):
419
+ class Ports(BaseNode.Ports):
420
+ if_branch = Port.on_if(NodeWithExecutions.Execution.count.equals(5))
429
421
 
430
- def test_serialize_node__execution_count_reference(serialize_node):
431
422
  workflow_input_id = uuid4()
432
423
  serialized_node = serialize_node(
433
424
  node_class=GenericNodeReferencingExecutions,
@@ -437,8 +428,8 @@ def test_serialize_node__execution_count_reference(serialize_node):
437
428
 
438
429
  assert not DeepDiff(
439
430
  {
440
- "id": "6e4d2fb7-891e-492e-97a1-adf44693f518",
441
- "label": "GenericNodeReferencingExecutions",
431
+ "id": "0b4fe8a6-6d0c-464e-9372-10110e2b0e13",
432
+ "label": "test_serialize_node__execution_count_reference.<locals>.GenericNodeReferencingExecutions",
442
433
  "type": "GENERIC",
443
434
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
444
435
  "definition": {
@@ -454,17 +445,17 @@ def test_serialize_node__execution_count_reference(serialize_node):
454
445
  ],
455
446
  },
456
447
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
457
- "trigger": {"id": "68a91426-4c30-4194-a4c0-cff224d3c0f3", "merge_behavior": "AWAIT_ATTRIBUTES"},
448
+ "trigger": {"id": "d6aa7eec-6f01-41c5-9f5c-d50c53259527", "merge_behavior": "AWAIT_ATTRIBUTES"},
458
449
  "ports": [
459
450
  {
460
- "id": "13ab561e-09c9-48ed-b22b-a4de4d9df887",
451
+ "id": "79d0cfa3-c8f9-4434-a2f8-5e416d66437a",
461
452
  "type": "IF",
462
453
  "name": "if_branch",
463
454
  "expression": {
464
455
  "type": "BINARY_EXPRESSION",
465
456
  "lhs": {
466
457
  "type": "EXECUTION_COUNTER",
467
- "node_id": "c09bd5a6-dc04-4036-90d4-580acd43c71f",
458
+ "node_id": "235c66f9-c76b-4df0-9bff-cfba2ef1ad18",
468
459
  },
469
460
  "operator": "=",
470
461
  "rhs": {
@@ -486,12 +477,11 @@ def test_serialize_node__execution_count_reference(serialize_node):
486
477
  )
487
478
 
488
479
 
489
- class NullGenericNode(BaseNode):
490
- class Ports(BaseNode.Ports):
491
- if_branch = Port.on_if(Inputs.input.is_null())
492
-
493
-
494
480
  def test_serialize_node__null(serialize_node):
481
+ class NullGenericNode(BaseNode):
482
+ class Ports(BaseNode.Ports):
483
+ if_branch = Port.on_if(Inputs.input.is_null())
484
+
495
485
  input_id = uuid4()
496
486
  serialized_node = serialize_node(
497
487
  node_class=NullGenericNode, global_workflow_input_displays={Inputs.input: WorkflowInputsDisplay(id=input_id)}
@@ -499,8 +489,8 @@ def test_serialize_node__null(serialize_node):
499
489
 
500
490
  assert not DeepDiff(
501
491
  {
502
- "id": "d5fe72cd-a2bd-4f91-ae13-44e4c617815e",
503
- "label": "NullGenericNode",
492
+ "id": "1838ce1f-9c07-4fd0-9fd4-2a3a841ea402",
493
+ "label": "test_serialize_node__null.<locals>.NullGenericNode",
504
494
  "type": "GENERIC",
505
495
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
506
496
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -516,10 +506,10 @@ def test_serialize_node__null(serialize_node):
516
506
  "test_ports_serialization",
517
507
  ],
518
508
  },
519
- "trigger": {"id": "26b257ed-6a7d-4ca3-a5c8-d17ba1e776ba", "merge_behavior": "AWAIT_ATTRIBUTES"},
509
+ "trigger": {"id": "f4dcf8a3-692c-4b7c-8625-1a54eaa16ff2", "merge_behavior": "AWAIT_ATTRIBUTES"},
520
510
  "ports": [
521
511
  {
522
- "id": "76a2867d-dd4c-409c-b97f-94b168a2233a",
512
+ "id": "7f1fb75d-0c8b-4ebc-8c59-4ae68f1a68e1",
523
513
  "type": "IF",
524
514
  "name": "if_branch",
525
515
  "expression": {
@@ -541,16 +531,14 @@ def test_serialize_node__null(serialize_node):
541
531
  )
542
532
 
543
533
 
544
- class IntegerInputs(BaseInputs):
545
- input: int
546
-
547
-
548
- class BetweenGenericNode(BaseNode):
549
- class Ports(BaseNode.Ports):
550
- if_branch = Port.on_if(IntegerInputs.input.between(1, 10))
534
+ def test_serialize_node__between(serialize_node):
535
+ class IntegerInputs(BaseInputs):
536
+ input: int
551
537
 
538
+ class BetweenGenericNode(BaseNode):
539
+ class Ports(BaseNode.Ports):
540
+ if_branch = Port.on_if(IntegerInputs.input.between(1, 10))
552
541
 
553
- def test_serialize_node__between(serialize_node):
554
542
  input_id = uuid4()
555
543
  serialized_node = serialize_node(
556
544
  node_class=BetweenGenericNode,
@@ -559,8 +547,8 @@ def test_serialize_node__between(serialize_node):
559
547
 
560
548
  assert not DeepDiff(
561
549
  {
562
- "id": "3ef33a2a-6ad5-415c-be75-f38cc1403dfc",
563
- "label": "BetweenGenericNode",
550
+ "id": "f2f5a1f2-a12d-4ce0-bfe9-42190ffe5328",
551
+ "label": "test_serialize_node__between.<locals>.BetweenGenericNode",
564
552
  "type": "GENERIC",
565
553
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
566
554
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -576,10 +564,10 @@ def test_serialize_node__between(serialize_node):
576
564
  "test_ports_serialization",
577
565
  ],
578
566
  },
579
- "trigger": {"id": "086a355e-d9ef-4039-af35-9f1211497b32", "merge_behavior": "AWAIT_ATTRIBUTES"},
567
+ "trigger": {"id": "12f79444-890b-4e5e-93b6-6c0efaee40db", "merge_behavior": "AWAIT_ATTRIBUTES"},
580
568
  "ports": [
581
569
  {
582
- "id": "71493245-0778-46f2-8bda-863af50d910d",
570
+ "id": "b745c089-1023-46dc-b2b6-ba75ac37563a",
583
571
  "type": "IF",
584
572
  "name": "if_branch",
585
573
  "expression": {
@@ -615,12 +603,12 @@ def test_serialize_node__between(serialize_node):
615
603
  )
616
604
 
617
605
 
618
- class OrGenericNode(BaseNode):
619
- class Ports(BaseNode.Ports):
620
- if_branch = Port.on_if(Inputs.input.equals("hello") | Inputs.input.equals("world"))
606
+ def test_serialize_node__or(serialize_node):
621
607
 
608
+ class OrGenericNode(BaseNode):
609
+ class Ports(BaseNode.Ports):
610
+ if_branch = Port.on_if(Inputs.input.equals("hello") | Inputs.input.equals("world"))
622
611
 
623
- def test_serialize_node__or(serialize_node):
624
612
  input_id = uuid4()
625
613
  serialized_node = serialize_node(
626
614
  node_class=OrGenericNode, global_workflow_input_displays={Inputs.input: WorkflowInputsDisplay(id=input_id)}
@@ -628,8 +616,8 @@ def test_serialize_node__or(serialize_node):
628
616
 
629
617
  assert not DeepDiff(
630
618
  {
631
- "id": "63900268-b9d0-4285-8ea4-7c478f4abf88",
632
- "label": "OrGenericNode",
619
+ "id": "5386abad-3378-4378-b3a8-831b4b77dc23",
620
+ "label": "test_serialize_node__or.<locals>.OrGenericNode",
633
621
  "type": "GENERIC",
634
622
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
635
623
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -645,10 +633,10 @@ def test_serialize_node__or(serialize_node):
645
633
  "test_ports_serialization",
646
634
  ],
647
635
  },
648
- "trigger": {"id": "dc245f37-9be7-4097-a50a-4f7196e24313", "merge_behavior": "AWAIT_ATTRIBUTES"},
636
+ "trigger": {"id": "fb39e80b-4032-4538-83e4-59480b1ef7ff", "merge_behavior": "AWAIT_ATTRIBUTES"},
649
637
  "ports": [
650
638
  {
651
- "id": "9b4511aa-2d57-44f9-8156-d41dd8b5f98e",
639
+ "id": "0bd64819-b866-4333-82e0-8ac672c09b79",
652
640
  "type": "IF",
653
641
  "name": "if_branch",
654
642
  "expression": {
@@ -696,14 +684,13 @@ def test_serialize_node__or(serialize_node):
696
684
  )
697
685
 
698
686
 
699
- class AndThenOrGenericNode(BaseNode):
700
- class Ports(BaseNode.Ports):
701
- if_branch = Port.on_if(
702
- Inputs.input.equals("hello") & Inputs.input.equals("then") | Inputs.input.equals("world")
703
- )
704
-
705
-
706
687
  def test_serialize_node__and_then_or(serialize_node):
688
+ class AndThenOrGenericNode(BaseNode):
689
+ class Ports(BaseNode.Ports):
690
+ if_branch = Port.on_if(
691
+ Inputs.input.equals("hello") & Inputs.input.equals("then") | Inputs.input.equals("world")
692
+ )
693
+
707
694
  input_id = uuid4()
708
695
  serialized_node = serialize_node(
709
696
  node_class=AndThenOrGenericNode,
@@ -712,8 +699,8 @@ def test_serialize_node__and_then_or(serialize_node):
712
699
 
713
700
  assert not DeepDiff(
714
701
  {
715
- "id": "b3908206-e540-4dac-9c64-a2e12b847b15",
716
- "label": "AndThenOrGenericNode",
702
+ "id": "4d3995b1-437b-48d9-8878-9f57a8b725f1",
703
+ "label": "test_serialize_node__and_then_or.<locals>.AndThenOrGenericNode",
717
704
  "type": "GENERIC",
718
705
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
719
706
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -729,10 +716,10 @@ def test_serialize_node__and_then_or(serialize_node):
729
716
  "test_ports_serialization",
730
717
  ],
731
718
  },
732
- "trigger": {"id": "33cfa8f4-bfc5-40b3-8df8-ab86371c26e0", "merge_behavior": "AWAIT_ATTRIBUTES"},
719
+ "trigger": {"id": "b2b040de-9fba-4204-a6a5-e17f6ab321b1", "merge_behavior": "AWAIT_ATTRIBUTES"},
733
720
  "ports": [
734
721
  {
735
- "id": "91174ae5-6ce0-4f6c-9c05-ecfbfb4058f6",
722
+ "id": "8bb89da2-a752-4541-8f90-1276c44910a8",
736
723
  "type": "IF",
737
724
  "name": "if_branch",
738
725
  "expression": {
@@ -799,14 +786,13 @@ def test_serialize_node__and_then_or(serialize_node):
799
786
  )
800
787
 
801
788
 
802
- class ParenthesizedAndThenOrGenericNode(BaseNode):
803
- class Ports(BaseNode.Ports):
804
- if_branch = Port.on_if(
805
- Inputs.input.equals("hello") & (Inputs.input.equals("then") | Inputs.input.equals("world"))
806
- )
807
-
808
-
809
789
  def test_serialize_node__parenthesized_and_then_or(serialize_node):
790
+ class ParenthesizedAndThenOrGenericNode(BaseNode):
791
+ class Ports(BaseNode.Ports):
792
+ if_branch = Port.on_if(
793
+ Inputs.input.equals("hello") & (Inputs.input.equals("then") | Inputs.input.equals("world"))
794
+ )
795
+
810
796
  input_id = uuid4()
811
797
  serialized_node = serialize_node(
812
798
  node_class=ParenthesizedAndThenOrGenericNode,
@@ -815,8 +801,8 @@ def test_serialize_node__parenthesized_and_then_or(serialize_node):
815
801
 
816
802
  assert not DeepDiff(
817
803
  {
818
- "id": "6ed0373a-13b1-4edb-b0c4-31642cf312f8",
819
- "label": "ParenthesizedAndThenOrGenericNode",
804
+ "id": "223864c9-0088-4c05-9b7d-e5b1c9ec936d",
805
+ "label": "test_serialize_node__parenthesized_and_then_or.<locals>.ParenthesizedAndThenOrGenericNode",
820
806
  "type": "GENERIC",
821
807
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
822
808
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -832,10 +818,10 @@ def test_serialize_node__parenthesized_and_then_or(serialize_node):
832
818
  "test_ports_serialization",
833
819
  ],
834
820
  },
835
- "trigger": {"id": "91ac3b05-c931-4a4c-bb48-c2ba0e883867", "merge_behavior": "AWAIT_ATTRIBUTES"},
821
+ "trigger": {"id": "bfd1504d-f642-431d-a900-28b0709bd65c", "merge_behavior": "AWAIT_ATTRIBUTES"},
836
822
  "ports": [
837
823
  {
838
- "id": "915f923b-f398-48af-93a4-5f7e66b8aa76",
824
+ "id": "30478083-924d-469e-ad55-df28bc282cdb",
839
825
  "type": "IF",
840
826
  "name": "if_branch",
841
827
  "expression": {
@@ -902,14 +888,13 @@ def test_serialize_node__parenthesized_and_then_or(serialize_node):
902
888
  )
903
889
 
904
890
 
905
- class OrThenAndGenericNode(BaseNode):
906
- class Ports(BaseNode.Ports):
907
- if_branch = Port.on_if(
908
- Inputs.input.equals("hello") | Inputs.input.equals("then") & Inputs.input.equals("world")
909
- )
910
-
911
-
912
891
  def test_serialize_node__or_then_and(serialize_node):
892
+ class OrThenAndGenericNode(BaseNode):
893
+ class Ports(BaseNode.Ports):
894
+ if_branch = Port.on_if(
895
+ Inputs.input.equals("hello") | Inputs.input.equals("then") & Inputs.input.equals("world")
896
+ )
897
+
913
898
  input_id = uuid4()
914
899
  serialized_node = serialize_node(
915
900
  node_class=OrThenAndGenericNode,
@@ -918,8 +903,8 @@ def test_serialize_node__or_then_and(serialize_node):
918
903
 
919
904
  assert not DeepDiff(
920
905
  {
921
- "id": "a0e0a35b-132e-4168-ad7d-ceb04f3203f2",
922
- "label": "OrThenAndGenericNode",
906
+ "id": "a946342e-4ede-4e96-8e3d-f396748d9f7c",
907
+ "label": "test_serialize_node__or_then_and.<locals>.OrThenAndGenericNode",
923
908
  "type": "GENERIC",
924
909
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
925
910
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -935,10 +920,10 @@ def test_serialize_node__or_then_and(serialize_node):
935
920
  "test_ports_serialization",
936
921
  ],
937
922
  },
938
- "trigger": {"id": "dfa53d32-36cc-4b1d-adad-d4de21ac1e5a", "merge_behavior": "AWAIT_ATTRIBUTES"},
923
+ "trigger": {"id": "9c59699a-edf9-4618-b6bc-1074f3bfae78", "merge_behavior": "AWAIT_ATTRIBUTES"},
939
924
  "ports": [
940
925
  {
941
- "id": "413bba3d-6a16-4f96-ba45-b5372f819277",
926
+ "id": "7f442cce-0b99-482c-aec8-8eed6ccadde2",
942
927
  "type": "IF",
943
928
  "name": "if_branch",
944
929
  "expression": {
@@ -1005,12 +990,12 @@ def test_serialize_node__or_then_and(serialize_node):
1005
990
  )
1006
991
 
1007
992
 
1008
- class ParseJsonGenericNode(BaseNode):
1009
- class Ports(BaseNode.Ports):
1010
- if_branch = Port.on_if(Inputs.input.parse_json().equals({"key": "value"}))
993
+ def test_serialize_node__parse_json(serialize_node):
1011
994
 
995
+ class ParseJsonGenericNode(BaseNode):
996
+ class Ports(BaseNode.Ports):
997
+ if_branch = Port.on_if(Inputs.input.parse_json().equals({"key": "value"}))
1012
998
 
1013
- def test_serialize_node__parse_json(serialize_node):
1014
999
  input_id = uuid4()
1015
1000
  serialized_node = serialize_node(
1016
1001
  node_class=ParseJsonGenericNode,
@@ -1019,8 +1004,8 @@ def test_serialize_node__parse_json(serialize_node):
1019
1004
 
1020
1005
  assert not DeepDiff(
1021
1006
  {
1022
- "id": "60edd9b2-9bad-470f-832c-c5f1aa9a253e",
1023
- "label": "ParseJsonGenericNode",
1007
+ "id": "bfc3f81b-242a-4f43-9e1c-648223d77768",
1008
+ "label": "test_serialize_node__parse_json.<locals>.ParseJsonGenericNode",
1024
1009
  "type": "GENERIC",
1025
1010
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
1026
1011
  "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
@@ -1036,10 +1021,10 @@ def test_serialize_node__parse_json(serialize_node):
1036
1021
  "test_ports_serialization",
1037
1022
  ],
1038
1023
  },
1039
- "trigger": {"id": "0ccc19cb-174b-440b-8d08-6c84c571fb8f", "merge_behavior": "AWAIT_ATTRIBUTES"},
1024
+ "trigger": {"id": "1d3287e2-cc05-49d2-be99-150320264f24", "merge_behavior": "AWAIT_ATTRIBUTES"},
1040
1025
  "ports": [
1041
1026
  {
1042
- "id": "abe1e6db-14df-4d3c-b059-d17933ab8c02",
1027
+ "id": "5a88bac8-89b3-4d81-b539-2f977a36a9c0",
1043
1028
  "type": "IF",
1044
1029
  "name": "if_branch",
1045
1030
  "expression": {