diff --git a/.github/workflows/conda-installation.yml b/.github/workflows/conda-installation.yml index 132af25..d8becbc 100644 --- a/.github/workflows/conda-installation.yml +++ b/.github/workflows/conda-installation.yml @@ -17,7 +17,7 @@ jobs: with: auto-update-conda: true environment-file: environment.yml - activate-environment: test-install + activate-environment: working-env python-version: ${{ matrix.python-version }} # Create virtual env under each python version diff --git a/.github/workflows/pip-installation.yml b/.github/workflows/pip-installation.yml index 47530d9..50c97b9 100644 --- a/.github/workflows/pip-installation.yml +++ b/.github/workflows/pip-installation.yml @@ -21,8 +21,8 @@ jobs: # it insures installation instruction provided in README are working - name: Install dependencies run: | - python -m venv test-env --clear - source test-env/bin/activate + python -m venv working-env --clear + source working-env/bin/activate python -m pip install --upgrade pip python -m pip install -e . # - name: Test with pytest diff --git a/README.md b/README.md index 779f271..e0c44ab 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,19 @@ The scripts `convert_dicoms_to_niftis.py` and `create_previews.py` enable to con ## Install -It is advised to install the project in [a virtual environment](https://docs.python.org/3/tutorial/venv.html). - +It is advised to install the project in python virtual environment relying either on [venv](https://docs.python.org/3/tutorial/venv.html) or preferably [(mini)conda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) +### Installation with pip [Install python with pip](https://www.python.org/downloads/) ; then use `pip install .` to install python dependencies. Optionally, rename the `.env.example` to `.env` and set the variables (`shanoir_password`, `gpg_recipient`) to your needs. *See the "Installing DicomAnonymizer" section if you want to use DicomAnonymizer for the dicom anonymization instead of PyDicom.* +### Installation with conda +> [!IMPORTANT] +> This installation is required if shanoir2bids.py is used + +After installing a (mini)conda distribution type in a terminal `conda create -f environment.yml` then activate the environment using `conda activate working-env` where `working-env` is the default name of the created environment ## Usage There are three scripts to download datasets: diff --git a/environment.yml b/environment.yml index 2465de7..7a0d5fd 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: test-install +name: working-env channels: - conda-forge - defaults