GSoC 2017 Final Report

Hi there! This is the last time I wrote here!

I hope you enjoyed my trip through GSoC 2017. It’s been an awesome journey of 3-4 months together.

Thanks!

Thanks to both of my mentors @Adrianzatreanu and @yukiisbored . Thank you for everything! I couldn’t think of better mentors than you guys! Also I want to Thanks to coala organization, thank you for accepting me in the GSoC program!

Finally, Thanks Google! for such a wonderful program!

What I have done with this project?

With my project Improve the coala CLI I solved bugs, add new functionalities and change the aspect of the output for the user.

This is the latest ouput for the user.

Screenshot from 2017-08-23 14-08-09.png

Bugs were solved, now the --no-color flag works properly.

Screenshot from 2017-08-12 16-33-32.png

Bug with colors for different terminals. (This is LXTerminal)

Screenshot from 2017-08-10 19-11-54.png

Right now Do (N)othing is an action because of a6c376f.
Chain Actions is right now by default. You can now apply multiple actions in a single input 0911078.
Apply single actions was added. You can use flag -A and choose an action to apply for every result 65feb30.
Show applied actions print the latest actions that a user has done in a run of coala 149d59d.
Generate patch action generates a patch for a file based on bears depending on what language did you used in the file 25e019c.

What has been done?

In coala repository:

d75d10a Change output for user.
3e590f5 Change the coafile warning/output
2f0f311 Change the actions name

8a25983 Change the input: Numbers to letters
0eb0be9 Fix the ouput
45a7369 Add Chain Action
65feb30 Add apply-single-action
149d59d Add Show Applied Action
0911078 Make Chain Action default
360a624 Add line number for the diff ouput
2bd16a5 Change Severity line from the ouput
377585d Add line number inside “[ ]” in diffs
530bcd7 Rename DoNothinActionTest.py
fbb71a1 Add docs for apply single action

d03303c Fix color from the ouput
a6c376f Add Do (N)othing action
f43bd5e Fix --no-color flag
25e019c Add Action: Generate Patches

 

Aim of the project

With this project we’ve tried to improve the user experience of coala in CLI. Many hours were spend trying to improve the design of it and we hope it’s better. Of course, anything can be improved over and over again.

Implementation

I worked just in coala repository from github. Most of the work was done in ConsoleInteraction.py file were I did major changes. Other changes were made by adding new files for every new action and tests for all of them.

Difficulties

I think that the most dificult think was to have 100% coverage from tests. Also I tried to wrote good, clean code that new people could understand it.

Experience

It was an amazing trip. I think I learned how to write better code, write better tests. Also I learned how to write a proper, complex review for prs. I’ll continue working under coala and trying to help were I can.

Advertisements

Middle of Phase 3

Hello!

It’s very exciting right now! I’m almost at the end of Phase 3!

What I’ve achived so far:

  1. I added Do (N)othing as an action
  2. I changed the ouput for user more. I think it looks nice right now. You can check it http://imgur.com/a/p8BtZ
  3. I fixed --no-color flag, an old bug. http://imgur.com/BWzn0me
  4. I almost fixed a bug for terminals that shows bad color http://imgur.com/80DEvWe
  5. The pr for chaining action by default is almost complete
  6. Generate patches is almost complete

Also, I’ve reviewed many prs in this period of time!

I hope all of my GSoC collegues finish their assignements in time as I hope to do it!

I’ll make a last post at the end of the phase! I hope I see you there, reading it!

Have a nice time!

Start of Phase 3

Hello again!

As the title says, I’m on Phase 3! Right now I want to add again Executing section <section>... . This was deleted when I changed the ouput. The feedback was that this should be added back.

Then, I want that Chain actions be by default for users. In this way the user can choose to apply a single or multiple actions.

And the last think I want to add is Generate Patches. When you choose this action, you can apply more patches that are different. Something like Apply the patch ('capitalize') and so on (mockup)

See ya in 2 weeks!

End of Phase 2

Hi!
Today Phase 2 needs to be done.

I added something pretty cool, a history of actions that was applied in a run of coala. I think it works nice. Also, I written API documentation for all of my variables that were used.

I found that it’s really hard to write good code and also good commits messages (my english isn’t that good). For ShowAppliedActions ( history) 1st time I writted bad, because I should only write code in the file designated for that action.

I hope that I’ll finish in time. I want to say thanks to my mentors Adrianzatreanu and yukiisbored for the help!

Mid of Phase 2

Hello, long time no see, right?

I already merged Chain Actions. With this you could choose a set of actions and apply them in an instant. Easy to use right? After you choose this action you will be asked to provide a string made of actions, something like am. a means `(A)pply patch` and m Print (M)ore info. Cool, right?

Today I want to merge 2 more. The 1st of them will ask you if you want to do more actions after you already choose an action. The last one is a flag -A or --single-action. If you choose this flag, you will be asked to choose a single action and apply it all over the results.

I have only one last pr, for this Phase. This one will print for you all the actions made in a run of coala. I think it’s really nice to have something like a history of your applied actions.

That’s for now.

See ya!

End of Phase 1

This day is the last one for the Phase 1 where we should merge our prs and close our milestone for Phase 1 of GSoC 2017. It’s an exciting day as I finished my work in time. I hope that all of my coala mates does that too.

What we achived in this period are you thinking?

  • Figure out what mockup to use
  • Change the warning for when a coafile is missing
  • Change the output for action
  • Delete multiple lines from the output of a file
  • Use letters instead of numbers for selecting action

Thanks to my mentors @Adrianzatreanu and @yukiisbored . Without them I couldn’t do this!

What’s next?

  • Chaining actions in a single input
  • Implement Reprompt for actions
  • Implement Selection action for all results option
  • Make ApplyPatchAction log the applied patch

That’s for this day, I hope you enjoy the summer as I do!

Cheers!

Start of Phase 1

Hello there again!

So, the Phase 1 has begun. I started already implementing the mockup that I and with my mentors designed it based on the feedback from the community. I think it looks awesome!

Well, this isn’t easy. I had exams until 16 and I couldn’t do all the work that I would wanted to do for the project. The most problematic think are the tests. They really put you on a difficult position because sometime you don’t understand why it passes/not passes.

I rewrite my code quite a few times. Today was about breaking the pr into smaller prs to be merged faster. Rest asure, I’m doing my work.

The deadline for the Phase 1 is on 26 so I should start merging the prs that I was working on. I think looks good (maybe minor changes can be made). The problem with the tests is that you need to have 100% coverage of your code and that’s really hard. You need to test everything that you added. I like it!

Well, from now on we will see us 2 weeks from now! I hope you enjoy reading it.

Have a nice week. Bye!