Skip to content

Commit 0b29575

Browse files
committed
more doc stuff
1 parent 207736a commit 0b29575

File tree

4 files changed

+20
-23
lines changed

4 files changed

+20
-23
lines changed

pyslurm/core/slurmctld/base.pyx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def takeover(index = 1):
197197

198198

199199
def add_debug_flags(flags):
200-
"""Add DebugFlags to slurmctld
200+
"""Add DebugFlags to `slurmctld`
201201
202202
Args:
203203
flags (list[str]):
@@ -222,7 +222,7 @@ def add_debug_flags(flags):
222222

223223

224224
def remove_debug_flags(flags):
225-
"""Remove DebugFlags from slurmctld.
225+
"""Remove DebugFlags from `slurmctld`.
226226
227227
Args:
228228
flags (list[str]):
@@ -247,7 +247,7 @@ def remove_debug_flags(flags):
247247

248248

249249
def clear_debug_flags():
250-
"""Remove all currently set debug flags from slurmctld.
250+
"""Remove all currently set debug flags from `slurmctld`.
251251
252252
Raises:
253253
(pyslurm.RPCError): When removing the debug flags was not successful.
@@ -267,7 +267,7 @@ def clear_debug_flags():
267267

268268

269269
def get_debug_flags():
270-
"""Get the current list of debug flags for the slurmctld.
270+
"""Get the current list of debug flags for the `slurmctld`.
271271
272272
Raises:
273273
(pyslurm.RPCError): When getting the debug flags was not successful.
@@ -282,7 +282,7 @@ def get_debug_flags():
282282

283283

284284
def set_log_level(level):
285-
"""Set the logging level for slurmctld.
285+
"""Set the logging level for `slurmctld`.
286286
287287
Args:
288288
level (str):
@@ -304,7 +304,7 @@ def set_log_level(level):
304304

305305

306306
def get_log_level():
307-
"""Get the current log level for the slurmctld.
307+
"""Get the current log level for the `slurmctld`.
308308
309309
Raises:
310310
(pyslurm.RPCError): When getting the log level was not successful.
@@ -319,7 +319,7 @@ def get_log_level():
319319

320320

321321
def enable_scheduler_logging():
322-
"""Enable scheduler logging for slurmctld.
322+
"""Enable scheduler logging for `slurmctld`.
323323
324324
Raises:
325325
(pyslurm.RPCError): When enabling scheduler logging was not successful.
@@ -334,7 +334,7 @@ def enable_scheduler_logging():
334334

335335

336336
def is_scheduler_logging_enabled():
337-
"""Check whether scheduler logging is enabled for slurmctld.
337+
"""Check whether scheduler logging is enabled for `slurmctld`.
338338
339339
Returns:
340340
(bool): Whether scheduler logging is enabled or not.

pyslurm/core/slurmctld/config.pxd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ cdef class Config:
441441
`SIGTERM` and `SIGKILL` signals upon reaching its time limit.
442442
443443
{slurm.conf#OPT_KillWait}
444-
launch_parameters (list[str])
444+
launch_parameters (list[str]):
445445
Options for the job launch plugin.
446446
447447
{slurm.conf#OPT_LaunchParameters}
@@ -606,8 +606,8 @@ cdef class Config:
606606
607607
{slurm.conf#OPT_PriorityFlags}
608608
priority_max_age (int):
609-
Job age that is needed before receiving the maximum age factor in
610-
computing priority.
609+
Job age (in seconds) that is needed before receiving the maximum
610+
age factor in computing priority.
611611
612612
{slurm.conf#OPT_PriorityMaxAge}
613613
priority_parameters (str):
@@ -1048,7 +1048,7 @@ cdef class Config:
10481048
percentage of its real memory limit.
10491049
10501050
{slurm.conf#OPT_VSizeFactor}
1051-
default_job_wait_time (int):
1051+
wait_time (int):
10521052
Specifies how many seconds the srun command should by default wait
10531053
after the first task terminates before terminating all remaining
10541054
tasks.
@@ -1077,7 +1077,7 @@ cdef class Config:
10771077
#
10781078
# Copyright (C) 2022 SchedMD LLC.
10791079
cdef class MPIConfig:
1080-
"""Slurm MPI Config (mpi.conf)
1080+
"""Slurm MPI Config (`mpi.conf`)
10811081
10821082
Attributes:
10831083
pmix_cli_tmp_dir_base (str):
@@ -1164,7 +1164,7 @@ cdef class MPIConfig:
11641164
# pyslurm/slurm/SLURM_DISCLAIMER).
11651165
# Copyright (C) 2010-2022 SchedMD LLC.
11661166
cdef class CgroupConfig:
1167-
"""Slurm Cgroup Config (cgroup.conf)
1167+
"""Slurm Cgroup Config (`cgroup.conf`)
11681168
11691169
Attributes:
11701170
mountpoint (str):
@@ -1292,7 +1292,7 @@ cdef class CgroupConfig:
12921292
# Copyright (C) 2012-2013 Bull.
12931293
# Copyright (C) 2012-2022 SchedMD LLC.
12941294
cdef class AccountingGatherConfig:
1295-
"""Slurm Accounting Gather Config (acct_gather.conf)
1295+
"""Slurm Accounting Gather Config (`acct_gather.conf`)
12961296
12971297
Attributes:
12981298
energy_ipmi_frequency (int):

pyslurm/core/slurmctld/config.pyx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,7 @@ cdef class Config:
752752
return cstr.to_list_free(&data)
753753

754754
@property
755-
def priortiy_max_age(self):
756-
# TODO: seconds or minutes?
755+
def priority_max_age(self):
757756
return u32_parse(self.ptr.priority_max_age)
758757

759758
@property
@@ -912,7 +911,6 @@ cdef class Config:
912911

913912
@property
914913
def scheduler_logging_enabled(self):
915-
# TODO: check again
916914
return u16_parse_bool(self.ptr.sched_log_level)
917915

918916
@property
@@ -1184,8 +1182,7 @@ cdef class Config:
11841182
return u16_parse(self.ptr.vsize_factor)
11851183

11861184
@property
1187-
def default_job_wait_time(self):
1188-
# TODO: reconsider name
1185+
def wait_time(self):
11891186
return u16_parse(self.ptr.wait_time)
11901187

11911188
@property

pyslurm/core/slurmctld/enums.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ class ShutdownMode(IntEnum):
3333

3434
# A bit hacky, but it works for now. Putting the docstring under the enum value
3535
# does not work unfortunately.
36-
ShutdownMode.ALL.__doc__ = "Shutdown all daemons (slurmctld and slurmd)"
37-
ShutdownMode.CORE_FILE.__doc__ = "Shutdown only slurmctld, and create a coredump"
38-
ShutdownMode.CONTROLLER_ONLY.__doc__ = "Shutdown only slurmctld, without a coredump"
36+
ShutdownMode.ALL.__doc__ = "Shutdown all daemons (`slurmctld` and `slurmd`)"
37+
ShutdownMode.CORE_FILE.__doc__ = "Shutdown only `slurmctld`, and create a coredump"
38+
ShutdownMode.CONTROLLER_ONLY.__doc__ = "Shutdown only `slurmctld`, without a coredump"

0 commit comments

Comments
 (0)