DEV Community

Leonardo Cumplido
Leonardo Cumplido

Posted on

Third-week check-in for GSoC 2021

Hi! Today June 21 I begin my third week for GSoC 2021. I am loving this experience so far. Now, I'm going to answer 3 questions regarding my work last week, what I struggled with, and what I will focus on this week.

What did I do this week?

In my last post, I mentioned I was working on fixing the existing quizzes of the project. I kept doing that, and I finished. I started fixing some lectures. By fixing I mean:

  • Formatting all python code with black.
  • Changing static snippets to activecode.
  • Creating some exercises with automating grading using unit test
  • Creating some web tests (where needed), with playwright

I've already finished fixing 4 lectures. This week I made 8 PRs, some of which were proposing simple changes.

Did I get stuck anywhere?

Yes I did. As I've mentioned over the past posts, we use pytest-playwright as our web tester. I've been coding easy tests for the quizzes, and I thought that was enough. Until I got to program a test for a lecture that involved writing into a prompt box. I got stuck there beacause I didn't know playwright had a special way to deal with dialog prompts. So I had to search in their documentation for an answer, and I got one.
Here's the piece of code I was searching for:

    
        def test_TWP18_ac_5(page):
            # Deal with prompt box
            def handle_dialog(dialog):
                dialog.accept("una palabra")

           # Code to go to TWP18 page, do the exercise and run it.
                    
           # Fill prompt box
           page.on("dialog", handle_dialog)
    

What is coming up next?

Last Saturday (June 19), the team got together in a videocall to discuss what we've done so far and what is coming up. So, now that I've finished with the quizzes and the easy lectures, some of which are awaiting review, I will begin my second milestone. It consists on refactoring a lecture that involves accesing some APIs. My idea is to fix one existing exercise that uses Reddit API, and to create two exercises using two different public and easy to manipulate API's. Meanwhile, I'll continue searching for ways to make the SQL lecture work.

Top comments (0)