FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit ae8aabe7 authored by Mark Driver's avatar Mark Driver
Browse files

documentation updates.

parent 2b9e1990
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ class Temperature(object):
TOLERANCE = 0.01
def __init__(self, temperature, temperature_unit):
"""
"""Initialise object.
Parameters
----------
......@@ -72,6 +72,19 @@ class Temperature(object):
return False
@classmethod
def parse_xml(cls, temperature_xml):
"""Parse XML representation to new instance.
Parameters
----------
temperature_xml : lxml.etree.ElementTree
Element tree representation of temperature XML.
Returns
-------
Temperature
New instance.
"""
temp_xpath = "@phasecalc:value"
temperature = float(temperature_xml.xpath(temp_xpath, namespaces=PHASE_CALC_NAMESPACE_DICT)[0])
unit_xpath = "@phasecalc:unit"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment