Posts

Showing posts from 2016

Outreachy: the end or just a new begin?

The Outreachy internship has ended up to me (cries in Spanish), but to you can be your opportunity to apply to the next round! See information about application here: https://outreachy.gnome.org/?q=program_home&prg=7 (I really would like to apply again :'(, unfortunately I can't), you can also read the first blog post of this blog to see some application tips, alternatively there is also the blog post of Anjana that are also some valuable tips. And I hope it is not going to be the end to me as well, I hope to keep being a contributor to Open Source.

Because of the next round, I have been receiving some questions, and some of those doubts I had as well when I was an applicant... So I'll answer some of them here.

1) How should be the relationship with the mentors? How much I should talk to them?
I kind of had this question in my mind as well when I applied: "Am I asking too much? May s/he thinks that I am not interested enough?", but I think I have related in a …

Pytest-HTML release 1.10.0: Dealing with CSP

Image
The main topic of the version 1.10.0 of Pytest-HTML was dealing with Content Security Policy (CSP), since the HTML reports started to look terrible on sites (such as Jenkins) where CSP was active. Before the report was something like that:
To handle with that, I had to solve many issues. I'll tell from the start.
Handling with CSS
The first thing that was breaking the CSPwas that Pytest-HTML only had inline CSS, because when the plugin was built, we thought that could be a good idea to have all in a single document, so it could be exported more easily. The problem is that CSP doesn't allow inline CSS, so we had to create a new file to CSS and export it from the plugin, but for people who desire to have all contained in a single file, there is a new option to use with pytest-html: --self-contained-html, when that is active, pytest-html doesn't create any other file other than the HTML file.
Handling with images, text and JSON
The images had a similar problem of CSS, to be in …

Lessons from Outreachy

It is almost unbelievable that the internship is almost finished! There is only two weeks to go! Seems that it started yesterday! Many things have happened since the beginning and on this post I'll comment my impressions about the program in general.

Now I am almost finished with my main project, which was making the reports look good even with Content Security Police on, you can read details about this project was thought on my mentor's blog. Hopefully, this week, we are going to release the version 1.10.0 of Pytest-HTML which will include my main summer project. When it is ready, I'll write a post about it. Now I am working on an issue that I suggested: creating unit tests to Java Script code, maybe I'll let this issue to our work week in Mountain View - California (yes, I am going into one more trip because of Outreachy! If you like traveling, you should definitely join Mozilla on Outreachy haha :P), and work on minor issues for this week.

During the internship I co…

Suport to rerun failures and release 1.9.0

Before traveling to London, I started to work on giving support to Rerun failures to Pytest-HTML. I didn't had time to finish before the Sprint in Freiburg. In this post, I'll explain what is that about.

Pytest-rerun-failures is a plugin to rerun every result of a test that fails, and you can decide how many times it is rerun. This is used to see if a test is failed in a consistent way. Before this enhancement, when Pytest-html was used together with rerun failures, it didn't show anything.

This issue was solved on adding a new outcome to the Outcome list, a little of refactoring was also done,n appending the rows. If you want to see all the changes, you may visit the pull request page.

After that, the version 1.9.0 of pytest-html was released. =)

Pytest Sprint

Image
The fourth week of my internship was in a lovely German city named "Freiburg", I was there to take part of an event named "Pytest Sprint", and it was the first time that I went to an event of this kind!

Before going to a Sprint I didn't know what a sprint was... So if you are wondering what is that, I can explain to you: open source projects has many developers involved from all over the world, and there is no way to put together everyone other than a sprint, so a sprint in open source context is an event where the developers of a project get together.


 In a sprint, the developers generally work in pairs (they are there to collaborate =P) on many different topics: from documentation to bugs solving. The sprints can be "individual events" (like, just a sprint) or a part of a bigger event (like, a pytest sprint part of a Python event). Also, during the Sprints, there are also talks with the new features of the project. I gave a small talk about Pytest-…

Third week: London!

Image
My third week of internship was a pretty special one: I went to London to the Mozilla meeting named "All Hands". This meeting happens twice a year (one in the summer and other one in the winter) and puts together all the Mozillians, from the CEO to the interns and some top contributors (volunteers to Mozilla Open Source projects), everyone (even the invited contributors) has no cost to go to this meeting, they pay everything: from the food to the visa (if needed), including flights, hotel, etc.



The meeting was huge, there was more than 1,300 Mozillians and so many sessions, lectures, meetings, Hackathons, etc in two hotels in the center of London: Mozilla All Hands is definitely overwhelming for a first time attendee: there is so much to see in so little time. Even more if it happens in a city like London! You can imagine how much a new comer as me, in a such city that I have never have been before, felt!

The event was amazing, but the city even more: I could go to three ni…

First two weeks: Filter tests by outcome

Image
On my first two weeks as an Outreachy intern, I worked on the issue 38 of Pytest-HTML. That issue is to allow users filter tests results by its outcome. My strategy to do that is putting check-boxes on each outcome, so when the checkbox is checked, we can see the result of that outcome, but when it is unchecked, we can't see that.


A few changes has been made on Pytest-HTML code to do that. Maybe the biggest one is that before, the log row and the result row were totally separated rows, so we had to do the checking twice to hide the result and the log row. So now, both rows, are under a element, and like that, we can associate the result and its log.

On the plugin structure, a few changes were made, now there is a class named "Outcome" in the main plugin, so now the summary can be created in a much more elegant way. Maybe it can be created classes to build the table also (And it may helps on the next issue that I will work on).

Also, a few enhancements to the testing me…

A little more about Pytest-HTML

Image
As I said before, my project for this summer is about creating enhancements to a plugin named Pytest-HTML, but I didn't say here what is that, in this post, I'll explain a bit.

If you don't know even what is Pytest, I'll try to explain in a few words (if you know, you may skip the following two paragraphs): Pytest is a tool to guarantee that the code you have done in Python is doing what it is supposed to do. Just giving a very simple example, if you have a function named "sum(x1, x2)", what would expect that this function does? Most probably, sum x1 and x2, right? Imagine the situation where x1 and x2 are 2, your expectation is that the function returns 4 to you, right? If it returns any other value (e.g, 9, 8, 2) most probably your function is not doing what it is supposed to do. So to code what I just mentioned above, you would do something like:

def sum(x1, x2): return x1 + x2  def test_sum(): assert sum(2, 2) == 4 
So, the function sum is retu…

Fun starts tomorrow!

Image
So, it has been a few weeks since I got the big news that I was selected to Outreachy, and tomorrow my internship is finally going to start.

Since my selection,  I started to feel a bit overwhelmed (not in a bad way, actually in a great way), many things happening. First there was all the happiness of being selected to such a nice program. After that, there was an invitation of Mozilla to go to London to participate in All Hands meeting, and then a suggestion of my mentor to go to Freiburg (Germany) to take part in Pytest Sprint. So I started to plan my travel, book tickets, fill forms, etc. Now I got the news that I am going to receive a MacBook offered by Mozilla too (it all - travel to Europe, meeting so many new amazing people, 5.5 K, MacBook, etc. - still seems too good to be true).  Combined with that, there are the last weeks of my semester at school, so many school assignments as well. So, wow, many things happening.


Well, since my application, I unfortunately didn't have …

What is Outreachy and how to apply for it

Outreachy is an internship program for underrepresented people in Free and Open Source Software (FOSS) community, if you have ever heard about Google Summer of Code (GSoC), Outreachy is much like this program. If you have never heard about GSoC neither Outreachy, I'll explain what is that about in a few words: the accepted students get paid (USD 5500) for contributing to a FOSS project for 3 months. The program runs twice a year, from May to August and from December to March. To apply to Outreachy, you have to write a patch to a participating FOSS organization and after that fill the application form.

So I am one of the students accepted for the round of May to August, and I'll write here some application tips based on my personal experience to future applicants (just saying, it is my own experience, not an official guide or something, maybe your experience will be different from mine).
Don't feel afraid if you have heard about the program close to the deadline and don'…