Skip to content

Commit 6012bb2

Browse files
authored
Merge pull request #170 from cadenmyers13/param-dep
Deprecate: deprecate all methods of `parameters.py`
2 parents 614d468 + ec2b2af commit 6012bb2

41 files changed

Lines changed: 461 additions & 212 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

news/param-dep.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
**Added:**
2+
3+
* Added ``is_constant`` method to ``Parameter``.
4+
* Added ``bound_range`` method to ``Parameter``.
5+
* Added ``bound_window`` method to ``Parameter``.
6+
7+
**Changed:**
8+
9+
* <news item>
10+
11+
**Deprecated:**
12+
13+
* Deprecated ``isConst`` method of ``Parameter``. Use ``is_constant`` instead.
14+
* Deprecated ``boundRange`` method of ``Parameter``. Use ``bound_range`` instead.
15+
* Deprecated ``boundWindow`` method of ``Parameter``. Use ``bound_window`` instead.
16+
17+
**Removed:**
18+
19+
* <news item>
20+
21+
**Fixed:**
22+
23+
* <news item>
24+
25+
**Security:**
26+
27+
* <news item>

src/diffpy/srfit/equation/builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def __eval_binary(self, other, OperatorClass, onleft=True):
493493
494494
Other can be an BaseBuilder or a constant.
495495
496-
Attributes
496+
Parameters
497497
----------
498498
onleft
499499
Indicates that the operator was passed on the left side
@@ -666,7 +666,7 @@ def __call__(self, *args):
666666
667667
This creates a new builder that encapsulates the operation.
668668
669-
Attributes
669+
Parameters
670670
----------
671671
args
672672
Arguments of the operation.
@@ -730,7 +730,7 @@ def wrapOperator(name, op):
730730
def wrapFunction(name, func, nin=2, nout=1):
731731
"""Wrap a function in an OperatorBuilder instance.
732732
733-
Attributes
733+
Parameters
734734
----------
735735
name
736736
The name of the function

src/diffpy/srfit/equation/equationmod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Equation(Operator):
9191
def __init__(self, name=None, root=None):
9292
"""Initialize.
9393
94-
Attributes
94+
Parameters
9595
----------
9696
name
9797
A name for this Equation.

src/diffpy/srfit/equation/literals/argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def getValue(self):
6262
def set_value(self, val):
6363
"""Set the value of the Literal.
6464
65-
Attributes
65+
Parameters
6666
----------
6767
val
6868
The value to assign

src/diffpy/srfit/equation/literals/operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def __init__(self, op):
347347
348348
Arguments
349349
350-
Attributes
350+
Parameters
351351
----------
352352
op
353353
A numpy ufunc

src/diffpy/srfit/equation/visitors/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
def getArgs(literal, getconsts=True):
3636
"""Get the Arguments of a Literal tree.
3737
38-
Attributes
38+
Parameters
3939
----------
4040
getconsts
4141
If True (default), then Arguments designated as constant
@@ -50,7 +50,7 @@ def getArgs(literal, getconsts=True):
5050
def getExpression(literal, eqskip=None):
5151
"""Get math expression string from the Literal tree object.
5252
53-
Attributes
53+
Parameters
5454
----------
5555
eqskip
5656
regular expression pattern for Equation objects that should

src/diffpy/srfit/equation/visitors/printer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
class Printer(Visitor):
3030
"""Printer for printing a Literal tree.
3131
32-
Attributes:
33-
3432
Attributes
3533
----------
3634
eqskip

src/diffpy/srfit/equation/visitors/swapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Swapper(Visitor):
3838
def __init__(self, oldlit, newlit):
3939
"""Initialize.
4040
41-
Attributes
41+
Parameters
4242
----------
4343
oldlit
4444
The literal to be replaced.

src/diffpy/srfit/fitbase/fitcontribution.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def __init__(self, name):
147147
def set_profile(self, profile, xname=None, yname=None, dyname=None):
148148
"""Assign the Profile for this FitContribution.
149149
150-
Attributes
150+
Parameters
151151
----------
152152
profile
153153
A Profile that specifies the calculation points and that
@@ -227,7 +227,7 @@ def add_profile_generator(self, gen, name=None):
227227
Calling addProfileGenerator sets the profile equation to call the
228228
calculator and if there is not a profile equation already.
229229
230-
Attributes
230+
Parameters
231231
----------
232232
gen
233233
A ProfileGenerator instance
@@ -278,7 +278,7 @@ def set_equation(self, eqstr, ns={}):
278278
for this FitContribution. The equation will be usable within
279279
set_residual_equation as "eq", and it takes no arguments.
280280
281-
Attributes
281+
Parameters
282282
----------
283283
eqstr
284284
A string representation of the equation. Any Parameter
@@ -353,7 +353,7 @@ def getEquation(self):
353353
def set_residual_equation(self, eqstr):
354354
"""Set the residual equation for the FitContribution.
355355
356-
Attributes
356+
Parameters
357357
----------
358358
eqstr
359359
A string representation of the residual. If eqstr is None

src/diffpy/srfit/fitbase/fithook.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def precall(self, recipe):
5858
"""This is called within FitRecipe.residual, before the
5959
calculation.
6060
61-
Attributes
61+
Parameters
6262
----------
6363
recipe
6464
The FitRecipe instance
@@ -69,7 +69,7 @@ def postcall(self, recipe, chiv):
6969
"""This is called within FitRecipe.residual, after the
7070
calculation.
7171
72-
Attributes
72+
Parameters
7373
----------
7474
recipe
7575
The FitRecipe instance
@@ -88,8 +88,6 @@ class PrintFitHook(FitHook):
8888
This FitHook prints out a running count of the number of times the residual
8989
has been called, or other information, based on the verbosity.
9090
91-
Attributes
92-
9391
Attributes
9492
----------
9593
count
@@ -127,7 +125,7 @@ def precall(self, recipe):
127125
"""This is called within FitRecipe.residual, before the
128126
calculation.
129127
130-
Attributes
128+
Parameters
131129
----------
132130
recipe
133131
The FitRecipe instance
@@ -141,7 +139,7 @@ def postcall(self, recipe, chiv):
141139
"""This is called within FitRecipe.residual, after the
142140
calculation.
143141
144-
Attributes
142+
Parameters
145143
----------
146144
recipe
147145
The FitRecipe instance
@@ -237,7 +235,7 @@ def postcall(self, recipe, chiv):
237235
238236
Find data and plot it.
239237
240-
Attributes
238+
Parameters
241239
----------
242240
recipe
243241
The FitRecipe instance

0 commit comments

Comments
 (0)