Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #199 from azavea/feature/no_daily_indicators
Browse files Browse the repository at this point in the history
Remove raw daily indicators
  • Loading branch information
rmartz authored Dec 30, 2016
2 parents 7fd6b0b + e0fc75b commit eaec024
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
29 changes: 2 additions & 27 deletions django/climate_change_api/indicators/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
from .abstract_indicators import (Indicator, CountIndicator, BasetempIndicatorMixin,
YearlyMaxConsecutiveDaysIndicator, YearlySequenceIndicator)
from .params import DegreeDayIndicatorParams, Percentile1IndicatorParams, Percentile99IndicatorParams
from .unit_converters import (TemperatureUnitsMixin, PrecipUnitsMixin, PrecipRateUnitsMixin,
DaysUnitsMixin, CountUnitsMixin, TemperatureDeltaUnitsMixin,
SECONDS_PER_DAY)
from .unit_converters import (TemperatureUnitsMixin, PrecipUnitsMixin, DaysUnitsMixin,
CountUnitsMixin, TemperatureDeltaUnitsMixin, SECONDS_PER_DAY)


##########################
Expand Down Expand Up @@ -177,30 +176,6 @@ def aggregate(self):
return super(HeatWaveDurationIndex, self).aggregate()


##########################
# Raw value indicators

class LowTemperature(TemperatureUnitsMixin, Indicator):
label = 'Low Temperature'
description = ('Daily low temperature')
valid_aggregations = ('daily',)
variables = ('tasmin',)


class HighTemperature(TemperatureUnitsMixin, Indicator):
label = 'High Temperature'
description = ('Daily high temperature')
valid_aggregations = ('daily',)
variables = ('tasmax',)


class Precipitation(PrecipRateUnitsMixin, Indicator):
label = 'Precipitation'
description = ('Daily precipitation')
valid_aggregations = ('daily',)
variables = ('pr',)


def list_available_indicators():
""" List the defined class members of this module as the available indicators """
class_members = inspect.getmembers(sys.modules[__name__], inspect.isclass)
Expand Down
4 changes: 2 additions & 2 deletions django/climate_change_api/indicators/tests/test_indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def test_unit_conversion(self):


class DailyHighTemperatureTestCase(TemperatureIndicatorTests, TestCase):
indicator_class = indicators.HighTemperature
indicator_name = 'high_temperature'
indicator_class = indicators.AverageHighTemperature
indicator_name = 'average_high_temperature'
time_aggregation = 'daily'
units = 'K'
test_indicator_rcp85_equals = {'2000-01-01': {'avg': 35.0, 'max': 40.0, 'min': 30.0}}
Expand Down

0 comments on commit eaec024

Please sign in to comment.