Skip to content

Commit

Permalink
Merge branch 'conda_nii' of github.com:HALFpipe/HALFpipe into conda_nii
Browse files Browse the repository at this point in the history
  • Loading branch information
HippocampusGirl committed Mar 11, 2024
2 parents f9016bb + af0d7c3 commit a397183
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
16 changes: 0 additions & 16 deletions install-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ run_cmd() {
}

conda_packages=()
pip_packages=()

while read -r requirement; do
if [ -z "${requirement}" ]; then
Expand All @@ -81,33 +80,18 @@ while read -r requirement; do
echo "Also checking name variations" "${requirement_variations[@]:1}"
fi

package_manager="none"
for requirement_variation in "${requirement_variations[@]}"; do
if run_cmd "mamba install --dry-run --use-local \"${requirement_variation}\""; then
printf 'Using mamba for package "%s"\n' "${requirement_variation}"
conda_packages+=("${requirement_variation}")
package_manager="mamba"
break
fi
done

if [ "${package_manager}" = "none" ]; then
printf 'Using pip for package "%s"\n' "${requirement}"
pip_packages+=("\"${requirement}\"")
package_manager="pip"
fi

printf '%s\n' --------------------

done < <(grep --no-filename -v '#' "${requirements_files[@]}")

if ! run_cmd mamba install --yes --use-local "${conda_packages[@]}"; then
exit 1
fi
# We assume that all python dependencies have already been resolved by `pip-compile`,
# so there will be no conflicts when we ask `pip` to install them.
if [ ${#pip_packages[@]} -gt 1 ]; then
if ! run_cmd pip install --no-deps "${pip_packages[@]}"; then
exit 1
fi
fi
6 changes: 3 additions & 3 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ setuptools_scm>=6.2
wheel

# Neuroimaging packages
# fmriprep @ git+https://github.com/HippocampusGirl/fmriprep@20.2.7+halfpipe.2
# smriprep @ git+https://github.com/HippocampusGirl/smriprep@0.7.2+halfpipe.2
fmriprep ==20.2.7+halfpipe.2
smriprep ==0.7.2+halfpipe.2
niworkflows >= 1.3.10
# sdcflows @ git+https://github.com/HippocampusGirl/sdcflows@1.3.4+halfpipe.1
sdcflows==1.3.5
nipype >= 1.8.1
nibabel >= 4.0.0
templateflow >= 0.7.1
Expand Down

0 comments on commit a397183

Please sign in to comment.