MSO4SC / MSOPortal

MSO4SC Web Portal
2 stars 4 forks source link

Integration of GitLab text/source editor in MSO Portal #102

Closed johanjan closed 6 years ago

johanjan commented 6 years ago

We would like to provide a Jupyter-like interface in the MSO Portal for both C++ and Python. GitLab already has very competent text/source editors (https://docs.gitlab.com/ee/user/project/web_ide/), we can re-use that.

This Issue is based on discussion with Javier Carnero, Victor Sande Veiga and Tamas Budai.

This is the desired workflow in MSO4SC/MSO Portal:

  1. When a new user logs into MSO Portal, a button is available to "edit source code" of a default repo.
  2. When the user clicks the button a fork is created from the default MADF/Pilot repo, and the GitLab WebIDE opens for the repo in a web frame/tab.
  3. The user edits the code/parameters.
  4. When the user click "commit" the MSO4SC Continuous Integration (CI) automatically builds a Singularity image of the repo.
  5. The user can then run the image in MSO portal and inspect the output.

Notes:

  1. Possibly WebIDE is not available in the MSO4SC version of GitLab, we can use the simpler text/source editor in a first version.

Timeplan:

Javier Carnero has indicated availablility to look into the design/implementation the week of June 18.

emepetres commented 6 years ago

Tecnically speaking, when an user clicks the button, the portal backend will: 1.- Receive the username, the parent gitlab repository (the original repository) and the file name to be edited. 2.- Check if the repository exists for this user in gitlab 2.1.- If the repository does not exists, fork it from the parent repository to the user space. 3.- Open a new window to edit the file in the user repository.