Skip to content

Submitting using GitHub Command Line

M-7th edited this page Oct 2, 2024 · 6 revisions

New forecast data has to be submitted using pull requests from a forked version of this repository. This will trigger all the validation checks to ensure a successful acquisition of the forecasts. Using the command line requires some technical expertise and some knowledge of the git framework. If you are not confident you shall submit using GitHub Website.

  1. Install the GitHub cli.

  2. Authenticate your user using the GitHub cli:

    gh auth login

    To do so you need first to create a Personal access token (info here) with at least the repo, workflow and admin:org scopes enabled.

  3. Fork and clone the RespiCast-Covid19 repository using the GitHub cli:

    gh repo fork european-modelling-hubs/RespiCast-Covid19 --clone=true

  4. Set default repository to use when querying the GitHub API for local clone to RespiCast-Covid19 using:

    gh repo set-default european-modelling-hubs/RespiCast-Covid19

  5. Be sure your local fork is up to date with the original repo, syncing it:

    git checkout main

    gh repo sync <your_github_handle>/RespiCast-Covid19 -b main

    git pull

  6. Create a new branch for the submission and switch to it:

    git checkout -b <submit_branch>

    (The name of the branch should be new, for example "submit_branch_YYYYMMDD").

  7. Navigate to the model-output folder (where all the forecasts are stored).

    ONLY BEFORE THE FIRST SUBMISSION: Create and name your own forecasts folder in the format <team>-<model> (where and correspond to the team_abbr and model_abbr fields of the metadata file).

  8. Copy your forecasts/changes file to your forecasts folder (the <team>-<model> folder above).

  9. Commit your changes via the standard git commands:

    git add --all

    git commit -m "Commit comment"

  10. Submit a pull request to the main branch of the RespiCast-Covid19 repository. Please use your team name, model name and submission date as the title of the pull request.

    gh pr create

  11. Wait for validation and merge.

FOR SUBSEQUENT SUBMISSIONS REPEAT FROM POINT 5.