Open miquelduranfrigola opened 10 months ago
Is this lint check better suited for ersilia-maintenance? has any work in this direction been done or could this be an entry-level task @miquelduranfrigola and @DhanshreeA ?
Given that we have plans to simplify the CLI commands, I would definitely not include a lint
command. However, lint functionalities are included (and could be further expanded) in both the test
command as well as the ModelInspector
class (used in ersilia-maintenance).
We can certainly think of more "tests" or "inspections" to do and come up with a good entry-level task. This is a good idea.
Plus to add to @miquelduranfrigola 's point, ersilia pack also has a lint built in for newer model contributions.
Hi @DhanshreeA
Please if this is a good entry level task, open the appropriate issues in ersilia-maintenance
repository or wherever appropriate.
Summary
Often, small errors like a short title in the metadata will cause the model incorporation workflows to fail. It would be good to identify these errors earlier using a lintern.
Ideally, we would have a command like:
Objectives
We can potentially check several things in a model repository, including:
metadata.json
fileDockerfile
model/framework
andmodel/checkpoints
foldersLICENSE
I would start with the
metadata.json
file. Most of the heavy lifting has already been done here: https://github.com/ersilia-os/ersilia/blob/master/ersilia/hub/content/card.pyA potential approach would be:
lintern.py
underhub/content/
Lint
with an arbitrary number of methods, includingmetadata
.Lint
class to check that everything is correct in the--repo_path
folder.Do the test as part of an earlier workflow. These are not mutually exclusive
Documentation