Skip to content

Migrating your development environment

Carles S. Soriano Pérez edited this page Nov 28, 2024 · 3 revisions

Every once in a while we upgrade Ra2ce's python version. We do this to guarantee the solution's security and maintainability, however it does have an effect in how our development environment is set up. In this page we will try to help contributors to move forward with their developments.

Important! If the following steps do not work for you please make sure to contact with any of the project maintainers so that we can help you migrate your development environment as well as to update this document.

Docker

If you are developing via docker containers then you only need to pull the latest development container from Deltares' Harbor:

docker pull containers.deltares.nl/gfs-dev/ra2ce_dev:latest

This environment already contains the latest python version we support as well as the related required conda dependencies. You can now proceed with the regular poetry installation:

poetry install

Miniforge (Conda)

Most contributors develop in Ra2ce with a conda environment. If this is your case then you will have to follow the next steps:

  1. Remove the current environment, to avoid conflicts or not having the required dependencies (as the requested python version) we suggest to completely remove your environment. Aside from manually deleting the directory where the environment is located, you can do this via command line as follows:
    1. Check your environments: conda env list.
    2. With a prefix: conda env remove -p {path of your environment prefix}.
    3. (Or) With a name: conda env remove -n {name of your environment}.
  2. Ensure your base installation of conda has the latest python packages.
    conda activate base
    conda update -n base python -c conda-forge

    conda update -n base will Update the base environment in your machine with the latest version of python via the -c conda-forge channel.

  3. Install ra2ce development environment in your local checkout.
    cd {your ra2ce checkout dir}
    conda env create -f .config/environment.yml -p .env
  4. Install ra2ce package.
    poetry install
Clone this wiki locally