diff --git a/README.md b/README.md index df4d41cb..f8070f00 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,78 @@ -# Flask +# Report for Assignment 1 -Flask is a lightweight [WSGI][] web application framework. It is designed -to make getting started quick and easy, with the ability to scale up to -complex applications. It began as a simple wrapper around [Werkzeug][] -and [Jinja][], and has become one of the most popular Python web -application frameworks. +## Project chosen -Flask offers suggestions, but doesn't enforce any dependencies or -project layout. It is up to the developer to choose the tools and -libraries they want to use. There are many extensions provided by the -community that make adding new functionality easy. +Name: Flask -[WSGI]: https://wsgi.readthedocs.io/ -[Werkzeug]: https://werkzeug.palletsprojects.com/ -[Jinja]: https://jinja.palletsprojects.com/ +URL: https://github.com/pallets/flask + +Number of lines of code and the tool used to count it: 782430 counted using Lizard + +Programming language: Python + +## Coverage measurement + +### Existing tool + +The existing tool used for measuring coverage is coverage.py. It was executed using the following command: + +```coverage run -m pytest``` + +![Coverage results with the Coverage.py tool](./images/Coverage.png) + +### Your own coverage tool + +Group member name: Jannes van den Bogert + +Function 1 name: 'get_send_file_max_age' + +Commit made: [get_send_file_max_age](https://github.com/pallets/flask/commit/3c984992b97935e17d8f2d42c84128b397cd0e7e) + +![JSON Dumb file for the results](./images/JsonDumpDisGet.png) +![The coverage before writing a test](./images/Old_Get_Send_File_Max.png) -## A Simple Example +Function 2 name: dispatch_request -```python -# save this as app.py -from flask import Flask +Commit made: [Commit for dispatch_request](https://github.com/pallets/flask/commit/3c984992b97935e17d8f2d42c84128b397cd0e7e) -app = Flask(__name__) +![JSON Dumb file for the results](./images/JsonDumpDisGet.png) +![The coverage before writing a test](./images/Old_Dispatch.png) -@app.route("/") -def hello(): - return "Hello, World!" -``` +## Coverage improvement -``` -$ flask run - * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) -``` +### Individual tests +Group member name: Jannes van den Bogert -## Donate +Test 1 name: test_get_send_file_max_age -The Pallets organization develops and supports Flask and the libraries -it uses. In order to grow the community of contributors and users, and -allow the maintainers to devote more time to the projects, [please -donate today][]. + -[please donate today]: https://palletsprojects.com/donate +![The coverage before writing a test](./images/Old_Get_Send_File_Max.png) + +![The coverage after writing a test](./images/New_Get_Send_File_Max.png) + +The coverage improved by 54%, from 46% to 100%. + +Test 2 name: test_dispatch_request + + + +![The coverage before writing a test](./images/Old_Dispatch.png) + +![The coverage after writing a test](./images/New_Dispatch.png) + +The coverage improved by 58%, from 42% to 100%. + +### Overall + +![The overall coverage before writing any tests](./images/Coverage.png) + +![The overall coverage before writing any tests](./images/New_Total_Coverage.png) + +## Statement of individual contributions + + + +Jannes van den Bogert: \ No newline at end of file diff --git a/images/Coverage.png b/images/Coverage.png new file mode 100644 index 00000000..c6df0d7d Binary files /dev/null and b/images/Coverage.png differ diff --git a/images/JsonDumpDisGet.png b/images/JsonDumpDisGet.png new file mode 100644 index 00000000..12d8f198 Binary files /dev/null and b/images/JsonDumpDisGet.png differ diff --git a/images/New_Dispatch.png b/images/New_Dispatch.png new file mode 100644 index 00000000..c0ea5623 Binary files /dev/null and b/images/New_Dispatch.png differ diff --git a/images/New_Get_Send_File_Max.png b/images/New_Get_Send_File_Max.png new file mode 100644 index 00000000..58ea8423 Binary files /dev/null and b/images/New_Get_Send_File_Max.png differ diff --git a/images/New_Total_Coverage.png b/images/New_Total_Coverage.png new file mode 100644 index 00000000..2b7e40c7 Binary files /dev/null and b/images/New_Total_Coverage.png differ diff --git a/images/Old_Dispatch.png b/images/Old_Dispatch.png new file mode 100644 index 00000000..768e407d Binary files /dev/null and b/images/Old_Dispatch.png differ diff --git a/images/Old_Get_Send_File_Max.png b/images/Old_Get_Send_File_Max.png new file mode 100644 index 00000000..2b18e020 Binary files /dev/null and b/images/Old_Get_Send_File_Max.png differ