Session 6 – Testing integration with circle CI

Today is the final session for #PeruRoadtoGSoC2018 and we are going to test integration with CircleCI in order to contribute with the documentation of Fedora (automatize the proccess of deploying), first you have to create an account in CircleCI (link), to create it please sign up with your github account, once you do that you can see in the Projects tab that you don’t have any project building on CircleCI

2

Now we have to create our repository so create a directory called integration_Fedora containing another directory called src there create the file index.html with this code

1.png

and creating it in our github we can initiliaze our repo now ir order to push all the commits, now in the CircleCI page check the tab Projects and you can see our project integration_Fedora now click on Setup project

3.png

We have to read this guide and the first step is create a folder name .circleci and add a file config.yml there, the second step is to copy on the file the sample .yml below, now push this change up to your Github and press Start building once you did that

4.png

6.png

5.png

Just actualize the page and you have this

7

Now, we are going to do our second commit

8

9

And we see that we put an octocat when you enter the name of the commit

10

Now we are going to edit our config.yml file changing for fedora:latest

1.png

2.png

Now we are going to create a ssh-keygen, please what I did in my terminal

4

Then in the github page we can check in settings the ssh keys and we add our ssh key with the part in white selected, once you’ve done that it will be there our ssh-key

5

6.png

Now in the CircleCI page we have to authorize in permissions checkout SSH keys

7

Then just authorize

8

After creating the key we start to commit with a icon (fire)

9

Icon (rat and raise_hand)

11.png

Finally we are going to edit our config.yml file in this way

12.png

And edit our index.html file like this

13.png

Now we are going to upload it to our repository

20.png

Here you can get the link to your page

21.png

And finally we see here how it works! 🙂

22

You can check my repo here.

Anuncios

Session 5 – Part 1 – Gtk with Python

Today we are going to use Gtk with Python and for that we can check our version of Python just type python

2

Then I’m going to install pygobject3-devel

1.png

this code just create an empty window that close the program when you close the window

3.png

and then we run it with python

5.png

Now, if you want to set the title, you have to add the line win.set_title(“The Text”) like this

1.png

And finally you can run it

2

Now we are going to create another file that have to allow us lo go to the web page of 4 languages, there we are going to add a label and gtk.listbox that contains 4 gtklistboxrow in order to create some like this

5.png

We create a Gtk.Box that will contain all (our first label and gtklistbox and so on)

Here is how it works

  1. box_outer contain label and gtklistbox
  2. gtklistbox contain gtklistboxrow and hbox
  3. hbox contain button

3.png

All that we did was to create the same 4 rows and just change the link for each one using gtklinbutton also to create the link and open it in Chrome.

You can check the code here.

Finally we were seeing how to search bugs in gnome here.

In the next picture we are able to see the nautilus bugs clicking in Issues

6

There we can grep bugs for people who are Newcomers like me

7

Also we saw the projects for Fedora in this link

9

we saw one project called system_config_language that wants to create something like a button for example that change the language configuration for all the system including apps browser keyword etc

22.png

Session 4 – Gtk with C

First we have to install gtk dependencies to compile the file and also run the file. So you have to install with this comand

sudo dnf install gtk3-devel gstreamer-devel clutter-devel libgda-devel gobject-introspection-devel

then we are going to install webkit dependencies to compile our file

7.png

At the moment of compile we had an error

1.png

That’s because the name of the package is not the same as the package that we download before, so we have to find it in /usr/lib64

2

And here at the end we have the webkit2gtk-4.0

3.png

So we have to do a modification to compile it replace  webkit3.0 for wetkit2gtk-4.0

4.png

But there is another error because we have to do a modification in the file that contains our code, so open the file to modificate it

5

just add 2 at the final of webkit, like this

6.png

now we can compile it without errors 😀

7.png

finally we can run the code 🙂8.png

You can check the code here.

Session 3 – Part 2 – Javascript

After shared a lunch sponsored by GNOME and took many photos

we continue with Javascript with the help of Gerson Garrido, he helped us with the sintaxis, checking what GNOME projects are available is this language and also learn to use gjs.

We start with a simple example that let us to display a window

1

to compile and run we are going to use gjs

2

and we have this

3

Then we were seeing this project in Javascript called piano.

And for the end of the day we have to create some like this

5

So, we had to use grid.attach for the position in the grid that have 5 arguments, the first one to tell which element we are going to put in that position, 2: top, 3:left 4:width 5:lenght.

4

You can see all this examples in my repository here.

Session 3 – Part 1 – Newcomers

Today we are going to know more about the newcomers guide to contribute to fedora or gnome applications, for that we had the help of one trainer in Nautilus, his name is Carlos Soriano and we were with his online support.

If you want to contribute and you’ve never been involved in this kind of things you have to start wih the newcomers guide here. As the newcomers guide said to contribute we need four steps:

4steps

Carlos Soriano told us that we don’t need to be the best programming but if you know a bit of object oriented programming and git you can start contributing.

Now, you can press the button Let’s do it! in the page. There you get the link to the IRC chat where you can get help exclusive for newcomers.

Then press Gotcha, let’s go! There we have the first step to contribute: Choose a project. The project that I’ve choosen was Nautilus

lala

Now, after you choose your project press the button Build the project. We need to get flatpak, it is first necessary to set up a development environment with the latest version, for that reason we need to get flatpak, all this will allow us to make changes, test them, and create patches. Actually I have Fedora 27 so I’ve had already installed flatpak, only I had to check my version.

unnamed

Then you have to download Builder to clone a GNOME project using it. I installed it with this command:

jk

Builder uses Flatpak to compile and run your project in a “sandbox”.  It takes a long time to download but finally you have this when it finished.

unnamed (1)

Press the button Clone..

unnamed (2).png

And the repository url for nautilus is https://github.com/GNOME/nautilus.gitjust press Clone to continue, there we have to wait for the installation of Sdk.

When it finished you will able to see the files for the project

image.png

Now you can start seeing how to fix a bug and then solve it to contribute in that way for the project, good luck for everyone.