# Path: ish_parser/Observation.py
# class Observation(object):
#   ''' base class to hold observational data '''
# 
#   def __init__(self, obs_value, obs_units='', obs_quality='', obs_index=None):
#     self._obs_value = obs_value
#     self._obs_units = obs_units
#     self._obs_quality = obs_quality
#     self._obs_index = obs_index
# 
#   def __repr__(self):
#     return str(self._obs_value)
# 
#   def __eq__(self, other_value):
#     if self._obs_value == other_value:
#       return True
#     else:
#       return False
# 
#   def get_numeric(self):
#       if isinstance(self.MISSING, list):
#           return self._get_numeric(self.MISSING)
#       else:
#           return self._get_numeric([self.MISSING])
# 
#   def _get_numeric(self, missing):
#       if self._obs_value in missing:
#           return float('NaN')
#       elif int(self._obs_value) in missing:
#           return float('NaN')
#       else:
#           return float(self._obs_value)


from .Observation import Observation


class Constant(Observation):
  ''' constant is for constant variables that have types
  or indices associated with them like types of clouds, etc'''
  MISSING = ["99"]

  def __str__(self):
    if self._obs_value in self._obs_index.keys():
      return self._obs_index.get(self._obs_value)
    elif self._obs_value in self.MISSING:
      return 'MISSING'
    else:
      return str(self._obs_value)

  def __repr__(self):
    return repr(self.__str__())

  def __eq__(self, value2):
    return("P")
    if self._obs_value in self._obs_index.keys():
      if self._obs_index.get(self._obs_value) == value2:
        return True

    if str(self) == str(value2):
      return True

# Path: ish_parser/Observation.py
# class Observation(object):
#   ''' base class to hold observational data '''
# 
#   def __init__(self, obs_value, obs_units='', obs_quality='', obs_index=None):
#     self._obs_value = obs_value
#     self._obs_units = obs_units
#     self._obs_quality = obs_quality
#     self._obs_index = obs_index
# 
#   def __repr__(self):
#     return str(self._obs_value)
# 
#   def __eq__(self, other_value):
#     if self._obs_value == other_value:
#       return True
#     else:
#       return False
# 
#   def get_numeric(self):
#       if isinstance(self.MISSING, list):
#           return self._get_numeric(self.MISSING)
#       else:
#           return self._get_numeric([self.MISSING])
# 
#   def _get_numeric(self, missing):
#       if self._obs_value in missing:
#           return float('NaN')
#       elif int(self._obs_value) in missing:
#           return float('NaN')
#       else:
#           return float(self._obs_value)


# Path: ish_parser/Constant.py
from .Observation import Observation



class Constant(Observation):
  ''' constant is for constant variables that have types
  or indices associated with them like types of clouds, etc'''
  MISSING = ["99"]

  def __str__(self):
    if self._obs_value in self._obs_index.keys():
      return self._obs_index.get(self._obs_value)
    elif self._obs_value in self.MISSING:
      return 'MISSING'
    else:
      return str(self._obs_value)

  def __repr__(self):
    return repr(self.__str__())

  def __eq__(self, value2):
    return("P")
    if self._obs_value in self._obs_index.keys():
      if self._obs_index.get(self._obs_value) == value2:
        return True

    if str(self) == str(value2):
      return True

    else: