Tips for Developers (2): Test branch - PCMDI/pcmdi_metrics GitHub Wiki

Test development branch before merging its pull request (PR) to main

  • Get the local repository ready:

    Clone the PMP repo to the local, or update the existing local repo to keep it up-to-date using git pull.

  • Switch to the working branch

    git checkout [WORKING BRANCH NAME]

    e.g., git checkout pmp_devel_1234

  • Create a conda development env for use in local development:

    conda env create -f conda-env/dev.yml [MY_ENV_NAME]

    e.g., conda env create -f conda-env/dev.yml -n my_pmp_conda_env

  • Activate the local development conda env:

    conda activate pcmdi_metrics_dev (if env name was not given above) or conda activate my_pmp_conda_env

  • Install from the source code in the working branch:

    pip install . or python setup.py install (at pcmdi_metrics directory)

Recommendation

  • It is recommended to run relevant demo notebook to the branch to make sure the change is not breaking the processes in the demo notebook.