Skip to content

Process

Process

Bases: PrimaryBaseNode

Definition

The process node contains a list of ingredients, quantities, and procedure information for an experimental material transformation (chemical and physical).

Attributes
attribute type example description required vocab
type str mix type of process True True
ingredient list[Ingredient] ingredients
description str To oven-dried 20 mL glass vial, 5 mL of styrene and 10 ml of toluene was added. explanation of the process
equipment list[Equipment] equipment used in the process
product list[Material] desired material produced from the process
waste list[Material] material sent to waste
prerequisite_ processes list[Process] processes that must be completed prior to the start of this process
condition list[Condition] global process condition
property list[Property] process properties
keyword list[str] words that classify the process True
citation list[Citation] reference to a book, paper, or scholarly work
notes str miscellaneous information, or custom data structure
Can be added to
Available Subobjects
JSON Representation
{
   "name":"my minimal process name",
   "node":["Process"],
   "type":"affinity_pure",
   "keyword":[],
   "uid":"_:f8ef33f3-677a-40f3-b24e-65ab2c99d796",
   "uuid":"f8ef33f3-677a-40f3-b24e-65ab2c99d796"
}
Source code in src/cript/nodes/primary_nodes/process.py
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
class Process(PrimaryBaseNode):
    """
    ## Definition
    The process node contains a list of [ingredients](../../subobjects/ingredient),
    [quantities](../../subobjects/quantity), and procedure information for an experimental
    [material](../material) transformation (chemical and physical).

    ## Attributes

    | attribute               | type             | example                                                                         | description                                                         | required | vocab |
    |-------------------------|------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------|----------|-------|
    | type                    | str              | mix                                                                             | type of process                                                     | True     | True  |
    | ingredient              | list[Ingredient] |                                                                                 | ingredients                                                         |          |       |
    | description             | str              | To oven-dried 20 mL glass vial, 5 mL of styrene and 10 ml of toluene was added. | explanation of the process                                          |          |       |
    | equipment               | list[Equipment]  |                                                                                 | equipment used in the process                                       |          |       |
    | product                 | list[Material]   |                                                                                 | desired material produced from the process                          |          |       |
    | waste                   | list[Material]   |                                                                                 | material sent to waste                                              |          |       |
    | prerequisite_ processes | list[Process]    |                                                                                 | processes that must be completed prior to the start of this process |          |       |
    | condition               | list[Condition]  |                                                                                 | global process condition                                            |          |       |
    | property                | list[Property]   |                                                                                 | process properties                                                  |          |       |
    | keyword                 | list[str]        |                                                                                 | words that classify the process                                     |          | True  |
    | citation                | list[Citation]   |                                                                                 | reference to a book, paper, or scholarly work                       |          |       |
    | notes                   | str              |                                                                                 | miscellaneous information, or custom data structure                 |          |       |

    ## Can be added to
    * [Experiment](../experiment)

    ## Available Subobjects
    * [Ingredient](../../subobjects/ingredient)
    * [Equipment](../../subobjects/equipment)
    * [Property](../../subobjects/property)
    * [Condition](../../subobjects/condition)
    * [Citation](../../subobjects/citation)

    ## JSON Representation
    ```json
    {
       "name":"my minimal process name",
       "node":["Process"],
       "type":"affinity_pure",
       "keyword":[],
       "uid":"_:f8ef33f3-677a-40f3-b24e-65ab2c99d796",
       "uuid":"f8ef33f3-677a-40f3-b24e-65ab2c99d796"
    }
    ```
    """

    @dataclass(frozen=True)
    class JsonAttributes(PrimaryBaseNode.JsonAttributes):
        """
        all Process attributes
        """

        type: str = ""
        # TODO add proper typing in future, using Any for now to avoid circular import error
        ingredient: List[Union[Any, UIDProxy]] = field(default_factory=list)
        description: str = ""
        equipment: List[Union[Any, UIDProxy]] = field(default_factory=list)
        product: List[Union[Any, UIDProxy]] = field(default_factory=list)
        waste: List[Union[Any, UIDProxy]] = field(default_factory=list)
        prerequisite_process: List[Union["Process", UIDProxy]] = field(default_factory=list)
        condition: List[Union[Any, UIDProxy]] = field(default_factory=list)
        property: List[Union[Any, UIDProxy]] = field(default_factory=list)
        keyword: List[str] = field(default_factory=list)
        citation: List[Union[Any, UIDProxy]] = field(default_factory=list)

    _json_attrs: JsonAttributes = JsonAttributes()

    @beartype
    def __init__(
        self,
        name: str,
        type: str,
        ingredient: Optional[List[Union[Any, UIDProxy]]] = None,
        description: str = "",
        equipment: Optional[List[Union[Any, UIDProxy]]] = None,
        product: Optional[List[Union[Any, UIDProxy]]] = None,
        waste: Optional[List[Union[Any, UIDProxy]]] = None,
        prerequisite_process: Optional[List[Union["Process", UIDProxy]]] = None,
        condition: Optional[List[Union[Any, UIDProxy]]] = None,
        property: Optional[List[Union[Any, UIDProxy]]] = None,
        keyword: Optional[List[str]] = None,
        citation: Optional[List[Union[Any, UIDProxy]]] = None,
        notes: str = "",
        **kwargs
    ) -> None:
        """
        create a process node

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")

        Parameters
        ----------
        ingredient: List[Ingredient]
            [ingredient](../../subobjects/ingredient) used in this process
        type: str = ""
            Process type must come from
            [CRIPT Controlled vocabulary process type](https://app.criptapp.org/vocab/process_type/)
        description: str = ""
            description of this process
        equipment: List[Equipment] = None
            list of [equipment](../../subobjects/equipment) used in this process
        product: List[Material] = None
            product that this process created
        waste: List[Material] = None
            waste that this process created
        condition: List[Condition] = None
            list of [condition](../../subobjects/condition) that this process was created under
        property: List[Property] = None
            list of [properties](../../subobjects/property) for this process
        keyword: List[str] = None
            list of keywords for this process must come from
            [CRIPT process keyword controlled keyword](https://app.criptapp.org/vocab/process_keyword/)
        citation: List[Citation] = None
            list of [citation](../../subobjects/citation)

        Returns
        -------
        None
            instantiate a process node
        """

        if ingredient is None:
            ingredient = []

        if equipment is None:
            equipment = []

        if product is None:
            product = []

        if waste is None:
            waste = []

        if prerequisite_process is None:
            prerequisite_process = []

        if condition is None:
            condition = []

        if property is None:
            property = []

        if keyword is None:
            keyword = []

        if citation is None:
            citation = []

        super().__init__(name=name, notes=notes, **kwargs)

        new_attrs = replace(
            self._json_attrs,
            ingredient=ingredient,
            type=type,
            description=description,
            equipment=equipment,
            product=product,
            waste=waste,
            condition=condition,
            prerequisite_process=prerequisite_process,
            property=property,
            keyword=keyword,
            citation=citation,
        )
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def type(self) -> str:
        """
        [Process type](https://app.criptapp.org/vocab/process_type) must come from the CRIPT controlled vocabulary

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_process.type = "affinity_pure"

        Returns
        -------
        str
            Select a [Process type](https://app.criptapp.org/vocab/process_type/) from CRIPT controlled vocabulary
        """
        return self._json_attrs.type

    @type.setter
    @beartype
    def type(self, new_process_type: str) -> None:
        """
        set process type from CRIPT controlled vocabulary

        Parameters
        ----------
        new_process_type: str
            new process type from CRIPT controlled vocabulary

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, type=new_process_type)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def ingredient(self) -> List[Any]:
        """
        List of [ingredient](../../subobjects/ingredient) for this process

        Examples
        ---------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_material = cript.Material(name="my material", bigsmiles = "material bigsmiles")
        >>> my_quantity = cript.Quantity(
        ...     key="mass", value=11.2, unit="kg", uncertainty=0.2, uncertainty_type="stdev"
        ... )
        >>> my_ingredient = cript.Ingredient(
        ...     material=my_material, quantity=[my_quantity], keyword=["catalyst"]
        ... )
        >>> my_process.ingredient = [my_ingredient]

        Returns
        -------
        List[Ingredient]
            list of ingredients for this process
        """
        return self._json_attrs.ingredient.copy()

    @ingredient.setter
    @beartype
    def ingredient(self, new_ingredient_list: List[Any]) -> None:
        """
        set the list of the ingredients for this process

        Parameters
        ----------
        new_ingredient_list
            list of ingredients to replace the current list

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, ingredient=new_ingredient_list)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def description(self) -> str:
        """
        description of this process

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_process.description = "To oven-dried 20 mL glass vial, 5 mL of styrene and 10 ml of toluene was added"

        Returns
        -------
        str
            description of this process
        """
        return self._json_attrs.description

    @description.setter
    @beartype
    def description(self, new_description: str) -> None:
        """
        set the description of this process

        Parameters
        ----------
        new_description: str
            new process description to replace the current one

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, description=new_description)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def equipment(self) -> List[Any]:
        """
        List of [equipment](../../subobjects/equipment) used for this process

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_equipment = cript.Equipment(key="burner")
        >>> my_process.equipment = [my_equipment]

        Returns
        -------
        List[Equipment]
            list of equipment used for this process
        """
        return self._json_attrs.equipment.copy()

    @equipment.setter
    @beartype
    def equipment(self, new_equipment_list: List[Any]) -> None:
        """
        set the list of equipment used for this process

        Parameters
        ----------
        new_equipment_list
            new equipment list to replace the current equipment list for this process

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, equipment=new_equipment_list)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def product(self) -> List[Any]:
        """
        List of product (material nodes) for this process

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_product_material = cript.Material(
        ...     name="my product material",
        ...     amino_acid = "my material product amino_acid",
        ... )
        >>> my_process.product = [my_product_material]

        Returns
        -------
        List[Material]
            List of process product (Material nodes)
        """
        return self._json_attrs.product.copy()

    @product.setter
    @beartype
    def product(self, new_product_list: List[Any]) -> None:
        """
        set the product list for this process

        Parameters
        ----------
        new_product_list: List[Material]
            replace the current list of process product

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, product=new_product_list)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def waste(self) -> List[Any]:
        """
        List of waste that resulted from this process

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_waste_material = cript.Material(
        ...     name="my waste material",
        ...     bigsmiles = "123456",
        ... )
        >>> my_process.waste = [my_waste_material]

        Returns
        -------
        List[Material]
            list of waste materials that resulted from this product
        """
        return self._json_attrs.waste.copy()

    @waste.setter
    @beartype
    def waste(self, new_waste_list: List[Any]) -> None:
        """
        set the list of waste (Material node) for that resulted from this process

        Parameters
        ----------
        new_waste_list: List[Material]
            replace the list waste that resulted from this process

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, waste=new_waste_list)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def prerequisite_process(self) -> List[Union["Process", UIDProxy]]:
        """
        list of prerequisite process nodes

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_prerequisite_process = [
        ...     cript.Process(name="prerequisite processes 1", type="blow_molding"),
        ...     cript.Process(name="prerequisite processes 2", type="centrifugation"),
        ... ]
        >>> my_process.prerequisite_process = my_prerequisite_process

        Returns
        -------
        List[Process]
            list of process that had to happen before this process
        """
        return self._json_attrs.prerequisite_process.copy()

    @prerequisite_process.setter
    @beartype
    def prerequisite_process(self, new_prerequisite_process_list: List[Union["Process", UIDProxy]]) -> None:
        """
        set the prerequisite_process for the process node

        Parameters
        ----------
        new_prerequisite_process_list: List["Process"]

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, prerequisite_process=new_prerequisite_process_list)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def condition(self) -> List[Any]:
        """
        List of condition present for this process

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_condition = cript.Condition(key="atm", type="min", value=1)
        >>> my_process.condition = [my_condition]

        Returns
        -------
        List[Condition]
            list of condition for this process node
        """
        return self._json_attrs.condition.copy()

    @condition.setter
    @beartype
    def condition(self, new_condition_list: List[Any]) -> None:
        """
        set the list of condition for this process

        Parameters
        ----------
        new_condition_list: List[Condition]
            replace the condition list
        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, condition=new_condition_list)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def keyword(self) -> List[str]:
        """
        List of keyword for this process
        [Process keyword](https://app.criptapp.org/vocab/process_keyword/) must come from CRIPT controlled vocabulary

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_process.keyword = ["self_assembly"]

        Returns
        -------
        List[str]
            list of keywords for this process nod
        """
        return self._json_attrs.keyword.copy()  # type: ignore

    @keyword.setter
    @beartype
    def keyword(self, new_keyword_list: List[str]) -> None:
        """
        set the list of keyword for this process from CRIPT controlled vocabulary

        Parameters
        ----------
        new_keyword_list: List[str]
            replace the current list of keyword

        Returns
        -------
        None
        """
        # TODO validate with CRIPT controlled vocabulary
        new_attrs = replace(self._json_attrs, keyword=new_keyword_list)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def citation(self) -> List[Any]:
        """
        List of [citation](../subobjects/citation.md) for this process

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_reference = cript.Reference(type="journal_article", title="'Living' Polymers")
        >>> my_citation = cript.Citation(type="derived_from", reference=my_reference)
        >>> my_process.citation = [my_citation]

        Returns
        -------
        List[Citation]
            list of citation for this process node
        """
        return self._json_attrs.citation.copy()

    @citation.setter
    @beartype
    def citation(self, new_citation_list: List[Any]) -> None:
        """
        set the list of citation for this process

        Parameters
        ----------
        new_citation_list: List[Citation]
            replace the current list of citation

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, citation=new_citation_list)
        self._update_json_attrs_if_valid(new_attrs)

    @property
    @beartype
    def property(self) -> List[Any]:
        """
        List of [Property nodes](../../subobjects/property) for this process

        Examples
        --------
        >>> import cript
        >>> my_process = cript.Process(name="my process name", type="affinity_pure")
        >>> my_property = cript.Property(key="enthalpy", type="min", value=1.23, unit="J")
        >>> my_process.property = [my_property]

        Returns
        -------
        List[Property]
            list of properties for this process
        """
        return self._json_attrs.property.copy()

    @property.setter
    @beartype
    def property(self, new_property_list: List[Any]) -> None:
        """
        set the list of Property nodes for this process

        Parameters
        ----------
        new_property_list: List[Property]
            replace the current list of properties

        Returns
        -------
        None
        """
        new_attrs = replace(self._json_attrs, property=new_property_list)
        self._update_json_attrs_if_valid(new_attrs)

citation: List[Any] property writable

List of citation for this process

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_reference = cript.Reference(type="journal_article", title="'Living' Polymers")
>>> my_citation = cript.Citation(type="derived_from", reference=my_reference)
>>> my_process.citation = [my_citation]

Returns:

Type Description
List[Citation]

list of citation for this process node

condition: List[Any] property writable

List of condition present for this process

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_condition = cript.Condition(key="atm", type="min", value=1)
>>> my_process.condition = [my_condition]

Returns:

Type Description
List[Condition]

list of condition for this process node

description: str property writable

description of this process

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_process.description = "To oven-dried 20 mL glass vial, 5 mL of styrene and 10 ml of toluene was added"

Returns:

Type Description
str

description of this process

equipment: List[Any] property writable

List of equipment used for this process

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_equipment = cript.Equipment(key="burner")
>>> my_process.equipment = [my_equipment]

Returns:

Type Description
List[Equipment]

list of equipment used for this process

ingredient: List[Any] property writable

List of ingredient for this process

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_material = cript.Material(name="my material", bigsmiles = "material bigsmiles")
>>> my_quantity = cript.Quantity(
...     key="mass", value=11.2, unit="kg", uncertainty=0.2, uncertainty_type="stdev"
... )
>>> my_ingredient = cript.Ingredient(
...     material=my_material, quantity=[my_quantity], keyword=["catalyst"]
... )
>>> my_process.ingredient = [my_ingredient]

Returns:

Type Description
List[Ingredient]

list of ingredients for this process

keyword: List[str] property writable

List of keyword for this process Process keyword must come from CRIPT controlled vocabulary

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_process.keyword = ["self_assembly"]

Returns:

Type Description
List[str]

list of keywords for this process nod

prerequisite_process: List[Union[Process, UIDProxy]] property writable

list of prerequisite process nodes

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_prerequisite_process = [
...     cript.Process(name="prerequisite processes 1", type="blow_molding"),
...     cript.Process(name="prerequisite processes 2", type="centrifugation"),
... ]
>>> my_process.prerequisite_process = my_prerequisite_process

Returns:

Type Description
List[Process]

list of process that had to happen before this process

product: List[Any] property writable

List of product (material nodes) for this process

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_product_material = cript.Material(
...     name="my product material",
...     amino_acid = "my material product amino_acid",
... )
>>> my_process.product = [my_product_material]

Returns:

Type Description
List[Material]

List of process product (Material nodes)

property: List[Any] property writable

List of Property nodes for this process

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_property = cript.Property(key="enthalpy", type="min", value=1.23, unit="J")
>>> my_process.property = [my_property]

Returns:

Type Description
List[Property]

list of properties for this process

type: str property writable

Process type must come from the CRIPT controlled vocabulary

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_process.type = "affinity_pure"

Returns:

Type Description
str

Select a Process type from CRIPT controlled vocabulary

waste: List[Any] property writable

List of waste that resulted from this process

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")
>>> my_waste_material = cript.Material(
...     name="my waste material",
...     bigsmiles = "123456",
... )
>>> my_process.waste = [my_waste_material]

Returns:

Type Description
List[Material]

list of waste materials that resulted from this product

JsonAttributes dataclass

Bases: JsonAttributes

all Process attributes

Source code in src/cript/nodes/primary_nodes/process.py
@dataclass(frozen=True)
class JsonAttributes(PrimaryBaseNode.JsonAttributes):
    """
    all Process attributes
    """

    type: str = ""
    # TODO add proper typing in future, using Any for now to avoid circular import error
    ingredient: List[Union[Any, UIDProxy]] = field(default_factory=list)
    description: str = ""
    equipment: List[Union[Any, UIDProxy]] = field(default_factory=list)
    product: List[Union[Any, UIDProxy]] = field(default_factory=list)
    waste: List[Union[Any, UIDProxy]] = field(default_factory=list)
    prerequisite_process: List[Union["Process", UIDProxy]] = field(default_factory=list)
    condition: List[Union[Any, UIDProxy]] = field(default_factory=list)
    property: List[Union[Any, UIDProxy]] = field(default_factory=list)
    keyword: List[str] = field(default_factory=list)
    citation: List[Union[Any, UIDProxy]] = field(default_factory=list)

__init__(name, type, ingredient=None, description='', equipment=None, product=None, waste=None, prerequisite_process=None, condition=None, property=None, keyword=None, citation=None, notes='', **kwargs)

create a process node

Examples:

>>> import cript
>>> my_process = cript.Process(name="my process name", type="affinity_pure")

Parameters:

Name Type Description Default
ingredient Optional[List[Union[Any, UIDProxy]]]

ingredient used in this process

None
type str

Process type must come from CRIPT Controlled vocabulary process type

required
description str

description of this process

''
equipment Optional[List[Union[Any, UIDProxy]]]

list of equipment used in this process

None
product Optional[List[Union[Any, UIDProxy]]]

product that this process created

None
waste Optional[List[Union[Any, UIDProxy]]]

waste that this process created

None
condition Optional[List[Union[Any, UIDProxy]]]

list of condition that this process was created under

None
property Optional[List[Union[Any, UIDProxy]]]

list of properties for this process

None
keyword Optional[List[str]]

list of keywords for this process must come from CRIPT process keyword controlled keyword

None
citation Optional[List[Union[Any, UIDProxy]]]

list of citation

None

Returns:

Type Description
None

instantiate a process node

Source code in src/cript/nodes/primary_nodes/process.py
@beartype
def __init__(
    self,
    name: str,
    type: str,
    ingredient: Optional[List[Union[Any, UIDProxy]]] = None,
    description: str = "",
    equipment: Optional[List[Union[Any, UIDProxy]]] = None,
    product: Optional[List[Union[Any, UIDProxy]]] = None,
    waste: Optional[List[Union[Any, UIDProxy]]] = None,
    prerequisite_process: Optional[List[Union["Process", UIDProxy]]] = None,
    condition: Optional[List[Union[Any, UIDProxy]]] = None,
    property: Optional[List[Union[Any, UIDProxy]]] = None,
    keyword: Optional[List[str]] = None,
    citation: Optional[List[Union[Any, UIDProxy]]] = None,
    notes: str = "",
    **kwargs
) -> None:
    """
    create a process node

    Examples
    --------
    >>> import cript
    >>> my_process = cript.Process(name="my process name", type="affinity_pure")

    Parameters
    ----------
    ingredient: List[Ingredient]
        [ingredient](../../subobjects/ingredient) used in this process
    type: str = ""
        Process type must come from
        [CRIPT Controlled vocabulary process type](https://app.criptapp.org/vocab/process_type/)
    description: str = ""
        description of this process
    equipment: List[Equipment] = None
        list of [equipment](../../subobjects/equipment) used in this process
    product: List[Material] = None
        product that this process created
    waste: List[Material] = None
        waste that this process created
    condition: List[Condition] = None
        list of [condition](../../subobjects/condition) that this process was created under
    property: List[Property] = None
        list of [properties](../../subobjects/property) for this process
    keyword: List[str] = None
        list of keywords for this process must come from
        [CRIPT process keyword controlled keyword](https://app.criptapp.org/vocab/process_keyword/)
    citation: List[Citation] = None
        list of [citation](../../subobjects/citation)

    Returns
    -------
    None
        instantiate a process node
    """

    if ingredient is None:
        ingredient = []

    if equipment is None:
        equipment = []

    if product is None:
        product = []

    if waste is None:
        waste = []

    if prerequisite_process is None:
        prerequisite_process = []

    if condition is None:
        condition = []

    if property is None:
        property = []

    if keyword is None:
        keyword = []

    if citation is None:
        citation = []

    super().__init__(name=name, notes=notes, **kwargs)

    new_attrs = replace(
        self._json_attrs,
        ingredient=ingredient,
        type=type,
        description=description,
        equipment=equipment,
        product=product,
        waste=waste,
        condition=condition,
        prerequisite_process=prerequisite_process,
        property=property,
        keyword=keyword,
        citation=citation,
    )
    self._update_json_attrs_if_valid(new_attrs)