Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSOC 2020: Mapknitter Image Export and Spectral Workbench upgrade #506

Open
23 of 33 tasks
alaxalves opened this issue May 19, 2020 · 14 comments
Open
23 of 33 tasks

GSOC 2020: Mapknitter Image Export and Spectral Workbench upgrade #506

alaxalves opened this issue May 19, 2020 · 14 comments

Comments

@alaxalves
Copy link
Member

alaxalves commented May 19, 2020

Here, we can discuss about weekly goals and the plans for the work to be accomplished during the whole project.
Original proposal is available here: https://publiclab.org/notes/alaxallves/03-06-2020/gsoc-proposal-2020-spectral-workbench-rails-and-devops-upgrades?_=1583504846

Spectral Workbench

Tasks

Pre Steps

  • Get test coverage percentage tool set up
  • Define a desired stable test coverage with mentor
  • Increase test coverage percentage until the desired one
  • Improve CI builds
  • Containerize the development environment, App and Database
  • Include and configure SimpleCov to monitor test coverage
  • Set a ruby coding stylesheet as in Mapknitter and Plots2 projects
  • Create intermediate "development" branch

Upgrade

  • Increase test coverage percentage until the desired one
  • Switch javascript dependencies manager, Bower ~> Yarn
  • Create stable docker environments
  • Create stable CI/CD pipelines
  • Update Ruby version
  • Update gems versions and lock them on the Gemfile
  • Update Yarn version
  • Update Rails
    • Update to Rails 4.2
    • Update to Rails 5.0
    • Update to Rails 5.2
    • Update to Rails 6.0

Mapknitter Exporter

Tasks

Pre Steps

  • Identify which parts of the export module need to be upgraded
  • Define how the upgrades should happen and where(several MK exporter related repos)
  • Define which new features or flows should be changed or included on the upgrade

Upgrade

  • Get Mapknitter running into the cloud
  • Code Performance
    • Break def self.generate_perspectival_dist method into multiple smaller methods
    • Break def self.run_export method into multiple smaller methods
    • Break def self.generate_composite_tiff method into multiple smaller methods
    • Break def self.distort_warpables method into multiple smaller methods
    • Reduce the amount of params passing
  • Container-wrap any Exporter related projects

Discussion

  • Collecting a set of image URLs and their corner coordinates
  • Determining the image dimensions in pixel and converting corner coordinates to pixel positions
  • Producing an SVG artifact containing images at relative positions for less memory usage
  • Exporter module as a microservice
@alaxalves
Copy link
Member Author

Test coverage tool set up:
#496

@alaxalves
Copy link
Member Author

Improve CI builds:
#480
#487

@alaxalves
Copy link
Member Author

Intermediate "development" branch:
https://github.com/publiclab/spectral-workbench/tree/development

@alaxalves
Copy link
Member Author

Containerize the development environment:
#470

@alaxalves
Copy link
Member Author

Update Ruby, Node and Rails:
#495

@alaxalves
Copy link
Member Author

Get Mapknitter running into the cloud:
publiclab/mapknitter#1273

@alaxalves
Copy link
Member Author

Container-wrap any Exporter related projects:
publiclab/mapknitter-exporter#27
publiclab/mapknitter#363

@alaxalves
Copy link
Member Author

Currently we're running on ~68% of code coverage. Via:
image

@gr455 has kindly offered his help to get the percentage up, but I still @jywarren to define with me an acceptable percentage, in order to get #499 merged and consequently the upcoming upgrades.

@jywarren
Copy link
Member

Just linking in my suggestion from the check-in -- Do you think that system tests which walk through the steps in the tutorials in https://publiclab.org/wiki/spectral-workbench will be possible? -- this will increase the number of required tests but since those interactions (like calibration, or adding operations, for example) are really critical, it'll help to have system tests for them!

For the live capture interface, we could... make a special testing page which includes a short looping video of a live spectral capture. This would be pretty intense though. Perhaps we can coordinate with the team we've begun working with on spectral-workbench.js who may be developing such tests on the client end! publiclab/spectral-workbench.js#159

@jywarren
Copy link
Member

To the question of acceptable coverage, I think system tests of the critical functions documented in the tutorials would be make me very confident in merging #499. What do you think of that, Alax, does that makes sense to you too?

@alaxalves
Copy link
Member Author

Hello Jeff, thx for the feedback.
Right now, me and Ruturaj are working with the models and controllers tests to assure #499 is more trustful to be merged. I felt like after those testing upgrades we can be confident regarding that. Now when it comes to the system tests, I think it's a great idea and I believe that it could fit our schedules, but I don't think that it should push us back from merging #499 once we have nice coverage through the models and controllers tests. Because if we wait on system tests to get it merged I think it'll delay a lot the work to come.

@jywarren
Copy link
Member

jywarren commented Jun 2, 2020

Hi @alaxalves I think this is OK because the status quo right now is that these are manually tested. What we can do is if you can go through the videos and guides on the above links to confirm that they work (i.e. calibration, using operations, using snapshots, and basic intro video on
https://publiclab.org/wiki/spectral-workbench-tools, and confirm each of these locally, we can merge #499, as that is the current state of our testing. And then yes, let's aim to improve on this as it's quite a slow process we have now, and system tests will speed that up substantially -- how does that sound? Thank you!

Also - fixed the videos finally today. Thank you for your patience!

@alaxalves
Copy link
Member Author

Great, I'll manually confirm that those features actually work and I'll give the input here and fix whatever has to be fixed.

I have already an effort on setting system tests here --> https://github.com/publiclab/spectral-workbench/tree/feat/system-tests but it'll be waaaay less painful when we have Rails >5 here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants