mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-16 12:33:41 +02:00
docs: docstring added to check_idl in input/utils
This commit is contained in:
parent
5993f1a4ba
commit
bb3a15d69b
1 changed files with 10 additions and 1 deletions
|
@ -2,11 +2,20 @@
|
||||||
|
|
||||||
|
|
||||||
def check_idl(idl, che):
|
def check_idl(idl, che):
|
||||||
|
"""Checks if list of configurations is contained in an idl
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
idl : range or list
|
||||||
|
idl of the current replicum
|
||||||
|
che : list
|
||||||
|
list of configurations to be checked against
|
||||||
|
"""
|
||||||
missing = []
|
missing = []
|
||||||
for c in che:
|
for c in che:
|
||||||
if c not in idl:
|
if c not in idl:
|
||||||
missing.append(c)
|
missing.append(c)
|
||||||
# print missing such that it can directly be parsed to slurm terminal
|
# print missing configurations such that it can directly be parsed to slurm terminal
|
||||||
if not (len(missing) == 0):
|
if not (len(missing) == 0):
|
||||||
print(len(missing), "configs missing")
|
print(len(missing), "configs missing")
|
||||||
miss_str = str(missing[0])
|
miss_str = str(missing[0])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue