Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Easier pyenv usage #342

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 12 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _machine_defaults: &machine_defaults

_python_defaults: &python_defaults
docker:
- image: cimg/python:3.10.9
- image: cimg/python:3.12.1
auth:
username: $DOCKER_USER
password: $DOCKER_PAT
Expand Down Expand Up @@ -105,10 +105,7 @@ jobs:
name: Build Docker image
no_output_timeout: 60m
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
# Get version, update files.
pyenv local 3
python -m pip install -U pip hatch
THISVERSION=$( python -m hatch version )
if [[ ${THISVERSION:0:1} == "0" ]] ; then
Expand All @@ -131,10 +128,6 @@ jobs:
- run:
name: Check Docker image
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
# Get version, update files.
python -m pip install -U pip hatch
THISVERSION=$( python -m hatch version )
BUILT_VERSION=$( docker run --rm nipreps/nibabies:dev --version )
Expand Down Expand Up @@ -168,7 +161,7 @@ jobs:

get_data:
docker:
- image: cimg/python:3.10.9
- image: cimg/python:3.12.1
working_directory: /home/circleci/data
steps:
- restore_cache:
Expand Down Expand Up @@ -259,33 +252,25 @@ jobs:
- run:
name: Build nibabies-wrapper wheel
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
pyenv local 3
python --version
pip install --upgrade pip build
python -m build wrapper/
- run:
name: Test nibabies-wrapper (Python 2)
name: Test nibabies-wrapper (Python 3)
command: |
export PY2=$(pyenv versions | grep '2\.' |
sed -e 's/.* 2\./2./' -e 's/ .*//')
pyenv local $PY2
echo -n "Python version: "
python --version
pip install --upgrade "pip<21"
pip install --upgrade pip
pip install wrapper/dist/*.whl
which nibabies-wrapper
nibabies-wrapper --help
nibabies-wrapper --version
- run:
name: Test nibabies-wrapper (Python 3)
name: Test nibabies-wrapper (Python 2)
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
echo -n "Python version: "
pyenv local 2.7
python --version
pip install --upgrade pip
pip install --upgrade "pip<21"
pip install wrapper/dist/*.whl
which nibabies-wrapper
nibabies-wrapper --help
Expand Down Expand Up @@ -329,9 +314,8 @@ jobs:
- run:
name: Setting up test
command: |
export PY3=$(pyenv versions | grep '3\.' |
sed -e 's/.* 3\./3./' -e 's/ .*//')
pyenv local $PY3
pyenv local 3
python --version
mkdir -p /tmp/${DATASET}/derivatives
pip install --upgrade pip
pip install --upgrade wrapper/
Expand Down
Loading