PlasmaCalcs.tools.supercomputer.SlurmOptionsDict

class PlasmaCalcs.tools.supercomputer.SlurmOptionsDict(*args_dict, aliases=UNSET, **kwargs_dict)

Bases: DictWithAliases

DictWithAliases of slurm-related options.
DEFAULT_ALIASES in this class tells all default aliases.
__init__(*args_dict, aliases=UNSET, **kwargs_dict)
initialize self with key-value pairs, and optionally aliases.
aliases: UNSET, or dict of {key1: key0} pairs to be aliased.
UNSET –> self will use self.DEFAULT_ALIASES.
dict –> self.alias(key0, key1) for each (key0, key1) pair.
(key1 is more likely to become the “alias”, internally.)

Methods

__init__(*args_dict[, aliases])

add_aliases(aliases)

alias(key0, key1)

clear()

copy()

fromkeys([value])

get(key[, default])

items()

keys()

pop(key[, default])

popitem()

setdefault(key[, default])

un_alias(alias)

update(*args_dict, **kwargs_dict)

values()

Attributes

DEFAULT_ALIASES

add_alias

aliases

property add_alias
alias to alias
add_aliases(aliases)
add multiple aliases at once.

aliases: dict of {alias: key} pairs.

Equivalent to calling self.alias(key, alias) for each (alias, key) pair.
alias(key0, key1)
tell self to treat these keys as the same key.
key0 is more likely to become the official key, while key1 will be the alias.
(however, if either is already known to self, decides “official vs alias” appropriately.)
property aliases
aliases known by this dict. aliases is a dict of {alias: key}
clear() None.  Remove all items from D.
copy()
return a shallow copy of self. Result aliases are the same as self.aliases.
fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
pop(key, default=UNSET)
pop key from self, returning self[key].
does NOT alter anything about known aliases.
default: UNSET or any value
if key not in self, return default if provided (i.e., not UNSET)
popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order.
Raises KeyError if the dict is empty.
setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
un_alias(alias)
remove alias from self.
If alias is an “official” key with a known alias,
swap the alias for the official key, then remove the previously-official key.
update(*args_dict, **kwargs_dict)
update self with new key-value pairs.
does NOT alter anything about known aliases.
handles appropriately any known aliases in key implied by *args and **kwargs.
values() an object providing a view on D's values