- Introduction
- Setup
- Techstack
- API used
- Maintainer
Weather or Not is a simple weather app which fetches data from an API to display current weather forecast of the place chosen in preferred language. Currently three languages are supported. It also gives a three day forecast.
- Clone or download the code from the repository.
- Navigate to the project folder WeatherOrNot
- Install the dependencies by running
pip install -r requirements.txt
- Install flask
pip install flask
- Get API key from WeatherAPI.com and assign it in `constants.py
- Run command
flask run
- In your browser go to
localhost:5000
To enter into developer mode and debug run the following commands
set FLASK_ENV=development
set FLASK_DEBUG=1
set FLASK_APP=app.py
Testing is done using the nose framework.
- Install the dependencies for testing
pip install -r test-requirements.txt
- Navigate to the test folder. To run the tests
nosetests testsdk.py -v
Exception handling and Time to retrieve information is tested. When a user enters invalid place, an exception should be thrown. Since weather updates must be real-time, the time taken to retrieve information is critical.
Test id | Test name | Test Description | Test Input | Expected Output | Test Result |
---|---|---|---|---|---|
T01 | test_weather_with_invalid_place | Exception should be thrown for invalid place entered | Place: qqqww, Language= en | Exception Thrown | Pass |
T02 | test_forecast_with_invalid_place | Exception should be thrown for invalid place entered | Place: qqqqq, Language= en | Exception Thrown | Pass |
T03 | test_time_Weather | Test should pass within time limit | <0.9 | Executed before 0.9 | Pass |
T04 | test_time_Forecast | Test should pass within time limit | <0.9 | Executed before 0.9 | Pass |
python 3.8.3
flask 1.1.2
HTML5
CSS
Powered by WeatherAPI.com
This project has been developed in the second round of UBS Avant Garde Engineering Challenge in the time period of seven days. The contributor to the project is :
- Mr. Vaibhav Bhujade (
VaibhavBhujade
)