Name: Avkaran Singh
Google Code-In Mentor-2018 @publiclab
Affiliation: Indian Institute of Information Technology, Vadodara
Location: Gandhinagar, Gujarat, India
I would like to upgrade maknitter Rails version 3.2 to 6.0 which is the latest version of Rails and also I want to write Code Coverage Test for maknitter and want to fix all bugs in mapknitter.
Abstract/summary (<20 words):
In this summer I want to work on upgrading the code of mapknitter repository rails 3.2 to rails 6.0 The project would have many challenges because currently mapknitter in rails 3.2. So need to changes step by step to converting rails 3.2 to 6.0.
Upgrades MapKnitter to Rails 6
Current State of the Problem
Currently, Mapknitter is running on Rails on 3.2 and Ruby 2.4.6 which is the old version of Rails Currently Rails new Release version 6 of Rails. So Version by Version Rails added a new feature in every version of rails and improve some of the code and features of rails. So Maknitter also upgrading newly feature adding this year in GSoC So mapknitter Upgrade the rails version also It would be great and helpful to those people who are working on mapknitter and extending the functionality of mapknitter.
Rails upgrading new version time by time and it's latest beta 3 version of rails is 6.0. Some details about rails 6.0.there many new releases in rails 6.0
Rails with Ruby
Rails generally stay close to the latest released Ruby version when it's released:
- Rails 6 requires Ruby 2.5.0 or newer.
- Rails 5 requires Ruby 2.2.2 or newer.
- Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.
- Rails 3.2.x is the last branch to support Ruby 1.8.7. Support for all of the previous Ruby versions has been dropped officially. we should upgrade as early as possible.
- Rails upgrade
- Rails 3.2 => Rails 4.0
- Rails 4.0 => Rails 4.1
- Rails 4.1 => Rails 4.2
- Rails 4.2 => Rails 5.0
- Rails 5.0 => Rails 5.1
- Rails 5.1 => Rails 5.2
- Rails 5.2 => Rails 6.0
- UI update and collaborate with others
- Fix existing deprecation warnings
- Write Test Coverage for new Rails 6.0 Unit testing Functional testing
- JS API endpoints of MapKnitter, write Functional Test
- Karma, Jasmine, Mocha, QUnit
- Code Clean up after upgrade to Rails 6.0
- Generate Code Coverage Report
- Add git tools
- codeclimate, codacy, codecov
I want to complete my Project Goals.
To upgrade the version of rails So we will not Upgrade rails directly to rails 3.2 to rails 6.0 because Lot of error and conflict will occur So we upgrade rails version by version. And according to that version Update also ruby version.
- Change Rails version in Gemfile: Simply change the Rails version in Grmfile
gem 'rails', 'rails_version'
- Update Rails dependencies: Install all dependency with new Rails Version
bundle update rails
- Updating Configuration Files: Minor Rails version updates seldom require changes to configuration files. Major Rails updates often change configuration files. If we don't make the required configuration file changes, we'll likely see deprecation warnings when we launch a Rails application. Rails provide a
rails rails:updatetask to update configuration files. The
rails rails:updatewill identify every configuration file in our application that differs from a new Rails application. When it detects a conflict, it will offer to overwrite your file. When
rails rails:updateoffers to overwrite a file, enter d (for "diff") and review the differences. As an alternative, check out RailsDiff, which provides an overview of the changes in a basic Rails app between example 3.2 and 4.0 (or any other source/target versions).
- Migrate Database: After these change might have changes in some rails database so need to migrate rails database.
- Run Test: After updating Rails and configuration files, run test suite and write more test for every new rails upgrade.
Rails Unit testing
Write unit test case of mapknitter rails because version by version update rails app so there will be error occur so need to add write all possible test need to more and more reach test coverage. write the test case for Comment, export, map, node, tag, user, pagination Example: Only login user can delete own post but anonymous can't delete the post
Rails Functional testing
Functional Testing is probably more important than Unit Tests as they test that the many components of our application are working together correctly. A Functional Test making a request to a Controller action and then asserting that the request is handled correctly. This will typically involve interacting with multiple components of our application such as Mailers, Queues, and the Database.
I would like to generate a code coverage report for Ruby, to know how many lines/blocks/arcs of your code are executed while the automated tests are running. And here is
SimpleCov gem for ruby to generate code coverage report for ruby
Gem simply SimpleCov add to gemfile
gem 'simplecov', require: false, group: :test
JS API endpoints of MapKnitter, write Functional Test
Mapknitter is a free, open-source tool for combining and positioning images into a composite image map. So user uploads own aerial photographs. So we need to add some unit Test and Functional Testing for then Example: only image upload, Image position, image display at diff. Sizes etc. So I would like to suggest some JS Library Write Test case coverage
Code Clean up and Comments after upgrade to Rails
After Rails app upgrade there can be useless code so after every upgrade step I will try to remove that useless code and Try to well commented code.
Git tools (codeclimate, codacy)
- CodeCliemate Code Climate combines line-by-line test coverage reports, technical debt assessments, and style checks in every pull request so that your team only merges clear, maintainable, and well-tested code.
- Codacy Codacy is an automated code analysis/quality tool that helps developers ship better software, faster. With Codacy, you get static analysis, cyclomatic complexity, duplication, and code unit test coverage changes in every commit and pull request.
- phase 1 (May 27, 2019 - June 28, 2019)
- phase 2 (June 28, 2019 - July 26, 2019)
- phase 3 (July 26, 2019 - August 26, 2019)
All documentation and blogs are available on the internet. So with those documentations, Blogs, and help of mentors, I will complete this project. If I need Help I will ask to in publiclab gitter channel and Mentor
Comments, to show overall community involvement (like helping others):
I start my coding with learn c,c++ in the first semester and completed lab assignment after I started competitive coding and gradually move to learn other languages while competitive coding learn Java, Python,Ruby, from hacker Rank and youtube tutorial and Blog after this, I Introduce with Open SOurce GitHub, GitLab So, I started learn new Technology and framework Django, Flask, Ruby, React, Angular, Vue. and contribute to many organization and repository. I can adjust my self in any type of technology and can learn quickly new technology which is required to complete that task. While learning and Institute I have worked in many projects with this Technology with Team and my Own Project
- File Share & chatting in Java : In this project Send file from one computer to another computer client can chat with another client and can send file to another client see history.
- Attendance System
Attendance System web app for Teacher and Student
Where Teacher can take student Attendance and Student can
see their attendance.
- Profilee Social media app
- NGO Website Revamped live client website with additional features Job forum, Discussion forum, Authentication, Donation
- Air-Writer It was Hardware Project. In this project, Computers to recognize letters or numbers which are written in the air Used to develop cost-effective technologies for blind people, Handicap Teacher
In File sharing Project, NGO Website and Air writer that was Team project which was a 6,6 member and 3 member groups in 3 rd year - 5th Sem. SO I work with every team member and discuss ideas with every team member and also I lead my Team in Air writer Project(Summer Design Project). I divide the work to every member with his ability and willingness to work which he wants to work. I also help/solve Problem and Error in Each project
My passion is coding and I started my contributor in publiclab with plots2 project which was very helpful to improve my experience in Open Source after I got a mentorship in GCI it was very awesome position at the public lab. SO this thing makes me more interest in the publiclab and I also like especially mapknitter and image sequencer Project.
My project would help maknitter website to load faster and therefore would enhance the user experience with the website and updating version of maknitter 1 to makitter 2.
Yes, I understand the commitment to this project and would try my level best for making this project successful. I know that GSoC is a full-time internship program and if selected for GSoC, I will not take any other internships. So, I will give my full time to this project.