|
18 | 18 | from diffpy.srfit.fitbase.fitrecipe import FitRecipe |
19 | 19 | from diffpy.srfit.fitbase.fitresults import FitResults |
20 | 20 | from diffpy.srfit.fitbase.profile import Profile |
| 21 | +from diffpy.utils._deprecator import build_deprecation_message, deprecated |
| 22 | + |
| 23 | +base = "diffpy.srfit.fitbase.simplerecipe.SimpleRecipe" |
| 24 | +removal_version = "4.0.0" |
| 25 | + |
| 26 | +loadParsedData_dep_msg = build_deprecation_message( |
| 27 | + base, |
| 28 | + "loadParsedData", |
| 29 | + "load_parsed_data", |
| 30 | + removal_version, |
| 31 | +) |
21 | 32 |
|
22 | 33 |
|
23 | 34 | class SimpleRecipe(FitRecipe): |
@@ -109,12 +120,23 @@ def __init__(self, name="fit", conclass=FitContribution): |
109 | 120 | return |
110 | 121 |
|
111 | 122 | # Profile methods |
112 | | - def loadParsedData(self, parser): |
| 123 | + def load_parsed_data(self, parser): |
113 | 124 | """Load parsed data from a ProfileParser. |
114 | 125 |
|
115 | 126 | This sets the xobs, yobs, dyobs arrays as well as the metadata. |
116 | 127 | """ |
117 | | - return self.profile.loadParsedData(parser) |
| 128 | + return self.profile.load_parsed_data(parser) |
| 129 | + |
| 130 | + @deprecated(loadParsedData_dep_msg) |
| 131 | + def loadParsedData(self, parser): |
| 132 | + """This function has been deprecated and will be removed in version |
| 133 | + 4.0.0. |
| 134 | +
|
| 135 | + Please use |
| 136 | + diffpy.srfit.fitbase.simplerecipe.SimpleRecipe.load_parsed_data |
| 137 | + instead. |
| 138 | + """ |
| 139 | + return self.load_parsed_data(parser) |
118 | 140 |
|
119 | 141 | def setObservedProfile(self, xobs, yobs, dyobs=None): |
120 | 142 | """Set the observed profile. |
|
0 commit comments