ersilia-os / ersilia

The Ersilia Model Hub, a repository of AI/ML models for infectious and neglected disease research.
https://ersilia.io
GNU General Public License v3.0
203 stars 131 forks source link

[Epic] New Model Submission Flow #287

Closed D1M1TR10S closed 1 year ago

D1M1TR10S commented 2 years ago

Summary ⭐️

Architect and build a new model submissions flow for a more efficient and scalable submission process.

Objective 🎯

https://github.com/ersilia-os needs a streamlined way for users to submit model requests and when approved, have a shiny new repository made for their model based on the eos-template repo.

Supporting Details ✏️

Workflow

This section will walk through the purposed workflow

  1. A user opens a GitHub issue using an issue template. The issue template contains boxes for users to respond to questions that are required. Example questions and responses we can gather from the issue template:
    • Model Name: My super cool molecule
    • Repo Name (ensure it is unique): ersilia-os/<answer>
    • Model Description: Lots of details here...
    • License: MIT
    • etc...
  2. An organization member of @ersilia-os reviews the issue upon its submission. At this point, the org member would discuss and gather feedback from the community member around the model.
  3. Once all looks good, the org member runs the /approve command on the issue. This command is only available to org members and official "approves" the request to create the new model submission. Code will be configured in the ersilia-os/ersilia repository to run a slash command dispatch Action when an org member comments /approve. This Action will do the following:
    • Pull the user submitted answers from the issue template they filled out (repo name, description, model name, etc)
    • Create a new repository using the eos-template repo by calling the GitHub CLI tool (all in the same Actions workflow). The GitHub CLI tool has confirmed support for template repository setup
    • The user submitted answers are added to the repo template after it has been initialized
  4. 🎉 We have now gone from a user requesting a new model from an issue, to the repo being created!
  5. Now that the model repository has been created, the external user can fork the model repo and open pull request from their fork with contributions
Screen Shot 2022-10-11 at 4 30 46 PM

Dependencies 🖇

Actions 1 & 2 depend on this being complete.

Team 🏀

DRI: @GrantBirki Backup: @Lehcar

Timeline 🗓

Documentation 📓

Lehcar commented 1 year ago

Since we haven't been able to get the issue parser action to work, I've gone ahead and created an MVP parsing python script (it needs a lot of work and needs to be cleaned up) to run in a reusable Actions workflow. I haven't tested the actions portion of it yet--just the script part.

GrantBirki commented 1 year ago

@Lehcar when I'm back from traveling, I can bundle that into a Docker Action for ya and it can be open source for all!

GrantBirki commented 1 year ago

Native JS Action built and tested! https://github.com/GrantBirki/issue-template-parser

GrantBirki commented 1 year ago

The following PR I am working on is now significantly less blocked 🎉

https://github.com/ersilia-os/ersilia/pull/289

GrantBirki commented 1 year ago

PR linked above should be ready to ship 🚢

miquelduranfrigola commented 1 year ago

Hi @GrantBirki and @Lehcar - I have already merged the PR.

GrantBirki commented 1 year ago

xref: https://github.com/ersilia-os/ersilia/issues/473#issuecomment-1313562108

Lehcar commented 1 year ago

xref: #473 (comment)

👋 Dug into this a bit with @GrantBirki. We split on "\\r\\n\\r\\n" or "\r\n\r\n", but it looks like the issue didn't initially have the \r (action run). The current theory is that the web editor adds the \r carriage return when you make edits to the issue body.

I think we may be able to just split on the first \n, but this needs to be tested 😅 I can poke at this later this week.

Lehcar commented 1 year ago

xref: #473 (comment)

👋 Dug into this a bit with @GrantBirki. We split on "\\r\\n\\r\\n" or "\r\n\r\n", but it looks like the issue didn't initially have the \r (action run). The current theory is that the web editor adds the \r carriage return when you make edits to the issue body.

I think we may be able to just split on the first \n, but this needs to be tested 😅 I can poke at this later this week.

Alright, I think I fixed it, but this still needs to be tested in the ersilia repo: https://github.com/ersilia-os/ersilia/pull/474

The issue was that the issue body was being passed as '"### Model Name\nmy model\n"' (it was getting wrapped in single quotes, so the parser, splitting on ###, was returning ["\"", " Model Name\\nmy model\\n"]

D1M1TR10S commented 1 year ago

Hey @GrantBirki and @Lehcar.

Is it safe to say this epic is done and close the issue as complete? If not, what remaining work is there? Thanks 🙂

GrantBirki commented 1 year ago

Yep! I would say so. We have additional items that we want to add for enhancements but the core work here is done