Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs/tutorials/simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ ana = cript.Computation.create(
!!! note
Notice the use of `create()` here, which instantiates and saves the object in one go.

### Create and upload Files
### Create and Upload Files
First, we'll instantiate our File nodes.
``` py
packing_file = cript.File(project=proj, source="path/to/local/file")
Expand Down Expand Up @@ -177,7 +177,7 @@ forcefield_data = cript.Data.create(
type = "computation_forcefield",
files = [forcefield_file],
computations = [init],
notes = "Full forcefield defintiona and topology.",
notes = "Full forcefield definition and topology.",
)
equi_snap = cript.Data.create(
experiment = expt,
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/synthesis.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ prcs.save()
```

### Create a File node and upload a file
First, we'll instantiate a File node and associate with the Data node created above.
First, we'll instantiate a File node and associate it with the Data node created above.
``` py
path = "path/to/local/file"
f = cript.File(project=proj, source=path)
Expand Down Expand Up @@ -217,7 +217,7 @@ Next, we'll add the Data node to the new Property node.
``` py
mw_n.data = sec
```
Last, we'll add the new Property node to polystyrene then save it.
Last, we'll add the new Property node to polystyrene and then save it.
``` py
polystyrene.add_property(mw_n)
polystyrene.save()
Expand Down
2 changes: 1 addition & 1 deletion src/cript/api/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def post(self, url: str, data: str = None, valid_codes: list = [201]):
return json.loads(response.content)

@beartype
def put(self, url: str, data: str = None,valid_codes: list = [200]):
def put(self, url: str, data: str = None, valid_codes: list = [200]):
"""Performs an HTTP PUT request and handles errors."""
url = convert_to_api_url(url)
response = self.session.put(url=url, data=data)
Expand Down
3 changes: 1 addition & 2 deletions src/cript/data_model/nodes/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def save(self, get_level: int = 1, update_existing: bool = False):
"""
api = get_cached_api_session(self.url)


# Create a new object via POST
response = api.post(
url=f"{api.url}/{self.slug}/",
Expand All @@ -87,4 +86,4 @@ def save(self, get_level: int = 1, update_existing: bool = False):

set_node_attributes(self, response)
self._generate_nested_nodes(get_level=get_level)
logger.info(f"{self.node_name} node has been saved to the database.")
logger.info(f"{self.node_name} node has been saved to the database.")