Note: it does not implement a tree but instead relies on the keys of files which are the full path of the file relative to the root of the repo to describe the tree structure.
An example Code object might look like:
{
"name":"Example Model Code",
"description":"Example of a Python-based code object for a model",
"files":{
"README.md":{
"language":"markdown"
},
"src/model.py":{
"language":"python",
"dynamics":{
"name":"Main Dynamics",
"description":"Dynamics section for the ODE.",
"block":"L205-L213"
}
}
},
"repo_url":"https://github.com/user/repo.git",
"commit":"abcd1234",
"branch":"main",
"metadata":{
}
}
The HMI can obtain the tree by grabbing the keys of files:
README.md
src/model.py
This implies that README.md is at the top level of the repo whereas model.py is in the src directory.
This PR addresses #327
An example
Code
object might look like:The HMI can obtain the
tree
by grabbing thekeys
offiles
:This implies that
README.md
is at the top level of the repo whereasmodel.py
is in thesrc
directory.