LeoCumpli21's Blog

Wrap Up GSoC 2021

LeoCumpli21
Published: 08/24/2021

The complete wrap up of my GSoC experience is here: Leo Cumplido GSoC 2021

Hi, I'm Leo Cumplido, an 18 year old data science student at the time I'm writing this. My Google Summer of Code (GSoC) 2021 has nearly come to an end. Here's a wrap up of what I did this summer working with Python Argentina, under the umbrella of the Python Software Foundation (PSF), on a project called PyZombis.

Quickly, PyZombis is an attempt to make an interactive notebook regarding python basics. The overall goal of this project is to make a quality, and free content, kind of MOOC for Spanish speakers. The platform where it is landed is Runestone. The topics covered go from python fundamentals, like basic data structures, flow control, and loops, to web scrapping, accessing APIs, web development, and more.

Milestones

I worked on three milestones:

1 - Fix Lessons 1 to 14, "revisiones" lectures, and add quizzes

Originlly, it consisted of fixing lectures 1 to 14, and quizes 1 to 14 as well. I completed this milestone before the first evaluation period, but then I kept adding issues as they arose. During this period I learned GitHub basics, Playwright for web testing, and pytest for testing python code, correct python formatting following PEP8 rules, and open source best working practices.

2 - Refactor Facebook API Lesson

During my second milestone I worked with APIs principally. Also, I made use of Brython as the python interpreter for some exercises. The thing that took me more time was adding pytest-vcr to mock the requests to APIs in the tests. Here's a gif of the web test for a challenge of the course. It was the most advanced test because to make it I had to mock the API calls, and to handle the dialog boxes that appear. The web test is automated with Playwright.
Most challenging test

3 - Add more complex exercises

This third milestone was about implementing new more complex exercises, as if they were challenges, to the course.

Project

Here you can consult all the issues I opened and solved.
GSoC 2021 PyZombis Project

Commits

Here are all the commits I made during GSoC
Commits

Left to do

The course may be ready for a beta, not massive launch. However, there's still work to do. For example:

  • Pygame lecture can be adapted using Brython. This idea is to be explored. Here's an example of a game made in Brython.




  • Now that the coding period has ended, I can say I accomplished my goal. Regarding code, I was able to lean and apply new tools quickly, like Playwright and Brtyhon. Regarding the overall open source project, I learned how to work on GitHub, how to apply a good work flow and how to approriately communicate with my working team.

    View Blog Post

    Final Post GSoC 2021

    LeoCumpli21
    Published: 08/16/2021

    HI EVERYONE. Today I finish the coding period, and begin the final evaluation week. This means this might be my last post summarizing what I've worked on during a specific week. Furtunately, I feel like I accomplished my expectations and those of my mentors. Hence, I am proud of myself and my work.

    During the final week I continued with changing the quizzes structure. Thirteen quizzes were missing, and I correctly changed them this week. Moreover, I researched how to refactor the pygame lecture using brython. It is possible, and requires more searching for me to do, mainly because I may have to understand some javascript concepts. This is something that's left to do, for me or for others.

    Once again, this week's work wasn't hard, so I didn't get stuck anywhere.

    Finally, I want to express my gratitude to my mentors and my co-workers who accompanied me during this experience.

    View Blog Post

    Tenth-week blog post for GSoC 2021

    LeoCumpli21
    Published: 08/10/2021

    Once again, hi everyone! Welcome to my 10th post already. I'm very proud of myself for keeping the good work since GSoC started. This weeks work has been random. I didn't focuse only on one thing, but several. Now we're entering into the final sprint, and I can't be more excited ๐Ÿ˜ƒ

    What am I working on?

    So, let me tell you what I did. Firstly, I proposed a new structure on how the quizzes should be presented. My mentors loved it and accepted it. I already changed the quiz 1, 2 and 3 to follow the new structure.
    Then, I realized that most of the tests for the project were written in a way that isn't bad, but could be better. So I decided to modify them. Here's a little example of what I did:

                I changed this:
                
                    page.press("text=def function():", "Tab")
                
                into this:
                
                    page.keyboard.press("Tab")
                
            
    It is a simple modification, but useful.
    Finally, one of my mentors asked me to look at a lecture of the project that involves Exceptions in Python. He told me to enhance it, becauase at that moment it wasn't working at all. So I worked on it and did a new introduction, with examples and exercises, to that lecture.

    Did I get stuck anywhere?

    This week I didn't. Everything was pretty straightforward to accomplish.

    What is coming up next?

    Now, I'll finish changing the structure of the 12 quizzes missing. Also, I'll take a look at Brython to see what I can do to implement something similar to the pygame lecture, but using Brython instead.

    View Blog Post

    Ninth-week check-in for GSoC 2021

    LeoCumpli21
    Published: 08/01/2021

    Hi! This is my ninth post of my GSoC 2021 series ๐Ÿ˜ƒ

    What did I do this week?

    This week I did 3 things.

    1. I fixed some details of my third milestone PRs. Also, I added the final exercise that was missing in the second challenge. This was pretty straightforward.
    2. I reviewed the PRs of the other students.
    3. I had to research about pytest-vcr, a plugin for managing VCR.py cassettes, and to implement it in 2 tests of the project. See its docs here.
    To implement pytest-vcrcorrectly, I needed to undestand what a decorator is, and what it does, because to use pytest-vcr tools I had to add decorators to the tests functions. In a nutshell, this was necessary for a couple of tests that make API calls because sometimes this APIs are not active. What pytest-vcr does is that the fisrt time a test is run, the request to a web page is made, and a .yaml file is generated with the information of that request. Next time the same test is run, there will not be a web request. Instead, the data will be returned from the .yaml file. This not only speeds up the tests, but makes them less error prone.

    Did I get stuck anywhere?

    This week, I can't say I got stuck somewhere, because I didn't. However, I took more time than expected in the pytest-vcr thing.

    View Blog Post

    Eight-week blog post for GSoC 2021

    LeoCumpli21
    Published: 07/25/2021

    Hi! This week in particular has been somewhat calm. I did exactly what I stated in my last post: I reviewed my peers PRs, and made changes to my third milestone PRs, based on what I got as review.

    What am I working on?

    Fontunately, I've already done the hard work. Now, I'll do what my mentors consider the best to focus on. There are still small fixes in some lectures I need to check. This week I'll fix them. Also, I'll talk the other students to see if they need help. In addition, I may consider implementing more web tests with playwright to the quizzes exercises.

    What have I struggled with this week?

    As I said, this weeks workload wasn't hard, so I didn't struggled with anything. However, I'm going through a special situation (personal), and I talked to my mentors to let them know this. Therefore, next week I'll catch up.

    View Blog Post
    DJDT

    Versions

    Time

    Settings from gsoc.settings

    Headers

    Request

    SQL queries from 1 connection

    Static files (2312 found, 3 used)

    Templates (28 rendered)

    Cache calls from 1 backend

    Signals

    Log messages