-
Accepts latitude and longitude coordinates
-
Returns the short forecast for that area for Today (“Partly Cloudy” etc)
-
Returns a characterization of whether the temperature is “hot”, “cold”, or “moderate” (use your discretion on mapping temperatures to each type)
-
Use the National Weather Service API Web Service as a data source.
The purpose of this exercise is to provide a sample of your work that we can discuss together in the Technical Interview.
· We respect your time. Spend as long as you need, but we intend it to take around an hour.
· We do not expect a production-ready service, but you might want to comment on your shortcuts.
· The submitted project should build and have brief instructions so we can verify that it works.
· You may write in whatever language or stack you're most comfortable in, but the technical interviewers are most familiar with Typelevel Scala.
-
Create a virtual environment
python3 -m venv venvdir -
Start virtual environment
source venvdir/bin/activate -
Install requirements
pip3 install -r requirements.txt
-
Start Flask
python3 -m flask --app=weather_server.py run -
Naviage to index page in a browser to see app information
http://127.0.0.1:5000 -
Navigate to forecast page via the /forecast/{latitude},{longitude} endpoint
http://127.0.0.1:5000/forecast/39.7456,-97.0892
-
Run pytest from the root of the WeatherServer directory
pytest tests