Skip to content

Commit 44b1f82

Browse files
committed
Update documentation
1 parent e5b5ddb commit 44b1f82

File tree

4 files changed

+9
-51
lines changed

4 files changed

+9
-51
lines changed

docs/source/modules.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ API
3838
API/utils/iteration_control
3939
API/utils/function_wraps
4040
API/utils/episode_info
41+
API/utils/mixins
42+
API/utils/reward_manager
43+
API/utils/serial_hierarchy
4144

4245

4346

src/utils/mixins.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
"""
1+
"""module mixins.
22
Various mixin classes to use for simplifying code
3+
34
"""
45

56
import numpy as np

src/utils/reward_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Module reward_manager specifies a class that handles
1+
"""module reward_manager specifies a class that handles
22
the rewards awarded by the environment.
33
44
"""

src/utils/serial_hierarchy.py

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,12 @@
1-
"""
2-
A SerialHierarchy represents a hierarchy of transformations
1+
"""module serial_hierarchy. A SerialHierarchy represents a hierarchy of transformations
32
that are applied one after the other
3+
44
"""
55

66
from typing import List, Any
7-
from src.utils.hierarchy_base import HierarchyBase
8-
9-
10-
class SerialtHierarchyIterator(object):
11-
"""
12-
SerialtHierarchyIterator class. Helper class to iterate over a
13-
SerialHierarchy object
14-
"""
15-
16-
def __init__(self, values: List):
17-
self.current_position = 0
18-
self.values = values
19-
20-
@property
21-
def at(self) -> Any:
22-
"""
23-
Returns the value of the iterator at the current position
24-
without incrementing the position of the iterator
25-
:return: Any
26-
"""
27-
return self.values[self.current_position]
28-
29-
@property
30-
def finished(self) -> bool:
31-
"""
32-
Returns true if the iterator is exhausted
33-
:return:
34-
"""
35-
return self.current_position >= len(self.values)
36-
37-
def __next__(self):
38-
39-
if self.current_position < len(self.values):
40-
result = self.values[self.current_position]
41-
self.current_position += 1
42-
return result
43-
44-
raise StopIteration
45-
46-
def __len__(self):
47-
"""
48-
Returns the total number of items in the iterator
49-
:return:
50-
"""
51-
return len(self.values)
527

538

54-
class SerialHierarchy(HierarchyBase):
9+
class SerialHierarchy(object):
5510

5611
"""
5712
A SerialHierarchy represents a hierarchy of transformations
@@ -66,7 +21,6 @@ def __init__(self, values: dict) -> None:
6621
list of the ensuing transformations.
6722
:param values:
6823
"""
69-
super(SerialHierarchy, self).__init__()
7024
self.hierarchy: dict = values
7125

7226
def __getitem__(self, item):

0 commit comments

Comments
 (0)