_custom_build | ||
.ci | ||
.github | ||
depends | ||
docs | ||
myenv | ||
pillowenv | ||
report_images | ||
src | ||
Tests | ||
wheels | ||
winbuild | ||
.appveyor.yml | ||
.clang-format | ||
.coveragerc | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.pre-commit-config.yaml | ||
.readthedocs.yml | ||
CHANGES.rst | ||
codecov.yml | ||
conftest.py | ||
libwebp-1.4.0.tar.gz | ||
LICENSE | ||
Makefile | ||
MANIFEST.in | ||
merged_image.png | ||
pyproject.toml | ||
README_original.md | ||
README.md | ||
RELEASING.md | ||
selftest.py | ||
setup.py | ||
tox.ini |
Report for Assignment 1
Project chosen
Name: Pillow
URL of our repository: https://github.com/jovanovicisidora/Pillow-SEP.git
URL of the original repo: https://github.com/python-pillow/Pillow.git
Number of lines of code and the tool used to count it:
- Tool used: coverage.py
- Number of lines of code: 82 KLOC
Programming language: Python
Coverage measurement
Existing tool
We used Coverage.py. We executed the coverage tool by running the following command:
python3 -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term Tests $REVERSE
This resulted in the following output:
Your own coverage tool
<Function 1 name>
<Show a patch (diff) or a link to a commit made in your forked repository that shows the instrumented code to gather coverage measurements>
<Function 2 name>
<Provide the same kind of information provided for Function 1>
Each member of out group has chosen two functions and has instrumented our own coverage tool. For each function we created a dictionary with the branch ID as key, and a boolean as the value. If the branch was accessed by the tests, the boolean value would be changed from False to True. In order to calculate and display the coverage, all tests use the shared code in conftest.py.
1. Deekshu
-
Function 1:
buildTransform()
from ImageCms.py -
Function 2:
encode_to_file
from ImageFile.py
2. Duru
3. Isidora
-
Function 1:
_save()
from SpiderImagePlugin.py -
Function 2:
Bitstream.peek()
from MpegImagePlugin.py
4. Sofija
Coverage improvement
Individual tests
<Test 1>
<Show a patch (diff) or a link to a commit made in your forked repository that shows the new/enhanced test>
<Provide a screenshot of the old coverage results (the same as you already showed above)>
<Test 2>
<Provide the same kind of information provided for Test 1>
1. Deekshu
-
Function 1:
buildTransform()
from ImageCms.py -
Function 2:
encode_to_file
from ImageFile.pyLink to the commit - how to show the diff patch
2. Duru
3. Isidora
-
Function 1:
_save()
from SpiderImagePlugin.py -
Function 2:
Bitstream.peek()
from MpegImagePlugin.py
4. Sofija
Overall
First we provide a screenshot of the old coverage results by running an existing tool:
Here we show the improved overall coverage with all test modifications made by out group:
Statement of individual contributions
Each group member had an equal contribution to the assignment. We first met together to determine how we can make a coverage tool that can be used across all functions (in conftest.py). Then, each member chose two functions to instrument our coverage tool on and to make/enhance tests for their branch improvement. The specific functions each member chose can be seen in the report above.