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
224 stars 148 forks source link

[Spike] Explore options for the new model submission flow #288

Closed D1M1TR10S closed 1 year ago

GrantBirki commented 2 years ago

Model Submission Flow: Issues + GitHub Actions

This is a purposed solution for this spike to allow all users (internal or external to @ersilia-os) to be able submit new models with ease.

Goal ⭐

@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.

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
miquelduranfrigola commented 2 years ago

Hi @GrantBirki I think this is fantastic. I need to be 100% sure I have you covered on the eos-template side of things. What is the best way for ersilia to offer "support" for template repository setup?

GrantBirki commented 2 years ago

@miquelduranfrigola I think as far as the template goes, it will really just be a "fill in the blanks" situation. We make the issue template have fields which will populate the main README.md of the repo we create with the "template repo".

For example, the area's in red will be filled in using the data provided in the issue template. image

If a section is left blank in the issue template, then it will also be left blank when the new model repo is created from the repo template

GrantBirki commented 2 years ago

I think there should just be a really good "contract" between the issue template and the repo template. If we are asking user's to fill out a question in the "issue" then that data should correspond to a section in the README of the template repo we create for them.

GrantBirki commented 2 years ago

I found an Action's workflow have been testing it out in my sandbox which will parse and issue template response. This will allow us to funnel that JSON output into a subsequent Action step that we can use to populate our template repository which we will create in the same Actions workflow.

I found a potential bug in the 3rd party Action and opened an issue which is linked above this comment

miquelduranfrigola commented 2 years ago

Hi @GrantBirki - all of this is great. I really like the idea of linking the form to the README.

I am now writing a script to generate model identifiers randomly, so users do not have to decide by themselves.

miquelduranfrigola commented 2 years ago

Hi @GrantBirki! The following script generates eos identifiers: python .github/scripts/generate_eos_identifier.py I hope this is helpful!

GrantBirki commented 2 years ago

@miquelduranfrigola I am just now seeing your comment about the eos id script. I'll make sure that this gets baked into our workflows at some point, thanks! ⭐

GrantBirki commented 1 year ago

We explored the options, and we built the thing! Closing 🎉