Skip to content

Submitting using GitHub Command line

Paolo Milano edited this page Nov 22, 2023 · 15 revisions

it

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 should submit using GitHub Website.

On your first Submission

  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. You might be asked by the GitHub cli to authenticate again after some time.

  3. Fork and clone the Influcast repository using the GitHub cli:

    gh repo fork Predizioni-Epidemiologiche-Italia/Influcast --clone=true
  4. Set the default remote repository to use when querying the GitHub API for the locally cloned repository to Influcast:

    gh repo set-default Predizioni-Epidemiologiche-Italia/Influcast

For every weekly Submission

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

    git checkout main
    gh repo sync <your_github_handle>/Influcast -b main
    git pull
  2. 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").

  3. Copy your forecasts file to your forecasts folder: previsioni/<team>-<model>/.

  4. Commit your changes via the standard git commands:

    git add --all
    git commit -m "Commit comment"
  5. Submit a pull request to the main branch of the Influcast repository. Please use your team name, model name, and submission date as the title of the pull request:

    gh pr create --title "<team>-<model>-YYYYMMDD" --body "Weekly submission"
  6. Wait for validation and merge.