ymartinez's Blog

Weekly Check-In #2: Second Week

ymartinez
Published: 06/19/2021

Hi again! this is my second weekly check-in, you can check the previous one in the series.

The second week of my GSoC internship is finishing and the first sprint as well. In this weekly check-in, I've got the good announcement that my team and I have made great progress during our first sprint. However, there is still a lot of work to do, so let's keep going.

Good job meme

What did you do this week?

I continued work on the quizzes and I made 4 PRs, they are just waiting for the review of my mentors. This is great progress because, with these and the others ones that my teammate did, we have almost finished fixing and refactoring all the quizzes in the PyZombis course.

What is coming up next?

The next week I am going to start with the lessons. As far as I know, there aren't a lot of problems to resolves, however, I need to check out much deeper. I plan to finish all the lessons were assigned to me for the next week so wish me luck.

Good luck meme

Did you get stuck anywhere?

Yes indeed, as I said in my first post, at the beginning (check it here), I got stuck using the library playwright. Besides that, I had some conflict problems in a file, but I resolved it by doing rebase. It is very powerful and useful so keep it out there, like an ace up one's sleeve 🧏

View Blog Post

Blog Post #1 : Everyone can be struggling with it

ymartinez
Published: 06/16/2021

Hi again! this is the first blog post that I am writing, the previous was a check-in post. In these posts, I will summarize all the tasks that I will be doing in the GSoC, but without a formal structure so, shall we begin.

The first week was finished and in general, it was great! I had to work in fix some of the problems that the quizzes had with my other teammate, we split all the quizzes to work on the same number of quizzes. In each quiz, I had to fixing and refactoring the exercises following the guidelines of Runestone, ReStructuredText, and PEP8 to Python. In addition, I built tests using the playwright tool, as I said in my previous post, it is a tool to create automatized end-to-end tests, below there is an example and his result.

The code

def test_quiz5_10(page):
    # Go to http://localhost:8000/quiz/Quiz5.html
    page.goto("quiz/Quiz5.html")
    page.wait_for_load_state()

    page.click("text=def es_numero_ponteironuloville(numero):")

    page.press(
        "text=es_numero_ponteironuloville(numero):",
        "ArrowDown"
    )
    page.press("text=es_numero_ponteironuloville(numero):", "Tab")

    page.type(
        "text=es_numero_ponteironuloville(numero):",
        "return True"
    )

    page.click("#q5_10 >> *css=button >> text=Run")

    page.hover("#q5_10 >> text=You passed:")
    assert (
        page.inner_text("#q5_10 >> text=You passed:")
        == "You passed: 50.0% of the tests"
    )

The result of test
Result of test created with playwright

I have to say that despite being the first time I use it, it was kind of simple, however, the tests that I built weren't very complicated, but I don't know if this can change in the future 😅 .

At the end of this week, I've done 6 PR's, 5 of which have been merged into the principal branch, and 1 is awaiting review. With these, I've closed 2 issues that were been created previously to achieve my first milestone successfully, so I think that I am going at good steps.

Not all was easy because to ensure the PEP8 guidelines in the Python codes, I had to use black and flake8 but only in the python codes, so I had to extract these portions from the Rst files in another one and save it such as a Python file and after that paste to the Rst files again, it wasn't a hard task however it was very repetitive, but I know that sometimes programming can be like this, the important thing is to keep going.

Another thing that I was struggling with, was a problem that I found and for luck, I resolved it with the command git rebase. I heard about it but I didn't have to use it before. I can assure you, it has too much power even to rewrite the history of git (I will explain later on), although remember as uncle Ben said.

so, we have to be careful to use it 👌

In this case, I used it because in a PR that created I renamed a file, and I fixed the exercises in there, however, for git, what I did was delete that file and create another with the code, and according to one of my mentors, isn't a good coding practice because it is difficult of review it, since you lost all the previous code and the diff shows only new things, for that reason I had to made a new PR only to rename that file, and after this one has been merged, I was able to finish the other one.

Once that was merged I had a huge conflict problem with that file in that PR, so it was time to use the rebase power wisely.

First, I had checkout to the main branch on my local computer, pull all the changes of my remote repository, after that I checkout again to the branch of my changes, and finally rebase this branch with my main branch. This sounds easy, but it was kind of stressful because I had to review each change of all the commits behind HEAD, that is, all the changes that I previously made in that branch, and only after resolving all the conflicts the results were that my changes were successfully added in front of HEAD, as if the previous commits had not existed, so somehow I changed the history of the project in git 🤯.

Quality work

View Blog Post

Weekly Check-In #1 Onboarding Period

ymartinez
Published: 06/07/2021

The last three weeks were an onboarding time for all interns in the GSoC, and today 7th June is starting the coding phase. Although I don't have experience in writing blogs, sometimes all that we need is to take a leap of faith 😊 so, I will be recording my experience and status on a series of blog posts. Follow me on this journey and I hope that you enjoy it.

What did you do these weeks?

During these weeks I was working on getting familiarized with the Runestone library, and the Playwright library. The first one is a tool to create interactive books in different languages, Python in this case 👍, and the last one is a tool to create automated end-to-end tests on web apps.

In addition, during the onboarding period I had two meetings with the mentors and the entire team, in the first one we met each other and talked about the status of the project, and the mentor merged all PR's that we had created during the application period.

The second meeting with the mentors was more technical and it helped to coordinate how we are going to work on our tasks and schedule bi-weekly meetings following the Scrum methodology. For this, I split my initial proposal into issues and milestones using Github, and for making all organized I put them in a Github project board as well.

What is coming up next?

In the first month of the coding period, I am going to work on my first milestone. More specifically in the next week, I am going to work to fix the current bugs on quizzes, adding an end-to-end test to ensure that everything is ok.

Testing Code meme

Did you get stuck anywhere?

Not yet, but if this happens I am going to find on the internet solutions and talk with my mentors 😅 and find solutions on the Internet.

View Blog Post