diff --git a/README.md b/README.md index 1010c4705..a7d7e9f71 100644 --- a/README.md +++ b/README.md @@ -1,115 +1,136 @@ -

- Pillow logo -

- -# 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). - - - - - - - - - - - - - - - - - - -
docs - Documentation Status -
tests - GitHub Actions build status (Lint) - GitHub Actions build status (Test Linux and macOS) - GitHub Actions build status (Test Windows) - GitHub Actions build status (Test MinGW) - GitHub Actions build status (Test Cygwin) - GitHub Actions build status (Test Docker) - AppVeyor CI build status (Windows) - GitHub Actions build status (Wheels) - Code coverage - Fuzzing Status -
package - Zenodo - Tidelift - Newest PyPI version - Number of PyPI downloads - OpenSSF Best Practices -
social - Join the chat at https://gitter.im/python-pillow/Pillow - Follow on https://fosstodon.org/@pillow -
- -## 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). +# 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: + +![Coverage Tool Result](report_images/isidora_images/[BEFORE]overall_coverage.png) + +### Your own coverage tool + + + + + + + + + + + + + + + +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** + +**2. Duru** + +**3. Isidora** + +- Function 1: `_save()` from **SpiderImagePlugin.py** + + [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/5701d33cbb789342ca781769d4ba7cd323c9255e#diff-44debbfd4d0c5a80130a15bdcd9e0b28c1b4fef6eda0eaaef48838c954589d15) + + Implemented Coverage Tool + +- Function 2: `Bitstream.peek()` from **MpegImagePlugin.py** + + [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-0272f0c6b5871be3364fe2062e50944fba30dad9625c74d13340de7d3ad8d367) + + Implemented Coverage Tool + +**4. Sofija** + +## Coverage improvement + +### Individual tests + + + + + + + + + + + + + + + + + + + +**1. Deekshu** + +**2. Duru** + +**3. Isidora** + +- Function 1: `_save()` from **SpiderImagePlugin.py** + + [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-f0eb82b90cfc005f681c774b3bf87f19b1db010750e49f850883005f4f623202) + + Coverage Before + + Coverage After + +- Function 2: `Bitstream.peek()` from **MpegImagePlugin.py** + + [Link to the commit](https://github.com/jovanovicisidora/Pillow-SEP/commit/70f6735620d2f8e469cbe5b60a4586c5db95624a#diff-48e5b5451c5cab3fbb758ae58649082b62ae6f2850393a332949643d75bd4ad2) + + Coverage Before + + Coverage After + +**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. diff --git a/README_original.md b/README_original.md new file mode 100644 index 000000000..b4c6d2987 --- /dev/null +++ b/README_original.md @@ -0,0 +1,115 @@ +

+ Pillow logo +

+ +# 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). + + + + + + + + + + + + + + + + + + +
docs + Documentation Status +
tests + GitHub Actions build status (Lint) + GitHub Actions build status (Test Linux and macOS) + GitHub Actions build status (Test Windows) + GitHub Actions build status (Test MinGW) + GitHub Actions build status (Test Cygwin) + GitHub Actions build status (Test Docker) + AppVeyor CI build status (Windows) + GitHub Actions build status (Wheels) + Code coverage + Fuzzing Status +
package + Zenodo + Tidelift + Newest PyPI version + Number of PyPI downloads + OpenSSF Best Practices +
social + Join the chat at https://gitter.im/python-pillow/Pillow + Follow on https://fosstodon.org/@pillow +
+ +## 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). diff --git a/report_images/isidora_images/[AFTER]_save.png b/report_images/isidora_images/[AFTER]_save.png new file mode 100644 index 000000000..d41f380a5 Binary files /dev/null and b/report_images/isidora_images/[AFTER]_save.png differ diff --git a/report_images/isidora_images/[AFTER]peek.png b/report_images/isidora_images/[AFTER]peek.png new file mode 100644 index 000000000..6f7e76bd5 Binary files /dev/null and b/report_images/isidora_images/[AFTER]peek.png differ diff --git a/report_images/isidora_images/[BEFORE]_save.png b/report_images/isidora_images/[BEFORE]_save.png new file mode 100644 index 000000000..899a84c20 Binary files /dev/null and b/report_images/isidora_images/[BEFORE]_save.png differ diff --git a/report_images/isidora_images/[BEFORE]overall_coverage.png b/report_images/isidora_images/[BEFORE]overall_coverage.png new file mode 100644 index 000000000..9ff2e9a49 Binary files /dev/null and b/report_images/isidora_images/[BEFORE]overall_coverage.png differ diff --git a/report_images/isidora_images/[BEFORE]peek.png b/report_images/isidora_images/[BEFORE]peek.png new file mode 100644 index 000000000..ffb512a48 Binary files /dev/null and b/report_images/isidora_images/[BEFORE]peek.png differ diff --git a/report_images/isidora_images/our_tool_peek.png b/report_images/isidora_images/our_tool_peek.png new file mode 100644 index 000000000..936514252 Binary files /dev/null and b/report_images/isidora_images/our_tool_peek.png differ diff --git a/report_images/isidora_images/our_tool_save.png b/report_images/isidora_images/our_tool_save.png new file mode 100644 index 000000000..8313a3fec Binary files /dev/null and b/report_images/isidora_images/our_tool_save.png differ