mt_metadata.timeseries.battery ============================== .. py:module:: mt_metadata.timeseries.battery Classes ------- .. autoapisummary:: mt_metadata.timeseries.battery.Battery Module Contents --------------- .. py:class:: Battery(**data) Bases: :py:obj:`mt_metadata.base.MetadataBase` Base class for all metadata objects with Pydantic validation. MetadataBase extends DotNotationBaseModel (which inherits from Pydantic's BaseModel) to provide automatic validation according to metadata standards. It adds functionality beyond dictionaries, supporting JSON, XML, pandas Series, and other formats for metadata interchange. .. attribute:: _skip_equals Private attribute listing fields to skip in equality comparisons :type: list[str] .. attribute:: _fields Private attribute caching field information :type: dict[str, Any] .. rubric:: Notes - All field assignments are validated automatically via Pydantic - None values are converted to appropriate defaults (empty string or 0.0) - Supports nested attribute access via dot notation - Thread-safe for read operations after initialization .. py:attribute:: type :type: Annotated[str | None, Field(default=None, description='Description of battery type.', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': 'pb-acid gel cell', 'type': 'string'})] :value: None .. py:attribute:: id :type: Annotated[str | None, Field(default=None, description='battery id', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': 'battery01', 'type': 'string'})] :value: None .. py:attribute:: voltage :type: Annotated[mt_metadata.common.StartEndRange, Field(default=StartEndRange(), description='Range of voltages.', alias=None, json_schema_extra={'units': 'volts', 'required': False, 'examples': 'Range(minimum=0.0, maximum=1.0)', 'type': 'object'})] .. py:attribute:: comments :type: Annotated[mt_metadata.common.Comment, Field(default_factory=Comment, description='Any comments about the channel.', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': 'ambient air temperature was chilly, ice on cables'})] .. py:method:: validate_comments(value, info) :classmethod: Validate that the value is a valid comment.