added the new readme, my report, and the screenshots

This commit is contained in:
isidorajovanovic 2024-06-22 15:54:52 +02:00
parent 70f6735620
commit f4f8728ee8
9 changed files with 251 additions and 115 deletions

251
README.md
View File

@ -1,115 +1,136 @@
<p align="center"> # Report for Assignment 1
<img width="248" height="250" src="https://raw.githubusercontent.com/python-pillow/pillow-logo/main/pillow-logo-248x250.png" alt="Pillow logo">
</p> ## Project chosen
# Pillow Name: Pillow
## Python Imaging Library (Fork) URL of our repository: https://github.com/jovanovicisidora/Pillow-SEP.git
Pillow is the friendly PIL fork by [Jeffrey A. Clark and URL of the original repo: https://github.com/python-pillow/Pillow.git
contributors](https://github.com/python-pillow/Pillow/graphs/contributors).
PIL is the Python Imaging Library by Fredrik Lundh and contributors. Number of lines of code and the tool used to count it:
As of 2019, Pillow development is - Tool used: coverage.py
[supported by Tidelift](https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=readme&utm_campaign=enterprise). - Number of lines of code: 82 KLOC
<table> Programming language: Python
<tr>
<th>docs</th> ## Coverage measurement
<td>
<a href="https://pillow.readthedocs.io/?badge=latest"><img ### Existing tool
alt="Documentation Status"
src="https://readthedocs.org/projects/pillow/badge/?version=latest"></a> <Inform the name of the existing tool that was executed and how it was executed>
</td>
</tr> <Show the coverage results provided by the existing tool with a screenshot>
<tr>
<th>tests</th> We used Coverage.py. We executed the coverage tool by running the following command:
<td>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/lint.yml"><img `python3 -bb -m pytest -v -x -W always --cov PIL --cov Tests --cov-report term Tests $REVERSE`
alt="GitHub Actions build status (Lint)"
src="https://github.com/python-pillow/Pillow/workflows/Lint/badge.svg"></a> This resulted in the following output:
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test.yml"><img
alt="GitHub Actions build status (Test Linux and macOS)" ![Coverage Tool Result](report_images/isidora_images/[BEFORE]overall_coverage.png)
src="https://github.com/python-pillow/Pillow/workflows/Test/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-windows.yml"><img ### Your own coverage tool
alt="GitHub Actions build status (Test Windows)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Windows/badge.svg"></a> <The following is supposed to be repeated for each group member>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-mingw.yml"><img
alt="GitHub Actions build status (Test MinGW)" <Group member name>
src="https://github.com/python-pillow/Pillow/workflows/Test%20MinGW/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-cygwin.yml"><img <Function 1 name>
alt="GitHub Actions build status (Test Cygwin)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Cygwin/badge.svg"></a> <Show a patch (diff) or a link to a commit made in your forked repository that shows the instrumented code to gather
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-docker.yml"><img coverage measurements>
alt="GitHub Actions build status (Test Docker)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Docker/badge.svg"></a> <Provide a screenshot of the coverage results output by the instrumentation>
<a href="https://ci.appveyor.com/project/python-pillow/Pillow"><img
alt="AppVeyor CI build status (Windows)" <Function 2 name>
src="https://img.shields.io/appveyor/build/python-pillow/Pillow/main.svg?label=Windows%20build"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml"><img <Provide the same kind of information provided for Function 1>
alt="GitHub Actions build status (Wheels)"
src="https://github.com/python-pillow/Pillow/workflows/Wheels/badge.svg"></a> Each member of out group has chosen two functions and has instrumented our own coverage tool. For each function we
<a href="https://app.codecov.io/gh/python-pillow/Pillow"><img created a dictionary with the branch ID as key, and a boolean as the value. If the branch was accessed by the tests,
alt="Code coverage" the boolean value would be changed from False to True. In order to calculate and display the coverage, all tests use
src="https://codecov.io/gh/python-pillow/Pillow/branch/main/graph/badge.svg"></a> the shared code in **conftest.py**.
<a href="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:pillow"><img
alt="Fuzzing Status" **1. Deekshu**
src="https://oss-fuzz-build-logs.storage.googleapis.com/badges/pillow.svg"></a>
</td> **2. Duru**
</tr>
<tr> **3. Isidora**
<th>package</th>
<td> - Function 1: `_save()` from **SpiderImagePlugin.py**
<a href="https://zenodo.org/badge/latestdoi/17549/python-pillow/Pillow"><img
alt="Zenodo" [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/5701d33cbb789342ca781769d4ba7cd323c9255e#diff-44debbfd4d0c5a80130a15bdcd9e0b28c1b4fef6eda0eaaef48838c954589d15)
src="https://zenodo.org/badge/17549/python-pillow/Pillow.svg"></a>
<a href="https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=badge"><img <img src="report_images/isidora_images/our_tool_save.png" alt="Implemented Coverage Tool" width="600" />
alt="Tidelift"
src="https://tidelift.com/badges/package/pypi/pillow?style=flat"></a> - Function 2: `Bitstream.peek()` from **MpegImagePlugin.py**
<a href="https://pypi.org/project/pillow/"><img
alt="Newest PyPI version" [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-0272f0c6b5871be3364fe2062e50944fba30dad9625c74d13340de7d3ad8d367)
src="https://img.shields.io/pypi/v/pillow.svg"></a>
<a href="https://pypi.org/project/pillow/"><img <img src="report_images/isidora_images/our_tool_peek.png" alt="Implemented Coverage Tool" width="600" />
alt="Number of PyPI downloads"
src="https://img.shields.io/pypi/dm/pillow.svg"></a> **4. Sofija**
<a href="https://www.bestpractices.dev/projects/6331"><img
alt="OpenSSF Best Practices" ## Coverage improvement
src="https://www.bestpractices.dev/projects/6331/badge"></a>
</td> ### Individual tests
</tr>
<tr> <The following is supposed to be repeated for each group member>
<th>social</th>
<td> <Group member name>
<a href="https://gitter.im/python-pillow/Pillow?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img
alt="Join the chat at https://gitter.im/python-pillow/Pillow" <Test 1>
src="https://badges.gitter.im/python-pillow/Pillow.svg"></a>
<a href="https://fosstodon.org/@pillow"><img <Show a patch (diff) or a link to a commit made in your forked repository that shows the new/enhanced test>
alt="Follow on https://fosstodon.org/@pillow"
src="https://img.shields.io/badge/publish-on%20Mastodon-595aff.svg" <Provide a screenshot of the old coverage results (the same as you already showed above)>
rel="me"></a>
</td> <Provide a screenshot of the new coverage results>
</tr>
</table> <State the coverage improvement with a number and elaborate on why the coverage is improved>
## Overview <Test 2>
The Python Imaging Library adds image processing capabilities to your Python interpreter. <Provide the same kind of information provided for Test 1>
This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities. **1. Deekshu**
The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool. **2. Duru**
## More Information **3. Isidora**
- [Documentation](https://pillow.readthedocs.io/) - Function 1: `_save()` from **SpiderImagePlugin.py**
- [Installation](https://pillow.readthedocs.io/en/latest/installation/basic-installation.html)
- [Handbook](https://pillow.readthedocs.io/en/latest/handbook/index.html) [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-f0eb82b90cfc005f681c774b3bf87f19b1db010750e49f850883005f4f623202)
- [Contribute](https://github.com/python-pillow/Pillow/blob/main/.github/CONTRIBUTING.md)
- [Issues](https://github.com/python-pillow/Pillow/issues) <img src="report_images/isidora_images/[BEFORE]_save.png" alt="Coverage Before" width="600" />
- [Pull requests](https://github.com/python-pillow/Pillow/pulls)
- [Release notes](https://pillow.readthedocs.io/en/stable/releasenotes/index.html) <img src="report_images/isidora_images/[AFTER]_save.png" alt="Coverage After" width="600" />
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Pre-fork](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst#pre-fork) - Function 2: `Bitstream.peek()` from **MpegImagePlugin.py**
## Report a Vulnerability [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-48e5b5451c5cab3fbb758ae58649082b62ae6f2850393a332949643d75bd4ad2)
To report a security vulnerability, please follow the procedure described in the [Tidelift security policy](https://tidelift.com/docs/security). <img src="report_images/isidora_images/[BEFORE]peek.png" alt="Coverage Before" width="600" />
<img src="report_images/isidora_images/[AFTER]peek.png" alt="Coverage After" width="600" />
**4. Sofija**
### Overall
First we provide a screenshot of the old coverage results by running an existing tool:
![Coverage Results Before](report_images/isidora_images/[BEFORE]overall_coverage.png)
Here we show the improved overall coverage with all test modifications made by out group:
![Coverage Results After](path/to/image)
## 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 them.
The specific functions each member chose can be seen in the report above.

115
README_original.md Normal file
View File

@ -0,0 +1,115 @@
<p align="center">
<img width="248" height="250" src="https://raw.githubusercontent.com/python-pillow/pillow-logo/main/pillow-logo-248x250.png" alt="Pillow logo">
</p>
# Pillow
## Python Imaging Library (Fork)
Pillow is the friendly PIL fork by [Jeffrey A. Clark and
contributors](https://github.com/python-pillow/Pillow/graphs/contributors).
PIL is the Python Imaging Library by Fredrik Lundh and contributors.
As of 2019, Pillow development is
[supported by Tidelift](https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=readme&utm_campaign=enterprise).
<table>
<tr>
<th>docs</th>
<td>
<a href="https://pillow.readthedocs.io/?badge=latest"><img
alt="Documentation Status"
src="https://readthedocs.org/projects/pillow/badge/?version=latest"></a>
</td>
</tr>
<tr>
<th>tests</th>
<td>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/lint.yml"><img
alt="GitHub Actions build status (Lint)"
src="https://github.com/python-pillow/Pillow/workflows/Lint/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test.yml"><img
alt="GitHub Actions build status (Test Linux and macOS)"
src="https://github.com/python-pillow/Pillow/workflows/Test/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-windows.yml"><img
alt="GitHub Actions build status (Test Windows)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Windows/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-mingw.yml"><img
alt="GitHub Actions build status (Test MinGW)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20MinGW/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-cygwin.yml"><img
alt="GitHub Actions build status (Test Cygwin)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Cygwin/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-docker.yml"><img
alt="GitHub Actions build status (Test Docker)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Docker/badge.svg"></a>
<a href="https://ci.appveyor.com/project/python-pillow/Pillow"><img
alt="AppVeyor CI build status (Windows)"
src="https://img.shields.io/appveyor/build/python-pillow/Pillow/main.svg?label=Windows%20build"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml"><img
alt="GitHub Actions build status (Wheels)"
src="https://github.com/python-pillow/Pillow/workflows/Wheels/badge.svg"></a>
<a href="https://app.codecov.io/gh/python-pillow/Pillow"><img
alt="Code coverage"
src="https://codecov.io/gh/python-pillow/Pillow/branch/main/graph/badge.svg"></a>
<a href="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:pillow"><img
alt="Fuzzing Status"
src="https://oss-fuzz-build-logs.storage.googleapis.com/badges/pillow.svg"></a>
</td>
</tr>
<tr>
<th>package</th>
<td>
<a href="https://zenodo.org/badge/latestdoi/17549/python-pillow/Pillow"><img
alt="Zenodo"
src="https://zenodo.org/badge/17549/python-pillow/Pillow.svg"></a>
<a href="https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=badge"><img
alt="Tidelift"
src="https://tidelift.com/badges/package/pypi/pillow?style=flat"></a>
<a href="https://pypi.org/project/pillow/"><img
alt="Newest PyPI version"
src="https://img.shields.io/pypi/v/pillow.svg"></a>
<a href="https://pypi.org/project/pillow/"><img
alt="Number of PyPI downloads"
src="https://img.shields.io/pypi/dm/pillow.svg"></a>
<a href="https://www.bestpractices.dev/projects/6331"><img
alt="OpenSSF Best Practices"
src="https://www.bestpractices.dev/projects/6331/badge"></a>
</td>
</tr>
<tr>
<th>social</th>
<td>
<a href="https://gitter.im/python-pillow/Pillow?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img
alt="Join the chat at https://gitter.im/python-pillow/Pillow"
src="https://badges.gitter.im/python-pillow/Pillow.svg"></a>
<a href="https://fosstodon.org/@pillow"><img
alt="Follow on https://fosstodon.org/@pillow"
src="https://img.shields.io/badge/publish-on%20Mastodon-595aff.svg"
rel="me"></a>
</td>
</tr>
</table>
## Overview
The Python Imaging Library adds image processing capabilities to your Python interpreter.
This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.
The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool.
## More Information
- [Documentation](https://pillow.readthedocs.io/)
- [Installation](https://pillow.readthedocs.io/en/latest/installation/basic-installation.html)
- [Handbook](https://pillow.readthedocs.io/en/latest/handbook/index.html)
- [Contribute](https://github.com/python-pillow/Pillow/blob/main/.github/CONTRIBUTING.md)
- [Issues](https://github.com/python-pillow/Pillow/issues)
- [Pull requests](https://github.com/python-pillow/Pillow/pulls)
- [Release notes](https://pillow.readthedocs.io/en/stable/releasenotes/index.html)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Pre-fork](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst#pre-fork)
## Report a Vulnerability
To report a security vulnerability, please follow the procedure described in the [Tidelift security policy](https://tidelift.com/docs/security).

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB