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

📑 Feature Request: Pre-commit hooks for sanity checking #598

Closed DhanshreeA closed 1 year ago

DhanshreeA commented 1 year ago

Is your feature request related to a problem? Please describe.

For a successful contribution in the Ersilia model hub, there are a couple of routine tasks that the contributor has to perform. For example,

Describe the solution you'd like.

We can use pre-commit hooks in model repositories such that automated checks are made even before a contributor is able to commit code on their local fork. These git hooks can help us with a lot of things, but primarily we can prevent

We can potentially even prettify and enforce code quality if needed, however for now I think this could help us resolve problems we encounter during PRs even before they are made.

Describe alternatives you've considered

No response

Additional context.

No response

GemmaTuron commented 1 year ago

Hi @DhanshreeA !

I've never done pre-commit hooks, do you know how to? The main issue I foresee is that we want to test that the metadata is fine and that the model is working, and all this is impossible to do in the fork I'm afraid, it needs to be run from the Ersilia organisation repositories, hence at PR time.

GemmaTuron commented 1 year ago

Follow up on this:

DhanshreeA commented 1 year ago

Hi @GemmaTuron first of all apologies for abandoning this issue. I'll create a quick POC to see if we can use this and share it here, otherwise we can let this go for now. I'll update here by the end of the week.