From 9eb9cd6b216b63bd49797ed38c02059939242152 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Wed, 18 Dec 2024 10:26:54 -0500 Subject: [PATCH] chore(ci): Run cache_templateflow with a script runner --- .github/workflows/build-test-publish.yml | 2 +- tools/cache_templateflow.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index 8b410bbdad..b77ac0196e 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -144,7 +144,7 @@ jobs: tf-cache- - name: Get TemplateFlow's required objects run: | - python tools/cache_templateflow.py + uv run tools/cache_templateflow.py - uses: actions/cache@v4 with: diff --git a/tools/cache_templateflow.py b/tools/cache_templateflow.py index 4397b2e3e9..814b56169d 100644 --- a/tools/cache_templateflow.py +++ b/tools/cache_templateflow.py @@ -1,4 +1,10 @@ #!/usr/bin/env python3 +# /// script +# requires-python = ">=3.9" +# dependencies = [ +# "templateflow", +# ] +# /// from templateflow import api as tfapi tfapi.get("MNI152NLin2009cAsym", resolution=2, desc="brain", suffix="mask")