Skip to content

Commit

Permalink
[BF]: fix pip and conda installation syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpron committed Jul 18, 2024
1 parent 736e320 commit f9a438a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conda-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pip-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-install
name: working-env
channels:
- conda-forge
- defaults
Expand Down

0 comments on commit f9a438a

Please sign in to comment.