-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #472 from effigies/tox-uv
chore: Update dependencies, transition to tox-uv
- Loading branch information
Showing
6 changed files
with
217 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,18 +49,32 @@ jobs: | |
AFNI_IMSAVE_WARNINGS: NO | ||
AFNI_TTATLAS_DATASET: /opt/afni/atlases | ||
AFNI_PLUGINPATH: /opt/afni/plugins | ||
MARKS: ${{ matrix.marks }} | ||
DEPENDS: ${{ matrix.dependencies }} | ||
strategy: | ||
max-parallel: 6 | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
marks: ["not slow"] | ||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
dependencies: ["latest", "pre"] | ||
marks: ["fast"] | ||
include: | ||
- python-version: "3.9" | ||
marks: "slow and not veryslow" | ||
dependencies: "min" | ||
marks: "fast" | ||
- python-version: "3.9" | ||
dependencies: "latest" | ||
marks: "slow" | ||
- python-version: "3.12" | ||
dependencies: "latest" | ||
marks: "veryslow" | ||
exclude: | ||
- python-version: "3.9" | ||
dependencies: "pre" | ||
- python-version: "3.10" | ||
dependencies: "pre" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: /var/lib/apt | ||
|
@@ -89,11 +103,15 @@ jobs: | |
curl -O https://afni.nimh.nih.gov/pub/dist/bin/misc/@update.afni.binaries && \ | ||
tcsh @update.afni.binaries -package linux_ubuntu_16_64 -bindir ${AFNI_HOME} | ||
fi | ||
ls -l ${AFNI_HOME} | ||
echo "PATH=${AFNI_HOME}:$PATH" | tee -a $GITHUB_ENV | ||
- name: Git settings (pacify DataLad) | ||
run: | | ||
git config --global user.name 'NiPreps Bot' | ||
git config --global user.email '[email protected]' | ||
- name: Install the latest version of uv | ||
uses: astral-sh/setup-uv@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
|
@@ -110,22 +128,14 @@ jobs: | |
~/conda_pkgs_dir | ||
/home/runner/.cache/pip | ||
key: python-${{ matrix.python-version }}-${{ env.CACHE_NUM }} | ||
restore-keys: | | ||
python-${{ matrix.python-version }}-${{ env.CACHE_NUM }} | ||
- name: Install DataLad | ||
run: | | ||
conda install git-annex=*=alldep* pip | ||
pip install datalad datalad-osf | ||
conda install git-annex=*=alldep* | ||
uv tool install datalad --with=datalad-next --with=datalad-osf | ||
uv tool install datalad-osf --with=datalad-next | ||
- name: Install fsl and ANTs | ||
run: | | ||
conda install fsl-fugue fsl-topup ants | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
timeout-minutes: 5 | ||
run: | | ||
pip install .[tests] | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/templateflow | ||
|
@@ -134,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: | ||
|
@@ -198,18 +208,16 @@ jobs: | |
mkdir -p $( dirname $FS_LICENSE ) | ||
echo "b2VzdGViYW5Ac3RhbmZvcmQuZWR1CjMwNzU2CiAqQ1MzYkJ5VXMxdTVNCiBGU2kvUGJsejJxR1V3Cg==" | base64 -d > $FS_LICENSE | ||
- name: Run pytest with coverage | ||
- name: Install tox | ||
run: | | ||
export PATH=${AFNI_HOME}:$PATH | ||
export FSLDIR=${CONDA_PREFIX} | ||
pytest -v --cov sdcflows --cov-report xml:cov.xml --doctest-modules -n auto sdcflows \ | ||
--durations=20 --durations-min=10 -m "$MARKS" | ||
env: | ||
MARKS: ${{ matrix.marks }} | ||
uv tool install tox --with=tox-uv --with=tox-gh-actions | ||
- name: Show tox config | ||
run: tox c | ||
- name: Run tox | ||
run: tox -v --exit-and-dump-after 1200 | ||
|
||
- uses: codecov/codecov-action@v4 | ||
- uses: codecov/codecov-action@v5 | ||
with: | ||
file: cov.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
if: ${{ always() }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.