# Path: resources/openweathermap/constants.py
# class CloudCoverage:
#     SUNNY_MIN = 0
#     SUNNY_MAX = 15
#     MOSTLY_SUNNY_MIN = 15
#     MOSTLY_SUNNY_MAX = 35
#     PARTLY_CLOUDY_MIN = 35
#     PARTLY_CLOUDY_MAX = 65
#     MOSTLY_CLOUDY_MIN = 65
#     MOSTLY_CLOUDY_MAX = 85
#     CLOUDY_MIN = 85
#     CLOUDY_MAX = 100


from resources.openweathermap.constants import CloudCoverage
from resources.constants import *
# -*- coding: utf-8 -*-


################################################################################
#
# WeatherLog: clouds.py
# This module converts cloudiness percentage to a human readable term.
#
################################################################################


# Import application modules.


def percent_to_term(perc):
    """Converts cloudiness percentage to a human readable term."""
    
    if CloudCoverage.SUNNY_MIN <= perc <= CloudCoverage.SUNNY_MAX:
        return CloudCoverageType.SUNNY
    
    elif CloudCoverage.MOSTLY_SUNNY_MIN < perc <= CloudCoverage.MOSTLY_SUNNY_MAX:
        return CloudCoverageType.MOSTLY_SUNNY
    
    elif CloudCoverage.PARTLY_CLOUDY_MIN < perc <= CloudCoverage.PARTLY_CLOUDY_MAX:
        return CloudCoverageType.PARTLY_CLOUDY
    
    elif CloudCoverage.MOSTLY_CLOUDY_MIN < perc <= CloudCoverage.MOSTLY_CLOUDY_MAX:
        return CloudCoverageType.MOSTLY_CLOUDY
    

# Path: resources/openweathermap/constants.py
# class CloudCoverage:
#     SUNNY_MIN = 0
#     SUNNY_MAX = 15
#     MOSTLY_SUNNY_MIN = 15
#     MOSTLY_SUNNY_MAX = 35
#     PARTLY_CLOUDY_MIN = 35
#     PARTLY_CLOUDY_MAX = 65
#     MOSTLY_CLOUDY_MIN = 65
#     MOSTLY_CLOUDY_MAX = 85
#     CLOUDY_MIN = 85
#     CLOUDY_MAX = 100


# Path: resources/clouds.py
from resources.openweathermap.constants import CloudCoverage
from resources.constants import *

# -*- coding: utf-8 -*-


################################################################################
#
# WeatherLog: clouds.py
# This module converts cloudiness percentage to a human readable term.
#
################################################################################


# Import application modules.


def percent_to_term(perc):
    """Converts cloudiness percentage to a human readable term."""
    
    if CloudCoverage.SUNNY_MIN <= perc <= CloudCoverage.SUNNY_MAX:
        return CloudCoverageType.SUNNY
    
    elif CloudCoverage.MOSTLY_SUNNY_MIN < perc <= CloudCoverage.MOSTLY_SUNNY_MAX:
        return CloudCoverageType.MOSTLY_SUNNY
    
    elif CloudCoverage.PARTLY_CLOUDY_MIN < perc <= CloudCoverage.PARTLY_CLOUDY_MAX:
        return CloudCoverageType.PARTLY_CLOUDY
    
    elif CloudCoverage.MOSTLY_CLOUDY_MIN < perc <= CloudCoverage.MOSTLY_CLOUDY_MAX:
        return CloudCoverageType.MOSTLY_CLOUDY
    

    elif CloudCoverage.CLOUDY_MIN < perc <= CloudCoverage.CLOUDY_MAX: