configschemas
configschemas ¶
Module for configuration schemes
Classes¶
ConfigSchemaConversionException ¶
Bases: BaseException
Base class for exceptions when building config schema.
Functions¶
build_config_schema ¶
Build dagster config schema from an configuration class.
Here, a configuration class is
- a scalar type (bool, float, int, str) or
- a list or tuple of configuration classes or
- a mapping from scalar type to a configuration class or
- an attrs class whose attribute types are configuration classes.
For anything else, return dagster.Any
.
Source code in niceml/config/configschemas.py
define ¶
define(
maybe_cls=None,
*,
these=None,
repr=None,
hash=None,
init=None,
slots=True,
frozen=False,
weakref_slot=True,
str=False,
auto_attribs=None,
kw_only=False,
cache_hash=False,
auto_exc=True,
eq=None,
order=False,
auto_detect=True,
getstate_setstate=None,
on_setattr=None,
field_transformer=None,
match_args=True
)
Replacement of attr.define that updates class docstring with attributes.
Source code in niceml/config/configschemas.py
field ¶
field(
*,
default=NOTHING,
validator=None,
repr=True,
hash=None,
init=True,
metadata=None,
converter=None,
factory=None,
kw_only=False,
eq=None,
order=None,
on_setattr=None,
description=None
)
Replacement of attr.field that moves description
into metadata.
Source code in niceml/config/configschemas.py
format_attribute_doc ¶
Generates and returns attributes of attribute as string
Source code in niceml/config/configschemas.py
format_attrs_doc ¶
Add attributes section to attrs class docstring.