-
Notifications
You must be signed in to change notification settings - Fork 2
Individual Contribution Report of Milestone 2 Alp Tuna
Alputer edited this page May 12, 2023
·
1 revision
- Create Home Page For Practice App : I created home page of our application which contains links to each subapplication that the team members created.
- Create a Simple Weather App : I created an application which includes a search bar and returns the weather status of the given city. It also includes 2 additional endpoints which returns a json response.
- Add Tests for Weather App : I added tests for each endpoint of my application that checks whether we receive an error or not upon request.
- Add links of the apps to the home page : I added each member's project url's to the html of our homepage so that users can navigate to each subapplication from homepage.
- Add swagger for Weather Application - Alp : I added swagger for our application in order to document the api better. It is quite important to improve the readibility and utilization of API.
- Deployment Of The Application : I opened a docker hub account and took an active role on deployment process. We applied almost same commands from our Student assistant Karahan's dockerizaton and deployment videos since we also used Django as our application. Thanks Karahan!
- Individual Contribution Report 2 - Alp Tuna : I documented this report :D
This api fetches many useful data about the weather situation about the given city. Please that you need to enter city_name manually between curly braces.
- http://13.50.251.248:8000/weather-app/ : You can fetch the web page with get request. After searching for a city you can send a post request by clicking search button. This saves the searched city and the corresponding weather data into our database.
- http://13.50.251.248:8000/weather-app/istanbul/ : You can get the weather data of istanbul via this endpoint. It returns a json data.
- http://13.50.251.248:8000/weather-app/all-weathers/ : You can get the weather data of all cities that have been searched in the weather application so far.
- Unit test 1
This test case sends a request to http://13.50.251.248:8000/weather-app/ endpoint and checks the response if it is successfull or not.
def test_feedback_creation(self):
city = {"city": 'istanbul'}
url = ''
response = self.client.post(self.relative_path + url, city, format='json')
self.assertEqual(response.status_code, 200)
- Unit test 2
This test case sends a request to http://13.50.251.248:8000/weather-app/istanbul/ endpoint and checks the response if it is successfull or not.
def test_istanbul_end_point(self):
url = "istanbul/"
response = self.client.get(self.relative_path + url)
self.assertEqual(response.status_code, 200)
- Unit test 3
This test case sends a request to http://13.50.251.248:8000/weather-app/all-weathers endpoint and checks the response if it is successfull or not.
def test_all_weathers_end_point(self):
url = "all-weathers/"
response = self.client.get(self.relative_path + url)
self.assertEqual(response.status_code, 200)
You can check them via our swagger endpoint. http://13.50.251.248:8000/swagger/
Things I did for this milestone:
- Learned django
- Implement home page of the application
- Implement a weather application
- Implement unit tests for weather application
- Review the pull requests of 6 members.
- Take active role on dockerization and deployment process.
- I did not know any prior knowledge on django and needed to learn it quickly to implement the practice app. It was quite challenging to implement an app that I didn't know at all but this is a quite important skill for software engineering.
- I needed to review codes of other team members. I did not do a similar thing before in my career. Therefore, understanding the code, giving feedback for readibility and maintainability of our application was quite challenging.
- I implemented unit tests for the first time in my life. It was quite instructive and I appreciated its importance.
- I did not know dockerization and deployment process before. Learning them were also quite challenging.
- Coming up with an example app was also challenging.