pros-cli icon indicating copy to clipboard operation
pros-cli copied to clipboard

Refactor branchline template depo

Open ayushuk opened this issue 1 year ago • 0 comments

In an effort to organize templates on branchline, the repo will follow a new organization of template information. Currently the the pros-mainline contains a single JSON file with template information including name, zip location, version, supported kernel version and more:

{
"metadata": {
"location": "https://pros.cs.purdue.edu/v5/_static/releases/[email protected]"
},
"name": "kernel",
"py/object": "pros.conductor.templates.base_template.BaseTemplate",
"supported_kernels": null,
"target": "v5",
"version": "3.5.2"
},

This information is all the CLI needs to locate and download the zip file of the template. Branchline requires more information about a template such as author, README for description and additional features such as tags to better identify templates. To handle scalability of the branchline repo each template will have its own JSON file for different versions of the template. This means that the main JSON file listing all the different templates only has basic information:

{
"metadata": {
"location": "link to a secondary json (below)"
},
"name": "template name",
"py/object": "some new python class",
"target": "v5",
"tags": "python list for vsc"
},

It will link to a child (secondary) JSON file which has more version specific information including a link to the zip file of the template:

{
"metadata": {
"location": "actual zip link"
},
"name": "template name",
"py/object": "some new python object",
"supported_kernels": '["3.5.1", "3.5.2"]',
"version": "3.5.2",
"author": "sigbots",
"organization" : "sigbots",
"readme" : "link to markdown file, belongs to author of template"
},

Note that on release of branchine both kernel and okapilib will be primarily accessed from the branchline depo so they will be refactored into this format.

Refer to the branchline design doc for more information.

ayushuk avatar Mar 01 '23 03:03 ayushuk