COVID Policy Modelling Model Connector How-To: Create repository
In this section, you will create a repository to begin development. After completion, you should have all the initial files needed to carry on with further steps.
Contents
Assumptions
The main body of these instructions assume the following:
- The connector will be developed in a separate source repository to the model
- The connector will be hosted on GitHub, and use GitHub Actions and GitHub Packages Container Registry
- The connector will be developed publicly
- The connector will use the common input and output schema shared with other models
The instructions also contain additional notes to support any of the following:
- The connector will be developed privately
- The connector will use a custom schema
- The connector will use a different shared schema
Creating your repository
-
In your browser, visit the model-connector-template repository.
-
Click on “Use this template”.
- Fill out the repository details:
- For “Owner”, select an appropriate organisation, or your username.
- For “Repository name”, we recommend “<MODEL>-connector”.
- Select “Public”.
- If your connector will be developed privately, refer to the notes below.
-
Click on “Create repository from template”.
-
In your terminal, clone your repository with the following command:
$ git clone https://github.com/<USERNAME>/<MODEL>-connector.git
-
You will be prompted for a password, which is the Personal Access Token created as part of setting up your GitHub account. Enter it now.
-
Change directory into your repository:
$ cd <MODEL>-connector
-
Obtain a copy of the latest version of the input and output JSON schemas:
$ curl https://raw.githubusercontent.com/covid-policy-modelling/schemas/main/schema/input-common.json -o input-schema.json $ curl https://raw.githubusercontent.com/covid-policy-modelling/schemas/main/schema/output-common.json -o output-schema.json
- If your connector does not use the common schema, refer to the notes below:
Next steps
Follow the steps for building your connector.
Additional steps for alternative approaches
The connector will be developed privately
Select “Private” instead of “Public”. All other settings should remain the same.
The connector will use a custom schema
You will first need to define and build a schema using the schema documentation. You can then copy the generated schema files into your connector repository. We recommend not publishing your schema until you have completed testing your connector. You will need to publish it however before you connector can be deployed.
The connector will use a different shared schema
Instead of the common input and output schema, you should download the appropriate files for your chosen schema.