Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: putting Data node example code above #319

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading