From Fedora Project Wiki
(→‎Implementation: fix image)
(→‎Implementation: remove github)
Line 86: Line 86:
A nice progress bar with the percentage of gem packaging completion will be provided as well. For each gem that gets in rawhide, the progress bar gets a little further. There can also be a number of other cool info in the page, like links to bugzilla requests so that someone could lend a hand, etc.  
A nice progress bar with the percentage of gem packaging completion will be provided as well. For each gem that gets in rawhide, the progress bar gets a little further. There can also be a number of other cool info in the page, like links to bugzilla requests so that someone could lend a hand, etc.  


I might "steal" the idea from gitlab/github on how they use milestones :)
I might "steal" the idea from GitLab on how they use milestones :)
   
   
[[File:Gitlab-milestone-progress.png|GitLab milestone progress bar]]
[[File:Gitlab-milestone-progress.png|GitLab milestone progress bar]]

Revision as of 13:09, 21 March 2014

isitfedoraruby.com is a web-application built with Ruby on Rails, that keeps track of the Fedora/Ruby integration, especially gem -> rpm conversion.

The project was started on 2012 as a Google Summer Of Code project by User:Zuhao and later were added some new features during the Google Code In program. This is my idea of enhancing it from a packager's point of view.

An overview of your proposal

isitfedoraduby is a nice project that never got the attention it deserved. I believe this is because it serves merely as a portal of the gems packaged for Fedora, showing their statuses and some nice statistics and graphs.

Being a packager myself for almost a year now, I am familiar with the difficulties one has to overcome in order to package a gem. This idea aims to facilitate the packaging process by providing some new tools and promote the site among Fedora ruby packagers and the rest of the ruby community.

Some of the ideas include:

  • refactor the base code where needed
  • write rspec tests
  • enhance the gemfile_tool
  • implement a feature of gem/app packaging progress bar
  • enhance the dependency checker
  • create a preview page with stats of a gem not yet packaged
  • use polisher gem where needed
  • write documentation and how-to guides of rubygem packaging
  • UI - UX changes
  • make badges like travis-ci/codeclimate/gemnasium/etc so that each project could show that they have the library packaged for Fedora

Just a note that implementing all the items above, might take more than three months as GSoC officially lasts. During the bonding period (April 21 - May 18) I will decide which to implement first and which will follow after the program ends.

The need you believe it fulfills

These enhancements will hopefully promote the site usage among Fedora ruby packagers and attract new ones.

For new packagers

Based on my experience as a new rubygem packager a year ago, I have compiled some useful information for the packaging process that would help new users to engage in ruby packaging much quicker than I did. You can read a draft here. This will be accessed through a special docs page on isitfedoraruby.com and could be edited with pull requests in the github repo.

I also plan to document the workflow a packager follows to build/update a gem, the tools needed to achieve this and the ones that would make the process easier, e.g. using the polisher gem and its binaries.

Of course documentation is not the only important thing, new packagers could also use the advanced features I describe below.

For existing packagers

The new enhancement that I have in mind for the gemfile_tool will help packagers that want to package an application with many dependencies. For example, Gitorious and GitLab are two big rails projects with over 100 dependencies each. The way gemfile_tool is now implemented isn't of much use. Using the polisher gem we can enhance it to depict the dependencies in a nice format (eg. table), export to json, display only the runtime dependencies, etc.

Any relevant experience you have

To be exact, it's been a year since I got involved in learning the ruby language and the rails framework. Since then I have deployed numerous rails applications, the most complex being GitLab which was included in my previous GSoC proposal. I have written quite a few tools/scripts in ruby (mostly for personal use) and also some simple rails apps.

isitfedoraruby is the first big application that I will be working on. Apart from ruby/rails, I have a solid knowledge of linux since I use it everyday for the last 8 years.

How you intend to implement your proposal

Refactor basecode where needed

Zuhao has been maintaining the app for quite some time now, with recent changes the port to rails4. That said, an important amount of work is already done. From my side I will try to find if the existing code needs any refinement.

Write tests

The current test suite is almost non-existent. I will use:

  • rspec for models/controllers
  • factory_girl for feeding tests
  • capybara to simulate users' interaction with the app
  • selenium-webdriver to test javascript interactions

For views I will use feature specs. Existing minitest tests will be replaced with rspec ones.

As a first step, I will make a list of things that need testing, as well as reporting some existing bugs that will be added to the tests to avoid future repetition.

Enhance gemfile_tool

gemfile_tool has the ability to parse a given Gemfile{,.lock} and tell you whether the gems found are already packaged and in what Fedora versions. In its current implementation it uses a hacky way to calculate the gems. Also, it has the drawback that it uses cached versions taken from Fedora's repos once a day through a cron job.

On the other hand, using the polisher gem we can query a bunch of services (koji,buzilla,rubygems.org) on the fly and learn about the status of the gems at the given time.

As an enhancement, one will be able to see a table like the one I keep track of GitLab's dependencies.

Show the packaging progress of a rails app or a gem

A separate page that shows the packaging progress of a gem will be provided.

Scenario

The packager submits a Pull Request on the issue tracker providing a yml file. When the patch gets merged and deployed to production, a new page will be created depicting the packaging progress of this certain gem.

Implementation

The yml file will contain information of the gem name as per the review request and the bugzilla issue number. Each time the gem page gets loaded, it will query koji for rawhide builds and bugzilla for any Blocks issues. If we have those two values we can calculate how many dependents gems there are not yet or already packaged.

A nice progress bar with the percentage of gem packaging completion will be provided as well. For each gem that gets in rawhide, the progress bar gets a little further. There can also be a number of other cool info in the page, like links to bugzilla requests so that someone could lend a hand, etc.

I might "steal" the idea from GitLab on how they use milestones :)

GitLab milestone progress bar

Future enhancement

At first I will focus on implementing this for a single gem but later it can be extended to track the progress of a rails app.

Enhance dependency checker

The current representation of a gem's dependencies is in a tree format, not very handy if you want to extract information.

Influenced by https://www.gemlou.pe, I plan to implement a similar representation and show the dependencies in a more elaborate way, for example in a table format like:

 gem1
 |- gem2
 |- gem3
     |- gem4


This feature will also be available for gems not yet packaged, with an extra addition: one could find out which gem should start packaging first, that is this that has no dependencies or its dependencies are already packaged. For example consider a gem with three dependencies (children) and each of them has some children as well.

 gem1
 |
 |- gem2 (packaged)
     |
     |- gem5 (implies packaged)
     |
 |- gem3 (not packaged)
     |
     |- gem6 (packaged)
     |
     |- gem7 (not packaged)
     |
 |- gem4 (not packaged)
     |      
     |- gem8 (not packaged)

Implementing a breadth-first search algorithm we can move along and see whether the children nodes are packaged. Starting with gem2, since it is packaged, that implies that its children are also packaged so we move on to the next gem3. Following this process we can tag which gems are free of dependencies, so that they could be packaged first and build up the chain.

Special pages

Pages that would help the user experience are:

  • list of gems pending review
  • list of gems already assigned but stagnated for too long
  • list of gems pending review and marked as NEEDSPONSOR

All these can be queried from bugzilla through the ruby-bugzilla gem.

RSS feeds

To make it easy to follow up rss for one's packages with categories:

  • not up-to-date
  • pending review
  • etc

A rough timeline for your progress

27/03 - 27/04

The first month I will study the codebase, get in touch with the current maintainers and straighten out any queries I might have. During this time, I will also decide which parts might need a cleanup.

28/04 - 19/05

19/05 - 27/06

27/06 - 18/08

Any other details you feel we should consider

Not something I can think of.

Have you communicated with a potential mentor? If so, who?

Yes, User:vondruch