Skip to content

Commit 45466b1

Browse files
committed
chore(ci): Use uv to install datalad/git-annex
1 parent 9ac9fa9 commit 45466b1

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

.circleci/config.yml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,19 @@ jobs:
1010

1111
steps:
1212
- checkout
13-
- restore_cache:
14-
keys:
15-
- env-v6-{{ .Branch }}-
16-
- env-v6-master-
17-
- env-v6-
13+
- run:
14+
name: Ensure uv is present
15+
command: uv -V || curl -LsSf https://astral.sh/uv/install.sh | sh
1816
- run:
1917
name: Setup git-annex
2018
command: |
21-
sudo apt update && sudo apt-get install apt-transport-https ca-certificates -y && sudo update-ca-certificates
22-
if [[ ! -d /opt/circleci/git-annex.linux ]]; then
23-
cd /tmp
24-
wget https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz
25-
tar xzf git-annex-standalone-amd64.tar.gz -C /opt/circleci/
26-
fi
19+
uv tool install git-annex
2720
git config --global user.name 'NiPy'
2821
git config --global user.email '[email protected]'
2922
- run:
3023
name: Setup DataLad
3124
command: |
32-
python3 -m pip install --no-cache-dir -U pip "setuptools >= 45.0" "setuptools_scm[toml] >= 6.2"
33-
python3 -m pip install --no-cache-dir -U datalad datalad-osf
34-
35-
- save_cache:
36-
key: env-v6-{{ .Branch }}-{{ .BuildNum }}
37-
paths:
38-
- /opt/circleci/git-annex.linux
39-
- /opt/circleci/.pyenv/versions
25+
uv tool install --with-executables-from=datalad-osf,datalad-next datalad
4026
4127
- restore_cache:
4228
keys:
@@ -46,9 +32,6 @@ jobs:
4632
- run:
4733
name: Install test data from GIN
4834
command: |
49-
export PATH=/opt/circleci/git-annex.linux:$PATH
50-
pyenv local 3
51-
eval "$(pyenv init --path)"
5235
mkdir -p /tmp/data
5336
cd /tmp/data
5437
datalad install -r https://gin.g-node.org/oesteban/nitransforms-tests
@@ -99,7 +82,7 @@ jobs:
9982
-t nitransforms:latest \
10083
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
10184
--build-arg VCS_REF=`git rev-parse --short HEAD` \
102-
--build-arg VERSION=$( python3 -m setuptools_scm ) . \
85+
--build-arg VERSION=$( uv run --no-project -w setuptools_scm -m setuptools_scm ) . \
10386
&& e=0 && break || sleep 15
10487
done && [ "$e" -eq "0" ]
10588
docker tag nitransforms:latest localhost:5000/nitransforms
@@ -116,7 +99,7 @@ jobs:
11699
- run:
117100
name: Check version packaged in Docker image
118101
command: |
119-
THISVERSION=${CIRCLE_TAG:-$(python3 -m setuptools_scm)}
102+
THISVERSION=${CIRCLE_TAG:-$( uv run --no-project -w setuptools_scm -m setuptools_scm )}
120103
INSTALLED_VERSION=$(\
121104
docker run -it --rm --entrypoint=python nitransforms \
122105
-c 'import nitransforms as nit; print(nit.__version__, end="")' )

0 commit comments

Comments
 (0)