Skip to content

Commit 1812522

Browse files
authored
Update CADET-Python example in documentation (#378)
This commit: - Updates `returncode` to `return_code` as per CADEt-Python v1.0 - Clarifies slightly how users should configure `Cadet.cadet_path`. - Fixes a spelling mistake I saw in the comments.
1 parent fe69383 commit 1812522

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/developer_guide/examples/breakthrough.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import matplotlib.pyplot as plt
44

55
from cadet import Cadet
6-
Cadet.cadet_path = '/path/to/cadet-cli'
6+
Cadet.cadet_path = '/path/to/cadet-core/install/prefix' # (e.g., '/usr/local')
77

88
# Create model object
99
model = Cadet()
@@ -123,14 +123,14 @@
123123

124124
data = model.run()
125125

126-
if data.returncode == 0:
126+
if data.return_code == 0:
127127
print("Simulation completed successfully")
128128
model.load()
129129
else:
130130
print(data)
131131
raise Exception("Simulation failed")
132132

133-
# Plot restuls
133+
# Plot results
134134
plt.figure()
135135

136136
time = model.root.output.solution.solution_times

0 commit comments

Comments
 (0)