Skip to main content

annotations

superduper.misc.annotations

Source code

deprecated​

deprecated(f)
ParameterDescription
ffunction to deprecate

Decorator to mark a function as deprecated.

This will result in a warning being emitted when the function is used.

component​

component(*schema: Dict)
ParameterDescription
schemaschema for the component

Decorator for creating a component.

build_importable​

build_importable(*,
db=None,
importable=None)
ParameterDescription
dbDatalayer instance
importableimportable path

Build an importable from a path.

extract_parameters​

extract_parameters(doc)
ParameterDescription
docSphinx-styled docstring. Docstring may have multiple lines

Extracts and organizes parameter descriptions from a Sphinx-styled docstring.

importable​

importable(f)
ParameterDescription
ffunction to make importable, decorated with @importable

Make a function serializable as an importable.

replace_parameters​

replace_parameters(doc,
placeholder: str = '!!!')
ParameterDescription
docSphinx-styled docstring.
placeholderPlaceholder to replace parameters with.

Replace parameters in a doc-string with a placeholder.

requires_packages​

requires_packages(*packages,
warn=False)
ParameterDescription
packageslist of tuples of packages each tuple of the form (import_name, lower_bound/None, upper_bound/None, install_name/None)
warnif True, warn instead of raising an exception

Require the packages to be installed.

E.g. ('sklearn', '0.1.0', '0.2.0', 'scikit-learn')

warn_plugin_deprecated​

warn_plugin_deprecated(name)
ParameterDescription
namename of the plugin

Warn that a plugin is deprecated.

SuperDuperDeprecationWarning​

SuperDuperDeprecationWarning(self,
/,
*args,
**kwargs)
ParameterDescription
args*args of DeprecationWarning
kwargs**kwargs of DeprecationWarning

Specialized Deprecation Warning for fine grained filtering control.