gemseo / utils

source_parsing module

Parse source code to extract information.

Functions:

get_default_options_values(cls)

Get the options default values for the given class, by only addressing kwargs.

get_options_doc(method)

Get the documentation of a method.

parse_google(docstring)

Parse a Google docstring.

parse_rest(docstring)

Parse a reST docstring.

gemseo.utils.source_parsing.get_default_options_values(cls)[source]

Get the options default values for the given class, by only addressing kwargs.

Parameters

cls – The class.

Return type

Dict[str, str]

gemseo.utils.source_parsing.get_options_doc(method)[source]

Get the documentation of a method.

Parameters

method (Callable) – The method to retrieve the doc from.

Returns

The descriptions of the options.

Return type

Dict[str, str]

gemseo.utils.source_parsing.parse_google(docstring)[source]

Parse a Google docstring.

Parameters

docstring (str) – The docstring to be parsed.

Returns

The parsed docstring with the function arguments names bound to their descriptions.

Return type

Dict[str, str]

gemseo.utils.source_parsing.parse_rest(docstring)[source]

Parse a reST docstring.

Parameters

docstring (str) – The docstring to be parsed.

Returns

The parsed docstring.

Return type

Dict[str, str]