Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forecast.io backend progress #83

Closed
7 of 8 tasks
schachmat opened this issue Mar 31, 2016 · 10 comments
Closed
7 of 8 tasks

forecast.io backend progress #83

schachmat opened this issue Mar 31, 2016 · 10 comments
Milestone

Comments

@schachmat
Copy link
Owner

schachmat commented Mar 31, 2016

I pushed the first version of the forecast.io backend to the forecast.io branch. Some points need to be adressed before merging into master:

  • double-check to implement the maximum possible of the iface in condition
  • min- and max-temperature for daily data
  • astronomy for daily data
  • remove debugging code and commented out code
  • restrict return value of Fetch to the requested number of days
  • add language flag
  • add call to time machine api to get "forecast" for the passed time of the current day
  • (optional) is there a better possibility to specify location other than a lat,lon string?
@khalilfazal
Copy link

I'm having trouble using the forecast.io backend with that branch. After cloning that branch, building, changing the .wegorc, and running I get:

$ ./wego 
2016/04/01 04:25:03 Could not find selected backend "forecast.io"

Also I've noticed that this branch needs to update the routine that initially creates the .wegorc file. It contains keys such as:

# wwo backend: the api KEY to use (default )
wwo-api-key=

but no corresponding key for forecast.io like this:

# forecast.io backend: the api KEY to use (default )
forecast-io-api-key=

@schachmat
Copy link
Owner Author

Hm, works for me. Can you double check you actually built the version with a backends/forecast.io.go file and did indeed run this newly built binary instead of an old one? Maybe the build process failed and you ran an old version. Also bear in mind that you have to specify the location as "LAT, LON" for this backend.

@khalilfazal
Copy link

That couldn't be the case, the binaries are in different locations. The wwo one is in my $GOPATH (~/go) and the forecast.io one is in my git directory (~/git), the latter of which indeed has the backends/forecast.io.go file.

How do I specify the location as "LAT, LON"? Do I do something like this in .wegorc?:

# LOCATION to be queried (default New York)
city=LAT, LON

@schachmat
Copy link
Owner Author

yes, but without the space in between. Example for New York:

city=40.748,-73.985

However this will probably not fix your error.

@schachmat
Copy link
Owner Author

Update! The forecast.io backend should now be in a usable state (see todo list in first post). @camelinc and other interested people: You have 48 hours to test the new backend in the forecast.io branch, then I will push the branch onto master.

@khalilfazal
Copy link

I fixed the issue I was having. My problem was that one has to use the right config key for forecast: forecast-api-key=. I don't think that's documented anywhere @schachmat, so make sure it is. Everything works on my end.

@schachmat
Copy link
Owner Author

Indeed, thanks for the feedback. I just pushed an update, so that a nice error message appears when no API key is specified.

@Daml
Copy link
Contributor

Daml commented Apr 8, 2016

Just discover wego today, thanks a lot.

This branch seems to work but lake of doc, so i'v added this in f71e948. Using the location flag instead of city to fit with a39c3f3.

@schachmat schachmat added this to the 3.0 milestone Apr 9, 2016
@schachmat
Copy link
Owner Author

Thanks @Daml, I merged your commit and slightly adapted it. The forecast.io branch has now been rebased onto master and is the new default backend. This issue stays open until at least the two non-optional points are fixed.

@schachmat
Copy link
Owner Author

Closing this since the last remaining todo is tracked by #87.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants