text_prompt
stringlengths
100
17.7k
code_prompt
stringlengths
7
9.86k
<SYSTEM_TASK:> Validate a streamed response is JSON. Return a Python dictionary either way. <END_TASK> <USER_TASK:> Description: def _catch_nonjson_streamresponse(rawresponse): """ Validate a streamed response is JSON. Return a Python dictionary either way. **Parameters:** - **rawresponse:** Streamed Response from Requests. **Returns:** Dictionary """
# attempt to load response for return. try: response = json.loads(rawresponse) except (ValueError, TypeError): if rawresponse: response = { '_error': [ { 'message': 'Response not in JSON format.', 'data': rawresponse, } ] } else: # in case of null response, return empty dict. response = {} return response
<SYSTEM_TASK:> Create a crop box. <END_TASK> <USER_TASK:> Description: def crop_box(endpoint=None, filename=None): """Create a crop box. :param endpoint: The endpoint of view function that serve avatar image file. :param filename: The filename of the image that need to be crop. """
crop_size = current_app.config['AVATARS_CROP_BASE_WIDTH'] if endpoint is None or filename is None: url = url_for('avatars.static', filename='default/default_l.jpg') else: url = url_for(endpoint, filename=filename) return Markup('<img src="%s" id="crop-box" style="max-width: %dpx; display: block;">' % (url, crop_size))
<SYSTEM_TASK:> Resize an avatar. <END_TASK> <USER_TASK:> Description: def resize_avatar(self, img, base_width): """Resize an avatar. :param img: The image that needs to be resize. :param base_width: The width of output image. """
w_percent = (base_width / float(img.size[0])) h_size = int((float(img.size[1]) * float(w_percent))) img = img.resize((base_width, h_size), PIL.Image.ANTIALIAS) return img
<SYSTEM_TASK:> Save an avatar as raw image, return new filename. <END_TASK> <USER_TASK:> Description: def save_avatar(self, image): """Save an avatar as raw image, return new filename. :param image: The image that needs to be saved. """
path = current_app.config['AVATARS_SAVE_PATH'] filename = uuid4().hex + '_raw.png' image.save(os.path.join(path, filename)) return filename
<SYSTEM_TASK:> Byte representation of a PNG image <END_TASK> <USER_TASK:> Description: def get_image(self, string, width, height, pad=0): """ Byte representation of a PNG image """
hex_digest_byte_list = self._string_to_byte_list(string) matrix = self._create_matrix(hex_digest_byte_list) return self._create_image(matrix, width, height, pad)
<SYSTEM_TASK:> Create a pastel colour hex colour string <END_TASK> <USER_TASK:> Description: def _get_pastel_colour(self, lighten=127): """ Create a pastel colour hex colour string """
def r(): return random.randint(0, 128) + lighten return r(), r(), r()
<SYSTEM_TASK:> Determine the liminanace of an RGB colour <END_TASK> <USER_TASK:> Description: def _luminance(self, rgb): """ Determine the liminanace of an RGB colour """
a = [] for v in rgb: v = v / float(255) if v < 0.03928: result = v / 12.92 else: result = math.pow(((v + 0.055) / 1.055), 2.4) a.append(result) return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722
<SYSTEM_TASK:> Creates a hex digest of the input string given to create the image, <END_TASK> <USER_TASK:> Description: def _string_to_byte_list(self, data): """ Creates a hex digest of the input string given to create the image, if it's not already hexadecimal Returns: Length 16 list of rgb value range integers (each representing a byte of the hex digest) """
bytes_length = 16 m = self.digest() m.update(str.encode(data)) hex_digest = m.hexdigest() return list(int(hex_digest[num * 2:num * 2 + 2], bytes_length) for num in range(bytes_length))
<SYSTEM_TASK:> Generates a PNG byte list <END_TASK> <USER_TASK:> Description: def _create_image(self, matrix, width, height, pad): """ Generates a PNG byte list """
image = Image.new("RGB", (width + (pad * 2), height + (pad * 2)), self.bg_colour) image_draw = ImageDraw.Draw(image) # Calculate the block width and height. block_width = float(width) / self.cols block_height = float(height) / self.rows # Loop through blocks in matrix, draw rectangles. for row, cols in enumerate(matrix): for col, cell in enumerate(cols): if cell: image_draw.rectangle(( pad + col * block_width, # x1 pad + row * block_height, # y1 pad + (col + 1) * block_width - 1, # x2 pad + (row + 1) * block_height - 1 # y2 ), fill=self.fg_colour) stream = BytesIO() image.save(stream, format="png", optimize=True) # return the image byte data return stream.getvalue()
<SYSTEM_TASK:> Corresponds to IDD Field `city` <END_TASK> <USER_TASK:> Description: def city(self, value=None): """Corresponds to IDD Field `city` Args: value (str): value for IDD Field `city` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `city`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `city`') self._city = value
<SYSTEM_TASK:> Corresponds to IDD Field `state_province_region` <END_TASK> <USER_TASK:> Description: def state_province_region(self, value=None): """Corresponds to IDD Field `state_province_region` Args: value (str): value for IDD Field `state_province_region` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `state_province_region`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `state_province_region`') self._state_province_region = value
<SYSTEM_TASK:> Corresponds to IDD Field `country` <END_TASK> <USER_TASK:> Description: def country(self, value=None): """Corresponds to IDD Field `country` Args: value (str): value for IDD Field `country` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `country`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `country`') self._country = value
<SYSTEM_TASK:> Corresponds to IDD Field `source` <END_TASK> <USER_TASK:> Description: def source(self, value=None): """Corresponds to IDD Field `source` Args: value (str): value for IDD Field `source` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `source`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `source`') self._source = value
<SYSTEM_TASK:> Corresponds to IDD Field `wmo` usually a 6 digit field. Used as <END_TASK> <USER_TASK:> Description: def wmo(self, value=None): """Corresponds to IDD Field `wmo` usually a 6 digit field. Used as alpha in EnergyPlus. Args: value (str): value for IDD Field `wmo` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `wmo`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `wmo`') self._wmo = value
<SYSTEM_TASK:> Corresponds to IDD Field `latitude` <END_TASK> <USER_TASK:> Description: def latitude(self, value=0.0): """Corresponds to IDD Field `latitude` + is North, - is South, degree minutes represented in decimal (i.e. 30 minutes is .5) Args: value (float): value for IDD Field `latitude` Unit: deg Default value: 0.0 value >= -90.0 value <= 90.0 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `latitude`'.format(value)) if value < -90.0: raise ValueError('value need to be greater or equal -90.0 ' 'for field `latitude`') if value > 90.0: raise ValueError('value need to be smaller 90.0 ' 'for field `latitude`') self._latitude = value
<SYSTEM_TASK:> Corresponds to IDD Field `longitude` <END_TASK> <USER_TASK:> Description: def longitude(self, value=0.0): """Corresponds to IDD Field `longitude` - is West, + is East, degree minutes represented in decimal (i.e. 30 minutes is .5) Args: value (float): value for IDD Field `longitude` Unit: deg Default value: 0.0 value >= -180.0 value <= 180.0 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `longitude`'.format(value)) if value < -180.0: raise ValueError('value need to be greater or equal -180.0 ' 'for field `longitude`') if value > 180.0: raise ValueError('value need to be smaller 180.0 ' 'for field `longitude`') self._longitude = value
<SYSTEM_TASK:> Corresponds to IDD Field `timezone` Time relative to GMT. <END_TASK> <USER_TASK:> Description: def timezone(self, value=0.0): """Corresponds to IDD Field `timezone` Time relative to GMT. Args: value (float): value for IDD Field `timezone` Unit: hr - not on standard units list??? Default value: 0.0 value >= -12.0 value <= 12.0 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `timezone`'.format(value)) if value < -12.0: raise ValueError('value need to be greater or equal -12.0 ' 'for field `timezone`') if value > 12.0: raise ValueError('value need to be smaller 12.0 ' 'for field `timezone`') self._timezone = value
<SYSTEM_TASK:> Corresponds to IDD Field `elevation` <END_TASK> <USER_TASK:> Description: def elevation(self, value=0.0): """Corresponds to IDD Field `elevation` Args: value (float): value for IDD Field `elevation` Unit: m Default value: 0.0 value >= -1000.0 value < 9999.9 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `elevation`'.format(value)) if value < -1000.0: raise ValueError('value need to be greater or equal -1000.0 ' 'for field `elevation`') if value >= 9999.9: raise ValueError('value need to be smaller 9999.9 ' 'for field `elevation`') self._elevation = value
<SYSTEM_TASK:> Corresponds to IDD Field `title_of_design_condition` <END_TASK> <USER_TASK:> Description: def title_of_design_condition(self, value=None): """Corresponds to IDD Field `title_of_design_condition` Args: value (str): value for IDD Field `title_of_design_condition` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `title_of_design_condition`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `title_of_design_condition`') self._title_of_design_condition = value
<SYSTEM_TASK:> Corresponds to IDD Field `unkown_field` Empty field in data. <END_TASK> <USER_TASK:> Description: def unkown_field(self, value=None): """Corresponds to IDD Field `unkown_field` Empty field in data. Args: value (str): value for IDD Field `unkown_field` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `unkown_field`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `unkown_field`') self._unkown_field = value
<SYSTEM_TASK:> Corresponds to IDD Field `design_stat_heating` <END_TASK> <USER_TASK:> Description: def design_stat_heating(self, value="Heating"): """Corresponds to IDD Field `design_stat_heating` Args: value (str): value for IDD Field `design_stat_heating` Accepted values are: - Heating Default value: Heating if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `design_stat_heating`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `design_stat_heating`') vals = set() vals.add("Heating") if value not in vals: raise ValueError('value {} is not an accepted value for ' 'field `design_stat_heating`'.format(value)) self._design_stat_heating = value
<SYSTEM_TASK:> Corresponds to IDD Field `coldestmonth` <END_TASK> <USER_TASK:> Description: def coldestmonth(self, value=None): """Corresponds to IDD Field `coldestmonth` Args: value (int): value for IDD Field `coldestmonth` value >= 1 value <= 12 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = int(value) except ValueError: raise ValueError('value {} need to be of type int ' 'for field `coldestmonth`'.format(value)) if value < 1: raise ValueError('value need to be greater or equal 1 ' 'for field `coldestmonth`') if value > 12: raise ValueError('value need to be smaller 12 ' 'for field `coldestmonth`') self._coldestmonth = value
<SYSTEM_TASK:> Corresponds to IDD Field `ws004c` <END_TASK> <USER_TASK:> Description: def ws004c(self, value=None): """Corresponds to IDD Field `ws004c` Args: value (float): value for IDD Field `ws004c` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws004c`'.format(value)) self._ws004c = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_ws004c` <END_TASK> <USER_TASK:> Description: def db_ws004c(self, value=None): """ Corresponds to IDD Field `db_ws004c` Mean coincident dry-bulb temperature to wind speed corresponding to 0.40% cumulative frequency for coldest month Args: value (float): value for IDD Field `db_ws004c` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_ws004c`'.format(value)) self._db_ws004c = value
<SYSTEM_TASK:> Corresponds to IDD Field `ws010c` <END_TASK> <USER_TASK:> Description: def ws010c(self, value=None): """ Corresponds to IDD Field `ws010c` Wind speed corresponding to 1.0% cumulative frequency of occurrence for coldest month; Args: value (float): value for IDD Field `ws010c` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws010c`'.format(value)) self._ws010c = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_ws010c` <END_TASK> <USER_TASK:> Description: def db_ws010c(self, value=None): """ Corresponds to IDD Field `db_ws010c` Mean coincident dry-bulb temperature to wind speed corresponding to 1.0% cumulative frequency for coldest month Args: value (float): value for IDD Field `db_ws010c` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_ws010c`'.format(value)) self._db_ws010c = value
<SYSTEM_TASK:> Corresponds to IDD Field `ws_db996` <END_TASK> <USER_TASK:> Description: def ws_db996(self, value=None): """ Corresponds to IDD Field `ws_db996` Mean wind speed coincident with 99.6% dry-bulb temperature Args: value (float): value for IDD Field `ws_db996` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws_db996`'.format(value)) self._ws_db996 = value
<SYSTEM_TASK:> Corresponds to IDD Field `design_stat_cooling` <END_TASK> <USER_TASK:> Description: def design_stat_cooling(self, value="Cooling"): """Corresponds to IDD Field `design_stat_cooling` Args: value (str): value for IDD Field `design_stat_cooling` Accepted values are: - Cooling Default value: Cooling if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `design_stat_cooling`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `design_stat_cooling`') vals = set() vals.add("Cooling") if value not in vals: raise ValueError('value {} is not an accepted value for ' 'field `design_stat_cooling`'.format(value)) self._design_stat_cooling = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbr` Daily temperature range for hottest <END_TASK> <USER_TASK:> Description: def dbr(self, value=None): """Corresponds to IDD Field `dbr` Daily temperature range for hottest month. [defined as mean of the difference between daily maximum and daily minimum dry-bulb temperatures for hottest month] Args: value (float): value for IDD Field `dbr` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbr`'.format(value)) self._dbr = value
<SYSTEM_TASK:> Corresponds to IDD Field `wb004` <END_TASK> <USER_TASK:> Description: def wb004(self, value=None): """ Corresponds to IDD Field `wb004` Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `wb004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `wb004`'.format(value)) self._wb004 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_wb004` <END_TASK> <USER_TASK:> Description: def db_wb004(self, value=None): """ Corresponds to IDD Field `db_wb004` mean coincident dry-bulb temperature to Wet-bulb temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_wb004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_wb004`'.format(value)) self._db_wb004 = value
<SYSTEM_TASK:> Corresponds to IDD Field `wb010` <END_TASK> <USER_TASK:> Description: def wb010(self, value=None): """ Corresponds to IDD Field `wb010` Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `wb010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `wb010`'.format(value)) self._wb010 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_wb010` <END_TASK> <USER_TASK:> Description: def db_wb010(self, value=None): """ Corresponds to IDD Field `db_wb010` mean coincident dry-bulb temperature to Wet-bulb temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_wb010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_wb010`'.format(value)) self._db_wb010 = value
<SYSTEM_TASK:> Corresponds to IDD Field `wb020` <END_TASK> <USER_TASK:> Description: def wb020(self, value=None): """ Corresponds to IDD Field `wb020` Wet-bulb temperature corresponding to 02.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `wb020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `wb020`'.format(value)) self._wb020 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_wb020` <END_TASK> <USER_TASK:> Description: def db_wb020(self, value=None): """ Corresponds to IDD Field `db_wb020` mean coincident dry-bulb temperature to Wet-bulb temperature corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_wb020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_wb020`'.format(value)) self._db_wb020 = value
<SYSTEM_TASK:> Corresponds to IDD Field `ws_db004` <END_TASK> <USER_TASK:> Description: def ws_db004(self, value=None): """ Corresponds to IDD Field `ws_db004` Mean wind speed coincident with 0.4% dry-bulb temperature Args: value (float): value for IDD Field `ws_db004` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws_db004`'.format(value)) self._ws_db004 = value
<SYSTEM_TASK:> Corresponds to IDD Field `dp004` <END_TASK> <USER_TASK:> Description: def dp004(self, value=None): """ Corresponds to IDD Field `dp004` Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `dp004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dp004`'.format(value)) self._dp004 = value
<SYSTEM_TASK:> Corresponds to IDD Field `hr_dp004` <END_TASK> <USER_TASK:> Description: def hr_dp004(self, value=None): """ Corresponds to IDD Field `hr_dp004` humidity ratio corresponding to Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `hr_dp004` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `hr_dp004`'.format(value)) self._hr_dp004 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_dp004` <END_TASK> <USER_TASK:> Description: def db_dp004(self, value=None): """ Corresponds to IDD Field `db_dp004` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_dp004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_dp004`'.format(value)) self._db_dp004 = value
<SYSTEM_TASK:> Corresponds to IDD Field `dp010` <END_TASK> <USER_TASK:> Description: def dp010(self, value=None): """ Corresponds to IDD Field `dp010` Dew-point temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `dp010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dp010`'.format(value)) self._dp010 = value
<SYSTEM_TASK:> Corresponds to IDD Field `hr_dp010` <END_TASK> <USER_TASK:> Description: def hr_dp010(self, value=None): """ Corresponds to IDD Field `hr_dp010` humidity ratio corresponding to Dew-point temperature corresponding to 1.0,% annual cumulative frequency of occurrence calculated at the standard atmospheric pressure at elevation of station Args: value (float): value for IDD Field `hr_dp010` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `hr_dp010`'.format(value)) self._hr_dp010 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_dp010` <END_TASK> <USER_TASK:> Description: def db_dp010(self, value=None): """ Corresponds to IDD Field `db_dp010` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_dp010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_dp010`'.format(value)) self._db_dp010 = value
<SYSTEM_TASK:> Corresponds to IDD Field `dp020` <END_TASK> <USER_TASK:> Description: def dp020(self, value=None): """ Corresponds to IDD Field `dp020` Dew-point temperature corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `dp020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dp020`'.format(value)) self._dp020 = value
<SYSTEM_TASK:> Corresponds to IDD Field `hr_dp020` <END_TASK> <USER_TASK:> Description: def hr_dp020(self, value=None): """ Corresponds to IDD Field `hr_dp020` humidity ratio corresponding to Dew-point temperature corresponding to 2.0% annual cumulative frequency of occurrence calculated at the standard atmospheric pressure at elevation of station Args: value (float): value for IDD Field `hr_dp020` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `hr_dp020`'.format(value)) self._hr_dp020 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_dp020` <END_TASK> <USER_TASK:> Description: def db_dp020(self, value=None): """ Corresponds to IDD Field `db_dp020` mean coincident dry-bulb temperature to Dew-point temperature corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_dp020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_dp020`'.format(value)) self._db_dp020 = value
<SYSTEM_TASK:> Corresponds to IDD Field `en004` <END_TASK> <USER_TASK:> Description: def en004(self, value=None): """ Corresponds to IDD Field `en004` mean coincident dry-bulb temperature to Enthalpy corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `en004` Unit: kJ/kg if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `en004`'.format(value)) self._en004 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_en004` <END_TASK> <USER_TASK:> Description: def db_en004(self, value=None): """ Corresponds to IDD Field `db_en004` mean coincident dry-bulb temperature to Enthalpy corresponding to 0.4% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_en004` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_en004`'.format(value)) self._db_en004 = value
<SYSTEM_TASK:> Corresponds to IDD Field `en010` <END_TASK> <USER_TASK:> Description: def en010(self, value=None): """ Corresponds to IDD Field `en010` mean coincident dry-bulb temperature to Enthalpy corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `en010` Unit: kJ/kg if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `en010`'.format(value)) self._en010 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_en010` <END_TASK> <USER_TASK:> Description: def db_en010(self, value=None): """ Corresponds to IDD Field `db_en010` mean coincident dry-bulb temperature to Enthalpy corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_en010` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_en010`'.format(value)) self._db_en010 = value
<SYSTEM_TASK:> Corresponds to IDD Field `en020` <END_TASK> <USER_TASK:> Description: def en020(self, value=None): """ Corresponds to IDD Field `en020` mean coincident dry-bulb temperature to Enthalpy corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `en020` Unit: kJ/kg if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `en020`'.format(value)) self._en020 = value
<SYSTEM_TASK:> Corresponds to IDD Field `db_en020` <END_TASK> <USER_TASK:> Description: def db_en020(self, value=None): """ Corresponds to IDD Field `db_en020` mean coincident dry-bulb temperature to Enthalpy corresponding to 2.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `db_en020` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `db_en020`'.format(value)) self._db_en020 = value
<SYSTEM_TASK:> Corresponds to IDD Field `design_stat_extremes` <END_TASK> <USER_TASK:> Description: def design_stat_extremes(self, value="Extremes"): """Corresponds to IDD Field `design_stat_extremes` Args: value (str): value for IDD Field `design_stat_extremes` Accepted values are: - Extremes Default value: Extremes if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `design_stat_extremes`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `design_stat_extremes`') vals = set() vals.add("Extremes") if value not in vals: raise ValueError('value {} is not an accepted value for ' 'field `design_stat_extremes`'.format(value)) self._design_stat_extremes = value
<SYSTEM_TASK:> Corresponds to IDD Field `ws010` <END_TASK> <USER_TASK:> Description: def ws010(self, value=None): """ Corresponds to IDD Field `ws010` Wind speed corresponding to 1.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `ws010` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws010`'.format(value)) self._ws010 = value
<SYSTEM_TASK:> Corresponds to IDD Field `ws025` <END_TASK> <USER_TASK:> Description: def ws025(self, value=None): """ Corresponds to IDD Field `ws025` Wind speed corresponding to 2.5% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `ws025` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws025`'.format(value)) self._ws025 = value
<SYSTEM_TASK:> Corresponds to IDD Field `ws050` <END_TASK> <USER_TASK:> Description: def ws050(self, value=None): """ Corresponds to IDD Field `ws050` Wind speed corresponding 5.0% annual cumulative frequency of occurrence Args: value (float): value for IDD Field `ws050` Unit: m/s if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `ws050`'.format(value)) self._ws050 = value
<SYSTEM_TASK:> Corresponds to IDD Field `wbmax` <END_TASK> <USER_TASK:> Description: def wbmax(self, value=None): """ Corresponds to IDD Field `wbmax` Extreme maximum wet-bulb temperature Args: value (float): value for IDD Field `wbmax` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `wbmax`'.format(value)) self._wbmax = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmin_mean` <END_TASK> <USER_TASK:> Description: def dbmin_mean(self, value=None): """ Corresponds to IDD Field `dbmin_mean` Mean of extreme annual minimum dry-bulb temperature Args: value (float): value for IDD Field `dbmin_mean` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin_mean`'.format(value)) self._dbmin_mean = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmax_mean` <END_TASK> <USER_TASK:> Description: def dbmax_mean(self, value=None): """ Corresponds to IDD Field `dbmax_mean` Mean of extreme annual maximum dry-bulb temperature Args: value (float): value for IDD Field `dbmax_mean` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax_mean`'.format(value)) self._dbmax_mean = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmin_stddev` <END_TASK> <USER_TASK:> Description: def dbmin_stddev(self, value=None): """ Corresponds to IDD Field `dbmin_stddev` Standard deviation of extreme annual minimum dry-bulb temperature Args: value (float): value for IDD Field `dbmin_stddev` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin_stddev`'.format(value)) self._dbmin_stddev = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmax_stddev` <END_TASK> <USER_TASK:> Description: def dbmax_stddev(self, value=None): """ Corresponds to IDD Field `dbmax_stddev` Standard deviation of extreme annual maximum dry-bulb temperature Args: value (float): value for IDD Field `dbmax_stddev` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax_stddev`'.format(value)) self._dbmax_stddev = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmin05years` <END_TASK> <USER_TASK:> Description: def dbmin05years(self, value=None): """ Corresponds to IDD Field `dbmin05years` 5-year return period values for minimum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmin05years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin05years`'.format(value)) self._dbmin05years = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmax05years` <END_TASK> <USER_TASK:> Description: def dbmax05years(self, value=None): """ Corresponds to IDD Field `dbmax05years` 5-year return period values for maximum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmax05years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax05years`'.format(value)) self._dbmax05years = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmin10years` <END_TASK> <USER_TASK:> Description: def dbmin10years(self, value=None): """ Corresponds to IDD Field `dbmin10years` 10-year return period values for minimum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmin10years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin10years`'.format(value)) self._dbmin10years = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmax10years` <END_TASK> <USER_TASK:> Description: def dbmax10years(self, value=None): """ Corresponds to IDD Field `dbmax10years` 10-year return period values for maximum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmax10years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax10years`'.format(value)) self._dbmax10years = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmin20years` <END_TASK> <USER_TASK:> Description: def dbmin20years(self, value=None): """ Corresponds to IDD Field `dbmin20years` 20-year return period values for minimum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmin20years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin20years`'.format(value)) self._dbmin20years = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmax20years` <END_TASK> <USER_TASK:> Description: def dbmax20years(self, value=None): """ Corresponds to IDD Field `dbmax20years` 20-year return period values for maximum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmax20years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax20years`'.format(value)) self._dbmax20years = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmin50years` <END_TASK> <USER_TASK:> Description: def dbmin50years(self, value=None): """ Corresponds to IDD Field `dbmin50years` 50-year return period values for minimum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmin50years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmin50years`'.format(value)) self._dbmin50years = value
<SYSTEM_TASK:> Corresponds to IDD Field `dbmax50years` <END_TASK> <USER_TASK:> Description: def dbmax50years(self, value=None): """ Corresponds to IDD Field `dbmax50years` 50-year return period values for maximum extreme dry-bulb temperature Args: value (float): value for IDD Field `dbmax50years` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError('value {} need to be of type float ' 'for field `dbmax50years`'.format(value)) self._dbmax50years = value
<SYSTEM_TASK:> Corresponds to IDD Field `typical_or_extreme_period_name` <END_TASK> <USER_TASK:> Description: def typical_or_extreme_period_name(self, value=None): """Corresponds to IDD Field `typical_or_extreme_period_name` Args: value (str): value for IDD Field `typical_or_extreme_period_name` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `typical_or_extreme_period_name`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `typical_or_extreme_period_name`') self._typical_or_extreme_period_name = value
<SYSTEM_TASK:> Corresponds to IDD Field `typical_or_extreme_period_type` <END_TASK> <USER_TASK:> Description: def typical_or_extreme_period_type(self, value=None): """Corresponds to IDD Field `typical_or_extreme_period_type` Args: value (str): value for IDD Field `typical_or_extreme_period_type` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `typical_or_extreme_period_type`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `typical_or_extreme_period_type`') self._typical_or_extreme_period_type = value
<SYSTEM_TASK:> Corresponds to IDD Field `period_start_day` <END_TASK> <USER_TASK:> Description: def period_start_day(self, value=None): """Corresponds to IDD Field `period_start_day` Args: value (str): value for IDD Field `period_start_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `period_start_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `period_start_day`') self._period_start_day = value
<SYSTEM_TASK:> Corresponds to IDD Field `period_end_day` <END_TASK> <USER_TASK:> Description: def period_end_day(self, value=None): """Corresponds to IDD Field `period_end_day` Args: value (str): value for IDD Field `period_end_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `period_end_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `period_end_day`') self._period_end_day = value
<SYSTEM_TASK:> Corresponds to IDD Field `ground_temperature_depth` <END_TASK> <USER_TASK:> Description: def ground_temperature_depth(self, value=None): """Corresponds to IDD Field `ground_temperature_depth` Args: value (float): value for IDD Field `ground_temperature_depth` Unit: m if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `ground_temperature_depth`'.format(value)) self._ground_temperature_depth = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_soil_conductivity` <END_TASK> <USER_TASK:> Description: def depth_soil_conductivity(self, value=None): """Corresponds to IDD Field `depth_soil_conductivity` Args: value (float): value for IDD Field `depth_soil_conductivity` Unit: W/m-K, if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_soil_conductivity`'.format(value)) self._depth_soil_conductivity = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_soil_density` <END_TASK> <USER_TASK:> Description: def depth_soil_density(self, value=None): """Corresponds to IDD Field `depth_soil_density` Args: value (float): value for IDD Field `depth_soil_density` Unit: kg/m3 if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_soil_density`'.format(value)) self._depth_soil_density = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_soil_specific_heat` <END_TASK> <USER_TASK:> Description: def depth_soil_specific_heat(self, value=None): """Corresponds to IDD Field `depth_soil_specific_heat` Args: value (float): value for IDD Field `depth_soil_specific_heat` Unit: J/kg-K, if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_soil_specific_heat`'.format(value)) self._depth_soil_specific_heat = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_january_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_january_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_january_average_ground_temperature` Args: value (float): value for IDD Field `depth_january_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_january_average_ground_temperature`'.format(value)) self._depth_january_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_february_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_february_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_february_average_ground_temperature` Args: value (float): value for IDD Field `depth_february_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_february_average_ground_temperature`'.format(value)) self._depth_february_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_march_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_march_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_march_average_ground_temperature` Args: value (float): value for IDD Field `depth_march_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_march_average_ground_temperature`'.format(value)) self._depth_march_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_april_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_april_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_april_average_ground_temperature` Args: value (float): value for IDD Field `depth_april_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_april_average_ground_temperature`'.format(value)) self._depth_april_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_may_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_may_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_may_average_ground_temperature` Args: value (float): value for IDD Field `depth_may_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_may_average_ground_temperature`'.format(value)) self._depth_may_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_june_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_june_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_june_average_ground_temperature` Args: value (float): value for IDD Field `depth_june_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_june_average_ground_temperature`'.format(value)) self._depth_june_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_july_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_july_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_july_average_ground_temperature` Args: value (float): value for IDD Field `depth_july_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_july_average_ground_temperature`'.format(value)) self._depth_july_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_august_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_august_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_august_average_ground_temperature` Args: value (float): value for IDD Field `depth_august_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_august_average_ground_temperature`'.format(value)) self._depth_august_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field <END_TASK> <USER_TASK:> Description: def depth_september_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_september_average_ground_temperature` Args: value (float): value for IDD Field `depth_september_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_september_average_ground_temperature`'.format(value)) self._depth_september_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_october_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_october_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_october_average_ground_temperature` Args: value (float): value for IDD Field `depth_october_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_october_average_ground_temperature`'.format(value)) self._depth_october_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_november_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_november_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_november_average_ground_temperature` Args: value (float): value for IDD Field `depth_november_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_november_average_ground_temperature`'.format(value)) self._depth_november_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `depth_december_average_ground_temperature` <END_TASK> <USER_TASK:> Description: def depth_december_average_ground_temperature(self, value=None): """Corresponds to IDD Field `depth_december_average_ground_temperature` Args: value (float): value for IDD Field `depth_december_average_ground_temperature` Unit: C if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = float(value) except ValueError: raise ValueError( 'value {} need to be of type float ' 'for field `depth_december_average_ground_temperature`'.format(value)) self._depth_december_average_ground_temperature = value
<SYSTEM_TASK:> Corresponds to IDD Field `holiday_name` <END_TASK> <USER_TASK:> Description: def holiday_name(self, value=None): """Corresponds to IDD Field `holiday_name` Args: value (str): value for IDD Field `holiday_name` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `holiday_name`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `holiday_name`') self._holiday_name = value
<SYSTEM_TASK:> Corresponds to IDD Field `holiday_day` <END_TASK> <USER_TASK:> Description: def holiday_day(self, value=None): """Corresponds to IDD Field `holiday_day` Args: value (str): value for IDD Field `holiday_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `holiday_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `holiday_day`') self._holiday_day = value
<SYSTEM_TASK:> Corresponds to IDD Field `daylight_saving_start_day` <END_TASK> <USER_TASK:> Description: def daylight_saving_start_day(self, value=None): """Corresponds to IDD Field `daylight_saving_start_day` Args: value (str): value for IDD Field `daylight_saving_start_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `daylight_saving_start_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `daylight_saving_start_day`') self._daylight_saving_start_day = value
<SYSTEM_TASK:> Corresponds to IDD Field `daylight_saving_end_day` <END_TASK> <USER_TASK:> Description: def daylight_saving_end_day(self, value=None): """Corresponds to IDD Field `daylight_saving_end_day` Args: value (str): value for IDD Field `daylight_saving_end_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `daylight_saving_end_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `daylight_saving_end_day`') self._daylight_saving_end_day = value
<SYSTEM_TASK:> Corresponds to IDD Field `comments_1` <END_TASK> <USER_TASK:> Description: def comments_1(self, value=None): """Corresponds to IDD Field `comments_1` Args: value (str): value for IDD Field `comments_1` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `comments_1`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `comments_1`') self._comments_1 = value
<SYSTEM_TASK:> Corresponds to IDD Field `comments_2` <END_TASK> <USER_TASK:> Description: def comments_2(self, value=None): """Corresponds to IDD Field `comments_2` Args: value (str): value for IDD Field `comments_2` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError('value {} need to be of type str ' 'for field `comments_2`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `comments_2`') self._comments_2 = value
<SYSTEM_TASK:> Corresponds to IDD Field `number_of_records_per_hour` <END_TASK> <USER_TASK:> Description: def number_of_records_per_hour(self, value=None): """Corresponds to IDD Field `number_of_records_per_hour` Args: value (int): value for IDD Field `number_of_records_per_hour` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = int(value) except ValueError: raise ValueError( 'value {} need to be of type int ' 'for field `number_of_records_per_hour`'.format(value)) self._number_of_records_per_hour = value
<SYSTEM_TASK:> Corresponds to IDD Field `data_period_name_or_description` <END_TASK> <USER_TASK:> Description: def data_period_name_or_description(self, value=None): """Corresponds to IDD Field `data_period_name_or_description` Args: value (str): value for IDD Field `data_period_name_or_description` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `data_period_name_or_description`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `data_period_name_or_description`') self._data_period_name_or_description = value
<SYSTEM_TASK:> Corresponds to IDD Field `data_period_start_day_of_week` <END_TASK> <USER_TASK:> Description: def data_period_start_day_of_week(self, value=None): """Corresponds to IDD Field `data_period_start_day_of_week` Args: value (str): value for IDD Field `data_period_start_day_of_week` Accepted values are: - Sunday - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `data_period_start_day_of_week`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `data_period_start_day_of_week`') vals = set() vals.add("Sunday") vals.add("Monday") vals.add("Tuesday") vals.add("Wednesday") vals.add("Thursday") vals.add("Friday") vals.add("Saturday") if value not in vals: raise ValueError( 'value {} is not an accepted value for ' 'field `data_period_start_day_of_week`'.format(value)) self._data_period_start_day_of_week = value
<SYSTEM_TASK:> Corresponds to IDD Field `data_period_start_day` <END_TASK> <USER_TASK:> Description: def data_period_start_day(self, value=None): """Corresponds to IDD Field `data_period_start_day` Args: value (str): value for IDD Field `data_period_start_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `data_period_start_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `data_period_start_day`') self._data_period_start_day = value
<SYSTEM_TASK:> Corresponds to IDD Field `data_period_end_day` <END_TASK> <USER_TASK:> Description: def data_period_end_day(self, value=None): """Corresponds to IDD Field `data_period_end_day` Args: value (str): value for IDD Field `data_period_end_day` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = str(value) except ValueError: raise ValueError( 'value {} need to be of type str ' 'for field `data_period_end_day`'.format(value)) if ',' in value: raise ValueError('value should not contain a comma ' 'for field `data_period_end_day`') self._data_period_end_day = value
<SYSTEM_TASK:> Corresponds to IDD Field `year` <END_TASK> <USER_TASK:> Description: def year(self, value=None): """Corresponds to IDD Field `year` Args: value (int): value for IDD Field `year` if `value` is None it will not be checked against the specification and is assumed to be a missing value Raises: ValueError: if `value` is not a valid value """
if value is not None: try: value = int(value) except ValueError: raise ValueError('value {} need to be of type int ' 'for field `year`'.format(value)) self._year = value