Adding the documentation and screenshots
97
README.md
|
|
@ -1,45 +1,78 @@
|
||||||
# Flask
|
# Report for Assignment 1
|
||||||
|
|
||||||
Flask is a lightweight [WSGI][] web application framework. It is designed
|
## Project chosen
|
||||||
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.
|
|
||||||
|
|
||||||
Flask offers suggestions, but doesn't enforce any dependencies or
|
Name: Flask
|
||||||
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.
|
|
||||||
|
|
||||||
[WSGI]: https://wsgi.readthedocs.io/
|
URL: https://github.com/pallets/flask
|
||||||
[Werkzeug]: https://werkzeug.palletsprojects.com/
|
|
||||||
[Jinja]: https://jinja.palletsprojects.com/
|
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```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 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)
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
## A Simple Example
|
Function 2 name: dispatch_request
|
||||||
|
|
||||||
```python
|
Commit made: [Commit for dispatch_request](https://github.com/pallets/flask/commit/3c984992b97935e17d8f2d42c84128b397cd0e7e)
|
||||||
# save this as app.py
|
|
||||||
from flask import Flask
|
|
||||||
|
|
||||||
app = Flask(__name__)
|

|
||||||
|

|
||||||
|
|
||||||
@app.route("/")
|
## Coverage improvement
|
||||||
def hello():
|
|
||||||
return "Hello, World!"
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
### Individual tests
|
||||||
$ flask run
|
|
||||||
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
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
|
<Show a patch (diff) or a link to a commit made in your forked repository that shows the new/enhanced test>
|
||||||
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 improved by 54%, from 46% to 100%.
|
||||||
|
|
||||||
|
Test 2 name: test_dispatch_request
|
||||||
|
|
||||||
|
<Show a patch (diff) or a link to a commit made in your forked repository that shows the new/enhanced test>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The coverage improved by 58%, from 42% to 100%.
|
||||||
|
|
||||||
|
### Overall
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Statement of individual contributions
|
||||||
|
|
||||||
|
<Write what each group member did>
|
||||||
|
|
||||||
|
Jannes van den Bogert:
|
||||||
BIN
images/Coverage.png
Normal file
|
After Width: | Height: | Size: 558 KiB |
BIN
images/JsonDumpDisGet.png
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
images/New_Dispatch.png
Normal file
|
After Width: | Height: | Size: 446 KiB |
BIN
images/New_Get_Send_File_Max.png
Normal file
|
After Width: | Height: | Size: 295 KiB |
BIN
images/New_Total_Coverage.png
Normal file
|
After Width: | Height: | Size: 531 KiB |
BIN
images/Old_Dispatch.png
Normal file
|
After Width: | Height: | Size: 461 KiB |
BIN
images/Old_Get_Send_File_Max.png
Normal file
|
After Width: | Height: | Size: 186 KiB |