New weather module

Bug #224686 reported by Jamie Bennett
4
Affects Status Importance Assigned to Milestone
Entertainer Media Center
Fix Released
Low
Jamie Bennett

Bug Description

** IMPORTED FROM GOOGLE CODE **

Reported by xanium4332, Feb 09, 2008

Create a weather module, allowing local weather information to be
easily/quickly accessed in a nice interface.

Comment 1 by laymansterms.dev, Mar 06, 2008

(No comment was entered for this change.)

Status: Started
Owner: laymansterms.dev
Comment 2 by laymansterms.dev, Mar 08, 2008

(No comment was entered for this change.)

Status: Accepted
Owner: joshuascotton
Comment 3 by joshuascotton, Mar 08, 2008

Added Weather and WeatherForecast classes to utils.weather
Need to work on the frontend and also create a configuration tool in content manager

Status: Started

Tags: enhancement
Revision history for this message
Matt Layman (mblayman) wrote :

Migrating info over from Google Code.

Changed in entertainer:
importance: Undecided → Wishlist
status: New → In Progress
Revision history for this message
Jamie Bennett (jamiebennett) wrote :

======================================================================
FAIL: testWeatherSearch (Weather_test.WeatherTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jamie/develop/bug-224691/src/tests/Weather_test.py", line 49, in testWeatherSearch
    self.assertEqual(self.weather.search("derby"),[("UKXX0040","Europe > United Kingdom > Derby")])
AssertionError: [] != [('UKXX0040', 'Europe > United Kingdom > Derby')]

Changed in entertainer:
assignee: nobody → jamie-bennett-gmail
importance: Wishlist → Low
Revision history for this message
John (jc453) wrote :

Attempting the same tests in a console reveal the problem to be here:

 def search(self, search_string):
        """
        Searchs Yahoo for location in search_string and returns list of tuples
        @param search_string String
        @return list(tuple(location_id String, PlaceName String))
        """
        response = self.find_weather_search_results_page(search_string)

        if response.status == 302:
            redirect_url = response.getheader('location', '')
            the_code = redirect_url[10:len(redirect_url)-5]

            the_placename = self.get_location_from_id(the_code)

            return [(the_code, the_placename)]
        else:
            return []

The actual response.status is 301, although simply changing the if statement to 301 does not fix it. I did not investigate it further.

Revision history for this message
Jamie Bennett (jamiebennett) wrote :

I'll take a look at this.

Paul Hummer (rockstar)
Changed in entertainer:
milestone: none → 0.1-release
Revision history for this message
Joshua Scotton (joshuascotton) wrote :

Jamie, your branch has been merged, can this be marked as 'Fix Committed' now?

Revision history for this message
Paul Hummer (rockstar) wrote :

No, this branch cannot be marked 'Fix Committed' until the images for weather have landed, and they hadn't yet. I merged in Jamie's branch but it's not the complete feature yet.

Revision history for this message
Joshua Scotton (joshuascotton) wrote :

Jamie, I downloaded your branch and ran the tests, I got three failures which were down to this:

in theme.py on line 106 change
        self.image['weather-cloudy'] = os.path.join(img_path, "weather/clouds.png")
to
        self.image['weather-clouds'] = os.path.join(img_path, "weather/clouds.png")

I did that in my local copy and it fixed the tests

Changed in entertainer:
status: In Progress → Fix Committed
Revision history for this message
Matt Layman (mblayman) wrote :
Changed in entertainer:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.