Skip to content

Commit

Permalink
Merge pull request #319 from C-Accel-CRIPT/update-data-docs
Browse files Browse the repository at this point in the history
Docs: putting `Data` node example code above
  • Loading branch information
nh916 authored Sep 6, 2023
2 parents 977a5f7 + c74d6ba commit 7dc567c
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions src/cript/nodes/primary_nodes/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,23 @@ def __init__(
**kwargs
) -> None:
"""
Examples
--------
```python
# create file nodes for the data node
my_file = cript.File(
source="https://pubs.acs.org/doi/suppl/10.1021/acscentsci.3c00011/suppl_file/oc3c00011_si_001.pdf",
type="calibration",
extension=".pdf",
)
# create data node and add the file node to it
my_data = cript.Data(
name="my data node name",
type="afm_amp",
file=my_file,
)
```
Parameters
----------
Expand All @@ -130,24 +147,6 @@ def __init__(
kwargs
used for deserializing JSON into Python SDK nodes
Examples
--------
```python
# create file nodes for the data node
my_file = cript.File(
source="https://pubs.acs.org/doi/suppl/10.1021/acscentsci.3c00011/suppl_file/oc3c00011_si_001.pdf",
type="calibration",
extension=".pdf",
)
# create data node and add the file node to it
my_data = cript.Data(
name="my data node name",
type="afm_amp",
file=my_file,
)
```
Returns
-------
None
Expand Down

0 comments on commit 7dc567c

Please sign in to comment.