PublicLab: Mapknitter Export Module and Spectral Workbench upgrades

Hi guys, I’m Alax from Brazil.

I got accepted to work once again (yes, this is my second GSOC) with the PublicLab folks, my plan is keeping up the good from last year. Last year a lot was achieved in the PL organization, I intend to do even better this year.

Those few days that passed since GSOC results have been filled with work already. I’m very happy to have the chance to work with the PublicLab team once again. I have high expectations on this project since it has been going so nice already so far. This week I have done some planning by opening issues at the Spectral Workbench repository. Since my mentors and I have already established a communication channel (Gitter), I got to get practical these last couple of days and already did some coding. I have been preparing myself for this project for a long time, so I got to previously make several contributions that would make my job easier or at least less painful.

Below I’ll list some useful links regarding my work, and future plans:

  • Report of my work accomplished last year
  • What I want to accomplish this year

What I have already done this past month:

  • Updated Mapknitter’s Rails 6 pull request
  • Opened several initial issues at Spectral Workbench
  • Upgraded Ruby, Node and Rails version at Spectral Workbench (under review)
  • Upgraded Travis CI and Docker integration at Mapknitter-Exporter
  • Upgraded Travis CI and Docker integration at Mapknitter-Exporter-Sinatra
2 Likes

Community Bonding - Week 2

This week I got to do some planning and also chatting with the folks at PublicLab. I have talked to Ruturaj Mohite and we have succesfully included the SimpleCov test coverage tool in the Rails upgrade at the Spectral Workbench repository:

I have also participated in the community’s weekly bonding, where everyone in the community gets a chance to chat and report their accomplishments of the week:

I’m also awaiting review on some PRs, such as:

My plans on the upcoming week is to create a detailed Planning Issue, as my mentor @jywarren has requested, for both Spectral and Mapknitter Exporter projects.

3 Likes

Community Bonding - Week 3

This week I got to finish my planning issue and published it, I think it is very complete :partying_face:, but also very simple and with well defined tasks, it is all available at:

I have also opened a PR including the Codecov and Simplecov at the main Spectral Workbench branch, here:

This was a nice feature since it drives the PL org to a more standardized - thus friendly - ecosystem of projects. I got to collaborate with PL’s SysAdmin too :smiling_face_with_three_hearts: he’s given me a nice help at the PRs I was struggling with, which were:

He’s given me some feedback which I’m already going through.
My plans for the upcoming week is to work on the PRs mentioned above and start working on the test coverage upgrade for Spectral Workbench.

3 Likes

Community Bonding - Week 4

This past week I had a few personal problems, so I couldn’t get to be very productive, I had a discussion on next steps with my mentor at:

And I also had the help of my friend Ruturaj Mohite(@gr455) on upgrading the test coverage of the Spectral repository:

This next week I’ll focus on keep upgrading the test coverage and set up some system tests

2 Likes

Coding Phase - Week 5

This week I have gotten to increase Spectral Workbench’s test coverage here:

I have also gotten a reply from our sysadmin at:

He’s has given me the directions I needed and now I think the PR is ready to be merged. Also I have gotten to work on the Mapknitter repository here: https://github.com/publiclab/mapknitter/pull/1329. Here I have setup a Dockerfile for production so we can properly run MK both in development and production environments.

2 Likes

Coding Phase - Week 6

This week I have set finished\ multijobs builds PR at Mapknitter-Export-Sinatra with the help of PL’s sysadmin here:

Still need someone to merge it though.

I have also done a HUGE refactoring at Mapknitter-Export-Sinatra codebase, in a few words, I have started modularizing the entire code structure. The benefits that this PR brought are that we now are avoiding potentially-confusing scoping problems, reduce code duplication(by using lambdas) e some other minor advantages that makes the difference as we scalate the project size. All of this work can be found here:

I have set Rubocop at Mapknitter Exporter Sinatra too so that we can maintain the standard set in other PL repositores(via: Mapknitter and Plots2). Also available here:

I have also opened a PR that changes our base docker image to Ruby’s official:

My PR that increases the test coverage at Spectral Workbench has been merged recently too:

2 Likes

Coding Phase - Week 7

This week I have been struggling on getting the Rails 4 PR merged in the production branch. I have gotten view access to the production logs, but now I need access to the script files that ships Spectral Workbench.

I have been also working in the Rails 5 upgrade in parallel while we can’t solve the production issue.

This has been a busy week for me at college, so I could accomplish much of my plans for this week, I still intend to keep moving forward with the Rails 5 upgrade and also setup Rubocop for the Exporter gem.

One nice achievement is that https://github.com/publiclab/mapknitter/pull/1329 has finally been merged!!

2 Likes

Coding Phase - Week 8

This past week I have gotten https://github.com/publiclab/spectral-workbench/pull/499 to be able to run in production with the guidance of our sysadmin. I have also gotten to work with Ruturaj Mohite, one of the community members, in order to increase our test coverage, results are here https://github.com/publiclab/spectral-workbench/pull/519.

I have got to work a lot with our sysadmin, we have set https://github.com/publiclab/mapknitter-exporter-sinatra/pull/58 and merged it. I have also included Rubocop and fixed SEVERAL offenses at the Exporter gem here https://github.com/publiclab/mapknitter-exporter/pull/31. And I have a done a lot of progress at the Rails 5 upgrade PR, here https://github.com/publiclab/spectral-workbench/pull/516/commits.

2 Likes

Coding Phase - Week 9

This has been a very nice week, finally have gotten https://github.com/publiclab/spectral-workbench/pull/499 merged, with it I have fixed the Jenkins workflow and generated a fresh schema - the old was was preventing spectra to be saved.

In the Exporter Gem repository, we have also got the merge https://github.com/publiclab/mapknitter-exporter/pull/31. Which is part of the effort in standardizing the Public Lab codebase.

Also got to help our sysadmin by fixing Plots2 repository startup issue, the problem is described here https://github.com/publiclab/plots2/issues/8108 and my fix is available here https://github.com/publiclab/plots2/pull/8111. It has already been merged :slight_smile:

2 Likes

Coding Phase - Week 10

This week I have just been working on Rails 5 on Spectral Workbench repository, I decided to fix the failing tests before I get to work with Bower~>Yarn migration. This will be a very important update to Spectral, I already have gotten to increase the test coverage on around 80%.

We now using strong params practice from Rails, using newer Ruby and Rails syntax, using proper finders and much more.

3 Likes

Coding Phase - Week 11

This week I successfully got to fix all remaining tests at the Rails 5 PR and also got to include Yarn in favor of Bower (which is deprecated). So I got to finish everything I have planned.

By fixing the tests I have also gotten to do some syntax upgrades and improved the Spectral Workbench codebase error treatment. For the upcoming week I’d like to fix the eventual error that will pop up on Rails 5 and the Yarn upgrade PRs. Also I’d like to work on some more code modularizing for the Exporter Sinatra repository.

3 Likes

Coding Phase - Week 12

This week I got to completely remove Bower in favor of Yarn and added it to the asset pipeline in Spectral Workbench at https://github.com/publiclab/spectral-workbench/pull/527.

Also I have gotten the help of my friend Ruturaj to remove the usage of dynamic routes (which is a security concern) and manually write down every needed route. This is a very important step for the upgrade. For now I have been waiting for the sysadmin to fix a potential Nginx bug, so I can test Rails 5 on production, since I do not have access to it. But locally Spectral on Rails 5 works perfectly.

3 Likes

Coding Phase - Week 13

This week I got to successfully get the Rails 5 upgrade in production. Completely removed bower and its related deprecated files and completely setup Yarn, for javascript dependencies management.

In addition to that I have also gotten the help of my friend Ruturaj Mohite, who’s part of the Public Lab community, which helped me removing the dynamic routes out of Spectral Workbench. That was a very important feature because dynamic routing is a big security concern. Since latest Rails doesn’t allow abstract(dynamic) routing anymore, we’ve made Spectral less sensitive to security breaches, such as SQL injection.

2 Likes

Coding Phase - Week 14

I have been missing a little this past week. Unfortunately because a close friend of mine died in a motorcycle accident and my family and I have been taking care and supporting the loved ones. Hopefully God will bless them with some comfort in these hard times. This upcoming I’ll focus now on implementing the system tests on Spectral Workbench and implement GitPod on the Exporter Sinatra repo.
I’d also like to do some refactoring on the Exporter sinatra repo.

2 Likes