Show your support for community science. Donate to Public Lab »

Public Lab Research note


GSoC 2020 proposal: Spectral Workbench - Rails and DevOps upgrades

by ruturaj_mohite new contributor | March 19, 2020 10:06 19 Mar 10:06 | #23184 | #23184

About me

Name: Ruturaj Mohite

Affiliation: International Institute of Information Technology, Bangalore

Github: @gr455

Email(PL): ruturaj.mohite@iiitb.org

Email(Google): mohite.ruturaj15@gmail.com

Linkedin: Ruturaj Mohite

Location: Bangalore, India

Timezone: Indian Standard Time (UTC +5:30)

Background

I am an Electronics and Communication Engineering freshman at International Institute of Information Technology, Bangalore. I am a part of the Software Development Group of my university called Zense. I have worked on projects in Python, C and Ruby on Rails and contributed to a few open source organizations including PublicLab, because of which I have built a great interest and fascination towards open source development.

Project description

Abstract/summary (<20 words):

Spectral Workbench - Rails and DevOps upgrades

The aim of the project is to upgrade the Rails, migrate away from deprecated asset pipelines and expand spectral-workbench's test coverage.

Problem

  1. Upgrade from current Rails 3.2 to Rails 6.0
  2. Improve test coverage
  3. Migrate asset management from Bower+Sprockets to Yarn+Webpack
  4. Remove deadweight

Implementation

  1. Upgrade from current Rails 3.2 to Rails 6.0

The Rails upgrade will take place in the following steps:

  1. Rails 3.2 to Rails 4.0
  2. Rails 4.0 to Rails 4.2
  3. Rails 4.2 to Rails 5.0
  4. Rails 5.0 to Rails 5.1
  5. Rails 5.1 to Rails 5.2
  6. Rails 5.2 to Rails 6.0

In this process, all the outdated callbacks will also be removed with each step.

  1. Improve test coverage

The spectral-workbench test coverage stands at about 74% currently, with this goal, I aim to bring it up to about 85% which will also aid in the Rails upgrade to track the changes made between each upgrade step and make sure the application has no errors between the steps. Along with functional and unit tests, I also intend on writing system tests for spectral-workbench using selenium web-driver and capybara once we hit Rails 5.1 in the upgrade, to test the whole workflow as it appears to the user. The system tests' implementation will be similar to what is done in Mapknitter. Selenium web-driver will be configured in the following way:

image description

And a sample test will look like:

image description

So far, I have made some progress regarding this:

https://github.com/publiclab/spectral-workbench/pull/486

https://github.com/publiclab/spectral-workbench/pull/490

And created an issue against a hurdle I faced during writing tests:

https://github.com/publiclab/spectral-workbench/issues/488

  1. Migrate asset management from Bower+Sprockets to Yarn+Webpack

Due to the deprecation of Bower, the project will be migrated to Yarn for the management of its Javascript dependencies. I plan to carry this out using bower-away. This will do away with modules in public/lib and will instead store them in node_modules/@bower_components and create a symlink to references of public/lib to reference node_modules/@bower_components in the postinstall script.

image description

Further the asset pipeline will be substituted with Webpack once we hit Rails 5.1 in the upgrade.

  1. Remove deadweight

This is a little tricky as it would require a lot of manual work to find dead code. The process is to find dead code, remove it and run tests to make sure the code removal didn't break anything. This is where the expanded test coverage will help a lot.

By the end of the summer, we should have:

  • Rails 6
  • Test coverage of at least 85% + System tests
  • Better CI
  • Asset management switched to Yarn+Webpack
  • All unwanted files and dead code removed

Timeline/milestones

image description

Needs

I would require frequent reviews from the community members on my work and guidance from my mentor in case I get stuck somewhere.

First-time contribution

Contributing to PublicLab has been a very learning experience. In the past months of my contribution towards PublicLab, I have contributed to Mapknitter and Spectral-Workbench by solving bugs, writing tests, adding feature enhancements and reviewing others' pull requests. I have developed a deeper understanding of the Rails framework and DevOps. I have also learnt the process of testing a large Rails application writing a few tests for Spectral-Workbench myself.

I chose Spectral-Workbench as my GSoC project because I am very fascinated by Ruby on Rails and its capabilities in developing web applications. I also have a very good understanding of the code base of Spectral-Workbench. With this project, I aim to develop my skills in backend development, testing and DevOps; and gain experience of working on a big project used by thousands of people worldwide.

These are some of my contributions towards PublicLab:


Experience

I have worked on various projects in Python, C and Ruby on Rails which can be found on my Github. Some of these are:

League

An application to manage players and teams playing in a league built using Ruby on Rails

Gesture-mouse

A Python program built using OpenCV HAAR Cascade Classification to detect user's hand to control the mouse cursor using gestures

MegaByte-CTF

A Capture The Flag contest that I made with my friends from high school which contains challenging questions related to cyber security.

In the past, I have also contributed to open source organizations other than PublicLab like coala and Zense.


Teamwork

Personally, I am a great fan of teamwork and collaborative efforts. I have had really good experiences working on team projects before. I am a part of Zense, the software development group of my university and am currently working on projects with a team. In the past, I have participated in many hackathons with a team and have also completed team projects such as MegaByte-CTF. I not only seek collaboration from a team but also to learn from the other team members.


Passion

My motivation behind working for this project is to get more exposure in open source development. I have been a part of PublicLab for over 3 months and have a great appreciation for the open source tools PL provides. I have also learnt a lot on my way here and hope to learn a lot more through this project.

Audience

This project will not only be helpful to the users of spectral-workbench but also introduces prospects of new features to be added in the future.

Commitment

I completely understand that this project requires a full time commitment and am ready to invest 6 to 7 hours (or more if required) daily for completion of this project.


6 Comments

Hi @ruturaj_mohite , love your proposal

Thanks a lot @cess


Reply to this comment...


Kindly update the timeline. Timeline got changed recently

Yes I have done it @bansal_sidharth2996 . Thanks :)


Reply to this comment...


@bansal_sidharth2996 @sagarpreet @warren . Can you guys please review this proposal once so that I can submit it to google before deadline. Thanks :)

Yes, this is fine. Please submit it on Google. We allow changes here till results are published. So don't worry. We will continue discussion Thanks

On Wed, 25 Mar 2020, 4:59 pm , \<notifications@publiclab.org> wrote:

Hi! You were mentioned by ruturaj_mohite in a comment on the research note GSoC 2020 proposal: Spectral Workbench - Rails and DevOps upgrades. You can reply to this email or visit this link:

https://publiclab.org/notes/ruturaj_mohite/03-19-2020/gsoc-2020-proposal-spectral-workbench-rails-and-devops-upgrades#c26572

ruturaj_mohite wrote:


@bansal_sidharth2996 @sagarpreet @warren . Can you guys please review this proposal once so that I can submit it to google before deadline. Thanks :)


Reply at: https://publiclab.org/notes/ruturaj_mohite/03-19-2020/gsoc-2020-proposal-spectral-workbench-rails-and-devops-upgrades#comments

Report abuse to: moderators@publiclab.org

Check out the blog at https://publiclab.org/blog | Love our work? Become a Public Lab Sustaining Member today at https://publiclab.org/donate If this email title has an ID in the format #0000, you can reply with the email you use at PublicLab.org and your response will be posted as a comment on the website.

Is this a question? Click here to post it to the Questions page.


Reply to this comment...


Login to comment.