Skip to content

Commit

Permalink
added project.material doctest
Browse files Browse the repository at this point in the history
added comments to documentation code example doctest, not sure how I feel about it
  • Loading branch information
nh916 committed Sep 27, 2023
1 parent eb4968e commit 0ae5d0e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/cript/nodes/primary_nodes/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,14 @@ def material(self) -> List[Material]:
Examples
--------
```python
identifier = [{"alternative_names": "my material alternative name"}]
my_material = cript.Material(name="my material", identifier=identifier)
my_project.material = [my_material]
```
>>> import cript
>>> # create project node
>>> my_project = cript.Project(name="my Project name")
>>> # create material node
>>> identifier = [{"bigsmiles": "my big smiles"}]
>>> my_material = cript.Material(name="my material", identifier=identifier)
>>> # add material node to project node
>>> my_project.material = [my_material]
Returns
-------
Expand Down

0 comments on commit 0ae5d0e

Please sign in to comment.