Skip to content

Developer installation

If you plan to contribute to ClinicaDL, we suggest you create a fork of ClinicaDL repo.

Then clone your fork from GitHub:

git clone https://github.com/<your_name>/clinicadl.git

Change to ClinicaDL directory:

cd clinicadl

We suggest creating a custom Conda environment for your fork, so you can test your modifications, and install all the dependencies inside your environment using poetry:

conda env create -f environment.yml --name clinicadl_dev
conda activate clinicadl_dev
poetry install

If everything goes well, type clinicadl -h and you should see the help message of ClinicaDL.

At the end of your session, you can deactivate your Conda environment:

conda deactivate

Suggest modifications

Please suggest modifications based on the last version of the dev branch of the original repo. The first time, add the remote URL upstream by running the following command in your fork's repository:

git remote add upstream https://github.com/aramis-lab/clinicadl.git

You can check which remote URLs are linked to your repository with the following command:

git remote -v

To create a new branch up-to-date, you will need to fetch and pull the modifications from the original repo:

git checkout dev
git fetch upstream
git pull upstream dev
You can now create a new branch from your up-to-date dev branch:
git checkout -b <branch_name>

You can open a pull request as soon as you want on the original repo, to inform / ask advice from the admins. If you did not run any tests (see next section), you can first open a draft pull request to avoid running the continuous integration on your code.

Add documentation

Documentation of ClinicaDL is deployed by readthedocs. Source files are available in the docs folder of the repo.

To build the documentation locally, please install the specific requirements:

pip install -r docs/requirements.txt

Once it is done you can run mkdocs serve at the root of the repo and copy-paste the URL in your terminal in a web browser to browse the documentation.