From d9be4e15720d23859b2dd72d0fc0cb7da0ad4f44 Mon Sep 17 00:00:00 2001 From: Viktor Vorobev <vorobev@in.tum.de> Date: Thu, 15 Apr 2021 12:15:08 +0000 Subject: [PATCH] Merged in NRRPLT-8242-fix-docstrings (pull request #30) [NRRPLT-8242] Fix docstrings Approved-by: Ugo Albanese Approved-by: Eloy Retamino --- .../cle/DistributedPyNNCommunicationAdapter.py | 10 +++++----- .../hbp_nrp_distributed_nest/launch/DaintLauncher.py | 3 ++- .../launch/DistributedCLEProcess.py | 2 +- .../launch/DistributedCLESimulationAssembly.py | 2 +- .../hbp_nrp_distributed_nest/launch/MPILauncher.py | 8 ++++---- .../launch/NestBrainProcess.py | 8 ++++---- .../hbp_nrp_distributed_nest/launch/NestLauncher.py | 8 ++++---- 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/cle/DistributedPyNNCommunicationAdapter.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/cle/DistributedPyNNCommunicationAdapter.py index f4c790b..48719ec 100644 --- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/cle/DistributedPyNNCommunicationAdapter.py +++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/cle/DistributedPyNNCommunicationAdapter.py @@ -130,10 +130,10 @@ class DistributedPyNNCommunicationAdapter(PyNNNestCommunicationAdapter): Notify remote MPI Brain Processes that they must complete this transfer function connection by duplicating the parameters for this device connection. - :param kind Either 'source' or 'sink'. - :param populations The target population to connect to. - :param device The device to create. - :param params The dictionary of adapter params to use. + :param kind: Either 'source' or 'sink'. + :param populations: The target population to connect to. + :param device: The device to create. + :param params: The dictionary of adapter params to use. """ # timestamp the adapter creation, we have no other way of tracking it between @@ -190,7 +190,7 @@ class DistributedPyNNCommunicationAdapter(PyNNNestCommunicationAdapter): Notify remote MPI Brain Processes that they must delete transfer function connection by duplicating the calls in this process. - :param timestep The creation timestep of the TF to delete. + :param timestep: The creation timestep of the TF to delete. """ # propagate the deletion configuration to all other processes, guaranteed to be diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DaintLauncher.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DaintLauncher.py index e15b26f..cfdc2be 100644 --- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DaintLauncher.py +++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DaintLauncher.py @@ -58,6 +58,7 @@ class DaintLauncher(object): def add_host(self, hostname, tmpdir, processes=1): """ Ignore add_host in daint. Slurm (srun) manages this internally + :param hostname: ignored :param tmpdir: ignored :param processes: ignored @@ -204,7 +205,7 @@ class DaintLauncher(object): progress bar. Wait for completion of the CLE loading task and mark the MPI process as successfully launched. - :param msg The ros message to parse. + :param msg: The ros message to parse. """ status = json.loads(msg.data) diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLEProcess.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLEProcess.py index 6149f07..0da750d 100644 --- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLEProcess.py +++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLEProcess.py @@ -45,7 +45,7 @@ def launch_cle(argv): # pragma: no cover Launch the distributed CLE process with given assembly class. Process the command line and handles all shutdown events to terminate other MPI processes. - :param assembly_class An invokable CLEGazeboSimulationAssembly class definition to use. + :param assembly_class: An invokable CLEGazeboSimulationAssembly class definition to use. """ # import MPI here, must be done after Nest in subclass adapters diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLESimulationAssembly.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLESimulationAssembly.py index 8bef3d3..8576239 100644 --- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLESimulationAssembly.py +++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/DistributedCLESimulationAssembly.py @@ -46,7 +46,7 @@ class DistributedCLESimulationAssembly(CLEGazeboSimulationAssembly): """ Creates a new simulation assembly to simulate an experiment using the CLE and Gazebo - :param sim_config A sim config object that "similar" to the one used for the CLE process + :param sim_config: A sim config object that "similar" to the one used for the CLE process """ super(DistributedCLESimulationAssembly, self).__init__(sim_config) diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/MPILauncher.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/MPILauncher.py index e804cff..66a1f7b 100644 --- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/MPILauncher.py +++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/MPILauncher.py @@ -66,9 +66,9 @@ class MPILauncher(object): """ Add a target host to the mpi launch configuration. - :param hostname The remote host name or ip. - :param tmpdir A valid temporary directory on the remote host to launch in. - :param processes The number of processes for this host. + :param hostname: The remote host name or ip. + :param tmpdir: A valid temporary directory on the remote host to launch in. + :param processes: The number of processes for this host. """ self._hosts.append('-np {p} -host {h} -wdir {t}' .format(p=processes, h=hostname, t=tmpdir)) @@ -137,7 +137,7 @@ class MPILauncher(object): progress bar. Wait for completion of the CLE loading task and mark the MPI process as successfully launched. - :param msg The ros message to parse. + :param msg: The ros message to parse. """ status = json.loads(msg.data) diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestBrainProcess.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestBrainProcess.py index 5094931..2ba2fa2 100644 --- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestBrainProcess.py +++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestBrainProcess.py @@ -58,7 +58,7 @@ class NestBrainProcess(object): Nest will automatically allocate the brain in a round-robin fashion under the hood, we do not need to do anything explicitly. - :param sim_config A sim config object that "similar" to the one used for the CLE process + :param sim_config: A sim config object that "similar" to the one used for the CLE process """ self._sim_config = sim_config @@ -172,7 +172,7 @@ class NestBrainProcess(object): Reflect a transfer function connection made on the CLE side by performing the same connection on this side. - :param params The connectivity/synapse parameters passed by the CLE. + :param params: The connectivity/synapse parameters passed by the CLE. """ # get the population of neurons from params @@ -252,7 +252,7 @@ class NestBrainProcess(object): """ Disconnect the specified device and remove it from tracking. - :param params The device parameters passed by the CLE. + :param params: The device parameters passed by the CLE. """ device = self.devices.pop(params['timestep'], None) @@ -269,7 +269,7 @@ class NestBrainProcess(object): """ Load/reload the brain file and population definitions. - :param params The brain parameters passed by the CLE. + :param params: The brain parameters passed by the CLE. """ # ignore any commands during simulation construction diff --git a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestLauncher.py b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestLauncher.py index 760c78c..fd62329 100644 --- a/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestLauncher.py +++ b/hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/launch/NestLauncher.py @@ -55,10 +55,10 @@ class NestLauncher(object): :param exc: the experiment configuration :param bibi: the BIBI configuration. - :param server_host Target Gazebo/brain process host (e.g. local or lugano) - :param reservation Reservation string for cluster backend (None is a valid option) - :param sim_id The id of the simulation/experiment to be launched. - :param timeout The default simulation timeout (time initially allocated). + :param server_host: Target Gazebo/brain process host (e.g. local or lugano) + :param reservation: Reservation string for cluster backend (None is a valid option) + :param sim_id: The id of the simulation/experiment to be launched. + :param timeout: The default simulation timeout (time initially allocated). """ self._sim_config = sim_config -- GitLab