From c74d6ba20ffc122ce2e397cc4cd95af1faad8e4a Mon Sep 17 00:00:00 2001 From: nh916 Date: Wed, 6 Sep 2023 10:07:16 -0700 Subject: [PATCH] putting the example `Data` node creation at top --- src/cript/nodes/primary_nodes/data.py | 35 +++++++++++++-------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/cript/nodes/primary_nodes/data.py b/src/cript/nodes/primary_nodes/data.py index 299f209d4..d9a9905fc 100644 --- a/src/cript/nodes/primary_nodes/data.py +++ b/src/cript/nodes/primary_nodes/data.py @@ -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 ---------- @@ -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