Skip to content

Commit 997f0a7

Browse files
committed
review fixes
1 parent b8bf460 commit 997f0a7

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

RATapi/classlist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def _determine_class_handle(input_list: Sequence[T]):
535535
Returns
536536
-------
537537
class_handle : type
538-
The type object of the first element which is a subcalss of all of the other
538+
The type object of the first element which is a subclass of all of the other
539539
elements, or the first element if no such element exists.
540540
541541
"""

RATapi/examples/domains/domains_standard_layers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ def domains_standard_layers():
99
Domains standard layers projects proceed in much the same way as a normal standard layers problem,
1010
except that there is an additional grouping step between layers and contrasts.
1111
12-
Layers are grouped into ‘Domain Contrasts’.
13-
The model for the actual experimental contrast is built from these domain contrasts rather than from layers.
14-
There are exactly two domains for each contrast,
15-
with the the ratio of them controlled by a fittable ‘domain ratio’ parameter.
12+
Layers are grouped into ‘Domain Contrasts’. The model for the actual experimental contrast
13+
is built from these domain contrasts rather than from layers. There are exactly
14+
two domains for each contrast, with the the ratio of them controlled by
15+
a fittable ‘domain ratio’ parameter.
1616
"""
1717
problem = RAT.Project(calculation="domains")
1818

RATapi/inputs.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ def make_problem(project: RATapi.Project) -> ProblemDefinition:
161161
----------
162162
project : RAT.Project
163163
The project model, which defines the physical system under study.
164-
checks : RAT.rat_core.Checks
165-
States whether or not to fit each parameter defined in the project.
166-
167164
168165
Returns
169166
-------
@@ -439,7 +436,7 @@ def make_data_present(project: RATapi.Project) -> list[int]:
439436

440437

441438
def check_indices(problem: ProblemDefinition) -> None:
442-
"""Check the indices a problem's contrast lists lie within the range of the corresponding parameter lists.
439+
"""Check the indices given in a problem's contrasts lie within the range of the corresponding parameter lists.
443440
444441
Parameters
445442
----------

RATapi/project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ def check_contrasts(cls, value: ClassList, info: ValidationInfo):
360360
def model_post_init(self, __context: Any) -> None:
361361
"""Set up the Class to protect against disallowed modification.
362362
363-
We initialise the class handle in the ClassLists for empty data fields, sets protected parameters, get names of
364-
all defined parameters, determines the contents of the "model" field in contrasts,
365-
and wraps ClassList routines to control revalidation.
363+
We initialise the class handle in the ClassLists for empty data fields, set protected parameters, get names of
364+
all defined parameters, determine the contents of the "model" field in contrasts,
365+
and wrap ClassList routines to control revalidation.
366366
"""
367367
# Ensure all ClassLists have the correct _class_handle defined
368368
for field in (fields := self.model_fields):

RATapi/utils/enums.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ def _missing_(cls, value: Union[int, str]):
101101
return super()._missing_(value)
102102

103103
def __int__(self):
104-
"""Convert the DE strategy to its hardcoded index in the internal code."""
105-
# as RAT core expects strategy as an integer
104+
"""Convert the DE strategy to its hardcoded index in the internal code.
105+
106+
RAT core expects strategy to be an integer, as this is how it is given to
107+
the internal DE algorithm.
108+
"""
106109
return list(Strategies).index(self) + 1
107110

108111

@@ -130,7 +133,7 @@ class TypeOptions(RATEnum):
130133
"""A uniform constant signal given by a parameter."""
131134

132135
Data = "data"
133-
"""A signal given in the dataset for the contrast."""
136+
"""A signal for each q-value given by a dataset."""
134137

135138
Function = "function"
136139
"""A signal defined by a custom function."""

0 commit comments

Comments
 (0)