GeoEco.Metadata.ModuleMetadata

class GeoEco.Metadata.ModuleMetadata(name=None, shortDescription=None, longDescription=None)

Bases: Metadata

Metadata that describes a Python module.

Parameters:
  • name (str, optional) – Fully qualified name of the module (a.k.a. dotted module name). If None, the name of the caller’s module is used. Minimum length꞉ 1.

  • shortDescription (str, optional) – One-line description, ideally as plain text (but reStructuredText is OK). Minimum length꞉ 1.

  • longDescription (str, optional) – Detailed description, formatted as reStructuredText. Minimum length꞉ 1.

Returns:

New ModuleMetadata instance.

Return type:

ModuleMetadata

Properties

property DocString

(str) Python docstring (the value used for the __doc__ attribute). Read only. Minimum length꞉ 1. The docstring is constructed dynamically from metadata. It uses the format described in Google’s Python Style Guide.

property IsExposedToPythonCallers

(bool) If True, the module is part of GeoEco’s Public API. Read only. The value of this property is determined by whether there are any classes in the module that are part of the Public API. If not, this property will be False, and the module is considered part of GeoEco’s Internal API and not recommended for use by external callers.

property LongDescription

(str or None) Detailed description, formatted as reStructuredText. Minimum length꞉ 1. LongDescription is optional; if detailed information is not needed, you need only write a ShortDescription.

property Name

(str) Name, as provided to the constructor. Read only. Minimum length꞉ 1.

property Object

(object) Python object to which this metadata applies. Read only. The type the Python object depends on which type of metadata is involved:

Type of metadata

Type of the Object property

ModuleMetadata

ModuleType

ClassMetadata

type

PropertyMetadata

property

MethodMetadata

MethodType

property ShortDescription

(str or None) One-line description, ideally as plain text (but reStructuredText is OK). Minimum length꞉ 1. Keep the ShortDescription as concise as possible, ideally just one sentence. Do not include newline characters in the ShortDescription. Put detailed information in LongDescription (which can contain newlines).

Methods

AppendPropertyDocutilsXMLNodes

Appends the specified property to the specified xml.dom.Node object as a child element, first running it through the docutils processor to translate reStructuredText into docutils XML.

AppendPropertyXMLNode

Appends the specified property to the specified xml.dom.Node object as a child element.

AppendXMLNodes

Appends the metadata to the specified xml.dom.Node object as child nodes.

LoadDocutilsXMLCache

Initializes Metadata's internal cache of docutils XML from the specified file.

WriteDocutilsXMLCache

Writes Metadata's internal cache of docutils XML to the specified file.