Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 440f838

Browse files
Merge pull request #38 from SidharthBansal/gsoc_blog_1
Final GSoC 2020 Work Product
2 parents 61db24c + 47fc085 commit 440f838

File tree

1 file changed

+56
-0
lines changed
  • content/posts/GSoC_2020_Final_Work_Product

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: "GSoC 2020 Work Product - Baseline Images Problem"
3+
date: 2020-08-16T09:47:51+05:30
4+
draft: false
5+
categories: ["News", "GSoC"]
6+
description: "Final Work Product Report for the Google Summer of Code 2020 for the Baseline Images Problem"
7+
displayInList: true
8+
author: Sidharth Bansal
9+
---
10+
11+
Google Summer of Code 2020 is completed. Hurray!! This post discusses about the progress so far in the three months of the coding period from 1 June to 24 August 2020 regarding the project `Baseline Images Problem` under `matplotlib` organisation under the umbrella of `NumFOCUS` organization.
12+
13+
## Project Details:
14+
15+
This project helps with the difficulty in adding/modifying tests which require a baseline image. Baseline images are problematic because
16+
- Baseline images cause the repo size to grow rather quickly.
17+
- Baseline images force matplotlib contributors to pin to a somewhat old version of FreeType because nearly every release of FreeType causes tiny rasterization changes that would entail regenerating all baseline images (and thus cause even more repo size growth).
18+
19+
So, the idea is to not store the baseline images in the repository, instead to create them from the existing tests.
20+
21+
## Creation of the matplotlib_baseline_images package
22+
23+
We had created the `matplotlib_baseline_images` package. This package is involved in the sub-wheels directory so that more packages can be added in the same directory, if needed in future. The `matplotlib_baseline_images` package contain baseline images for both `matplotlib` and `mpl_toolkits`.
24+
The package can be installed by using `python3 -mpip install matplotlib_baseline_images`.
25+
26+
## Creation of the matplotlib baseline image generation flag
27+
28+
We successfully created the `generate_missing` command line flag for baseline image generation for `matplotlib` and `mpl_toolkits` in the previous months. It was generating the `matplotlib` and the `mpl_toolkits` baseline images initially. Now, we have also modified the existing flow to generate any missing baseline images, which would be fetched from the `master` branch on doing `git pull` or `git checkout -b feature_branch`.
29+
30+
Now, the image generation on the time of fresh install of matplotlib and the generation of missing baseline images works with the `python3 -pytest lib/matplotlib matplotlib_baseline_image_generation` for the `lib/matplotlib` folder and `python3 -pytest lib/mpl_toolkits matplotlib_baseline_image_generation` for the `lib/mpl_toolkits` folder.
31+
32+
## Documentation
33+
34+
We have written documentation explaining the following scenarios:
35+
1. How to generate the baseline images on a fresh install of matplotlib?
36+
2. How to generate the missing baseline images on fetching changes from master?
37+
3. How to install the `matplotlib_baseline_images_package` to be used for testing by the developer?
38+
4. How to intentionally change an image?
39+
40+
## Links to the work done
41+
42+
- [Proposal](https://storage.googleapis.com/summerofcode-prod.appspot.com/gsoc/core_project/doc/6456687923298304_1585668871_MatPlotLib_GSoc_Proposal__Baseline_Images_Problem.pdf?Expires=1597725704&GoogleAccessId=summerofcode-prod%40appspot.gserviceaccount.com&Signature=xyvO7MmMbNmW3BFz8J3JXUovI3xfZLBll4UPWZqZvHbOfPAu6PAK9enC4vXBCTwgH%2BXQ%2FxU57P3K1G0MAXvtAI7Wq0zhEfpZNXOPUQnipqRkkGdJYLLiFkIV93R6M83Z04Z%2BxyX3pepIPPaHTTNkXoxkXVyG2bx5jwtBnTTmCn1peOURPmsjOkdSp5w57vkTxzlGal5li%2FaV4sseGP8kzGtQ2YxljfZXura0WX5uA7bcNumdqMXUJ2eeqTxOwucUh8uOj6b%2BLn21d3py2KA%2FyxBuaBF8rwdqZM%2ByEeuNJ8aPAoR5kUS%2FUq7kjCyOIfuwb8%2F84TafLa91oGd4wMFNKA%3D%3D)
43+
- [Issue](https://github.com/matplotlib/matplotlib/issues/16447)
44+
- [Pull Request](https://github.com/matplotlib/matplotlib/pull/17793)
45+
- [Blog Posts](https://matplotlib.org/matplotblog/categories/gsoc/)
46+
47+
## Mentors
48+
49+
- Thomas A Caswell
50+
- Hannah
51+
- Antony Lee
52+
53+
I am grateful to be part of such a great community. Project is really interesting and challenging :)
54+
55+
Thanks Thomas, Antony and Hannah for helping me to complete this project.
56+

0 commit comments

Comments
 (0)