Skip to content

Commit 0c5f1ff

Browse files
committed
Merge remote-tracking branch 'origin/docs_fix' into simulator_clean
# Conflicts: # spinnaker_graph_front_end/__init__.py
2 parents a1b7fb3 + 9442214 commit 0c5f1ff

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

spinnaker_graph_front_end/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,22 +273,22 @@ def add_socket_address(database_ack_port_num: Optional[int],
273273

274274
def get_number_of_available_cores_on_machine() -> int:
275275
"""
276-
Get the number of cores on this machine that are available to the
276+
:returns: The number of cores on this machine that are available to the
277277
simulation.
278278
"""
279279
return __get_simulator().get_number_of_available_cores_on_machine
280280

281281

282282
def has_ran() -> bool:
283283
"""
284-
Get whether the simulation has already run.
284+
:returns: True if and only if the simulation has already run.
285285
"""
286286
return FecDataView.is_ran_ever()
287287

288288

289289
def routing_infos() -> RoutingInfo:
290290
"""
291-
Get information about how messages are routed on the machine.
291+
:returns: The information about how messages are routed on the machine.
292292
"""
293293
return FecDataView.get_routing_infos()
294294

@@ -319,21 +319,21 @@ def placements() -> Never:
319319

320320
def tags() -> Tags:
321321
"""
322-
Get the IPTAGs allocated on the machine.
322+
:returns: The IPTAGs allocated on the machine.
323323
"""
324324
return FecDataView.get_tags()
325325

326326

327327
def buffer_manager() -> BufferManager:
328328
"""
329-
Get the buffer manager being used for loading/extracting buffers.
329+
:returns: The buffer manager being used for loading/extracting buffers.
330330
"""
331331
return FecDataView.get_buffer_manager()
332332

333333

334334
def machine() -> Machine:
335335
"""
336-
Get the model of the attached/allocated machine.
336+
:returns: The model of the attached/allocated machine.
337337
"""
338338
logger.warning(
339339
"If you are getting the machine object to locate how many cores you "
@@ -346,7 +346,7 @@ def machine() -> Machine:
346346

347347
def is_allocated_machine() -> bool:
348348
"""
349-
Get whether a machine is allocated.
349+
:return: True if and only if a machine is allocated.
350350
"""
351351
return FecDataView.has_machine()
352352

spinnaker_graph_front_end/utilities/simulator_vertex.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ def generate_recording_region(
135135
:param spec: The data specification being built
136136
:param region_id:
137137
Which region is the recording region.
138+
:param channel_sizes: List of int being the number of regions
139+
and then for each region its size then two zeros
138140
"""
139141
spec.reserve_memory_region(
140142
region=region_id,

unittests/test_doc_checker.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,26 @@ def test_doc_checks(self) -> None:
3131
abs_class_file = os.path.abspath(class_file)
3232
unittest_dir = os.path.dirname(abs_class_file)
3333
repo_dir = os.path.dirname(unittest_dir)
34+
35+
# Don't force examples to have docs in inits
3436
checker = DocsChecker(
35-
check_init=False, # 13 errors in 12 files
36-
check_short=False, # in dependencies
37-
check_params=False, # 4 errors in 2 files
38-
check_returns=False, # 8 errors in 1 files
39-
check_properties=False # in dependencies
37+
check_init=False,
38+
check_short=True,
39+
check_params=True,
40+
check_returns=True,
41+
check_properties=True
4042
)
4143
checker.check_dir(repo_dir)
4244
checker.check_no_errors()
45+
46+
# strict tests for main code
47+
code_dir = os.path.join(repo_dir, "spinnaker_graph_front_end")
48+
checker2 = DocsChecker(
49+
check_init=True,
50+
check_short=True,
51+
check_params=True,
52+
check_returns=True,
53+
check_properties=True
54+
)
55+
checker2.check_dir(code_dir)
56+
checker2.check_no_errors()

0 commit comments

Comments
 (0)