Skip to content

Commit 6380a1c

Browse files
authored
Merge branch 'master' into enh/bids-uris
2 parents 064b556 + 83593c0 commit 6380a1c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2444
-765
lines changed

.circleci/artifact_path

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/0/tmp/gh-pages/docs/_build/no_version_html/html/index.html
1+
/0/tmp/gh-pages/docs/_build/no_version_html/html/index.html

.circleci/config.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- checkout:
6161
path: /tmp/src/sdcflows
6262

63-
- run:
63+
- run:
6464
name: Configure git (pacify datalad)
6565
command: |
6666
git config --global user.name "First Last"
@@ -124,6 +124,13 @@ jobs:
124124
datalad update --merge -d brain-extraction-tests/
125125
datalad get -r -J 2 -d brain-extraction-tests
126126
127+
- run:
128+
name: Install HCPh fieldmaps
129+
command: |
130+
datalad install -r https://github.com/nipreps-data/hcph-pilot_fieldmaps.git
131+
datalad update -r --merge -d hcph-pilot_fieldmaps/
132+
datalad get -r -J 2 -d hcph-pilot_fieldmaps/ hcph-pilot_fieldmaps/*
133+
127134
- save_cache:
128135
key: data-v6-{{ .Branch }}-{{ .Revision }}
129136
paths:
@@ -349,8 +356,7 @@ jobs:
349356
flags: unittests
350357

351358
build_docs:
352-
docker:
353-
- image: python:3.8.5
359+
<<: *python_defaults
354360
working_directory: /tmp/gh-pages
355361
environment:
356362
- FSLOUTPUTTYPE: NIFTI
@@ -363,14 +369,14 @@ jobs:
363369
- run:
364370
name: Install Graphviz
365371
command: |
366-
apt-get update -y
367-
apt-get install -y --no-install-recommends graphviz
372+
sudo apt-get update -y
373+
sudo apt-get install -y --no-install-recommends graphviz
368374
- run:
369375
name: Install deps
370376
command: |
371377
python -m venv /tmp/venv
372378
source /tmp/venv/bin/activate
373-
python -m pip install -U pip setuptools_scm
379+
python -m pip install -U pip setuptools setuptools_scm
374380
pip install --no-cache-dir -r docs/requirements.txt
375381
- run:
376382
name: Build only this commit

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Set update schedule for GitHub Actions
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to GitHub Actions every week
10+
interval: "weekly"

.github/workflows/docs-build-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 0
2424

.github/workflows/docs-build-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
ssh-key: "${{ secrets.NIPREPS_DEPLOY }}"
2121
fetch-depth: 0

.github/workflows/pythonpackage.yml

Lines changed: 88 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -18,85 +18,115 @@ permissions:
1818
contents: read
1919

2020
jobs:
21+
job_metadata:
22+
if: github.repository == 'nipreps/sdcflows'
23+
runs-on: ubuntu-latest
24+
outputs:
25+
commit_message: ${{ steps.get_commit_message.outputs.commit_message }}
26+
version: ${{ steps.show_version.outputs.version }}
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
- name: Print head git commit message
33+
id: get_commit_message
34+
run: |
35+
if [[ -z "$COMMIT_MSG" ]]; then
36+
COMMIT_MSG=$(git show -s --format=%s $REF)
37+
fi
38+
echo commit_message=$COMMIT_MSG | tee -a $GITHUB_OUTPUT
39+
env:
40+
COMMIT_MSG: ${{ github.event.head_commit.message }}
41+
REF: ${{ github.event.pull_request.head.sha }}
42+
- name: Detect version
43+
id: show_version
44+
run: |
45+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
46+
VERSION=${GITHUB_REF##*/}
47+
else
48+
pip install setuptools_scm
49+
VERSION=$( python -m setuptools_scm )
50+
fi
51+
echo version=$VERSION | tee -a $GITHUB_OUTPUT
52+
2153
build:
54+
if: github.repository == 'nipreps/sdcflows'
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
fetch-depth: 0
60+
- name: Set up Python 3
61+
uses: actions/setup-python@v4
62+
with:
63+
python-version: 3
64+
- name: Display Python version
65+
run: python -c "import sys; print(sys.version)"
66+
- name: Build niworkflows
67+
run: pipx run build
68+
- name: Check distributions
69+
run: pipx run twine check dist/*
70+
- uses: actions/upload-artifact@v3
71+
with:
72+
name: dist
73+
path: dist/
74+
75+
test:
2276
if: "!startsWith(github.ref, 'refs/tags/') && !contains(github.event.head_commit.message, '[skip ci]')"
77+
needs: [build, job_metadata]
2378
runs-on: ubuntu-latest
2479
strategy:
2580
matrix:
26-
python-version: ["3.8", "3.9", "3.10"]
27-
pip: ["pip==21.2", "pip~=22.0"]
81+
python-version: ["3.8", "3.12"]
82+
install: [repo, sdist, wheel, editable]
83+
84+
env:
85+
INSTALL_TYPE: ${{ matrix.install }}
2886

2987
steps:
30-
- uses: actions/checkout@v3
31-
- name: Fetch all tags (for setuptools_scm to work)
32-
run: |
33-
/usr/bin/git -c protocol.version=2 fetch --tags --prune --unshallow origin
88+
- uses: actions/checkout@v4
89+
if: matrix.install == 'repo' || matrix.install == 'editable'
90+
with:
91+
fetch-depth: 0
3492
- name: Set up Python ${{ matrix.python-version }}
3593
uses: actions/setup-python@v4
3694
with:
3795
python-version: ${{ matrix.python-version }}
38-
- uses: actions/cache@v3
96+
- name: Fetch packages
97+
if: matrix.install == 'sdist' || matrix.install == 'wheel'
98+
uses: actions/download-artifact@v3
3999
with:
40-
path: $HOME/.cache/pip
41-
key: pip-cache-v1
42-
restore-keys: |
43-
pip-cache-
44-
- name: Build in confined environment and interpolate version
100+
name: dist
101+
path: dist/
102+
- name: Select archive
45103
run: |
46-
python -m venv /tmp/buildenv
47-
source /tmp/buildenv/bin/activate
48-
python -m pip install -U build "setuptools >= 45" wheel "setuptools_scm >= 6.2" \
49-
setuptools_scm_git_archive pip twine docutils
50-
51-
python -m build -s -w
52-
python -m twine check dist/sdcflows-*
53-
mv dist /tmp/package
54-
rm -rf sdcflows.egg-info/
55-
# Interpolate version
56-
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
57-
TAG=${GITHUB_REF##*/}
104+
if [ "$INSTALL_TYPE" = "sdist" ]; then
105+
ARCHIVE=$( ls dist/*.tar.gz )
106+
elif [ "$INSTALL_TYPE" = "wheel" ]; then
107+
ARCHIVE=$( ls dist/*.whl )
108+
elif [ "$INSTALL_TYPE" = "repo" ]; then
109+
ARCHIVE="."
110+
elif [ "$INSTALL_TYPE" = "editable" ]; then
111+
ARCHIVE="-e ."
58112
fi
59-
THISVERSION=$( python -m setuptools_scm )
60-
THISVERSION=${TAG:-$THISVERSION}
61-
echo "Expected VERSION: \"${THISVERSION}\""
62-
echo "THISVERSION=${THISVERSION}" >> $GITHUB_ENV
63-
- name: Install in confined environment [pip]
64-
run: |
65-
python -m venv /tmp/pip
66-
source /tmp/pip/bin/activate
67-
python -m pip install -U "setuptools >= 45" "setuptools_scm >= 6.2" "${{ matrix.pip }}"
68-
python -m pip install .
69-
INSTALLED_VERSION=$(python -c 'import sdcflows as sdc; print(sdc.__version__, end="")')
70-
echo "VERSION: \"${THISVERSION}\""
71-
echo "INSTALLED: \"${INSTALLED_VERSION}\""
72-
test "${INSTALLED_VERSION}" = "${THISVERSION}"
73-
- name: Install in confined environment [sdist]
74-
run: |
75-
python -m venv /tmp/install_sdist
76-
source /tmp/install_sdist/bin/activate
77-
python -m pip install -U "setuptools >= 45" "${{ matrix.pip }}"
78-
python -m pip install /tmp/package/sdcflows*.tar.gz
79-
INSTALLED_VERSION=$(python -c 'import sdcflows as sdc; print(sdc.__version__, end="")')
80-
echo "VERSION: \"${THISVERSION}\""
81-
echo "INSTALLED: \"${INSTALLED_VERSION}\""
82-
test "${INSTALLED_VERSION}" = "${THISVERSION}"
83-
- name: Install in confined environment [wheel]
113+
echo "ARCHIVE=$ARCHIVE" | tee -a $GITHUB_ENV
114+
- name: Install package
115+
run: python -m pip install $ARCHIVE
116+
- name: Check version
84117
run: |
85-
python -m venv /tmp/install_wheel
86-
source /tmp/install_wheel/bin/activate
87-
python -m pip install -U "setuptools >= 45" "${{ matrix.pip }}"
88-
python -m pip install /tmp/package/sdcflows*.whl
89-
INSTALLED_VERSION=$(python -c 'import sdcflows as sdc; print(sdc.__version__, end="")')
118+
INSTALLED_VERSION=$(python -c 'import sdcflows; print(sdcflows.__version__, end="")')
90119
echo "INSTALLED: \"${INSTALLED_VERSION}\""
91-
test "${INSTALLED_VERSION}" = "${THISVERSION}"
120+
test "${INSTALLED_VERSION}" = "${VERSION}"
121+
env:
122+
VERSION: ${{ needs.job_metadata.outputs.version }}
92123

93124
flake8:
94125
runs-on: ubuntu-latest
95126
steps:
96-
- uses: actions/checkout@v3
127+
- uses: actions/checkout@v4
97128
- name: Set up Python 3
98129
uses: actions/setup-python@v4
99130
with:
100131
python-version: 3
101-
- run: pip install flake8
102-
- run: flake8 sdcflows/
132+
- run: pipx run flake8 sdcflows/

.github/workflows/unittests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
strategy:
3636
max-parallel: 5
3737
matrix:
38-
python-version: ["3.8", "3.9", "3.10"]
38+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3939
deps: ["requirements"]
4040
include:
4141
- python-version: "3.8"
@@ -89,7 +89,7 @@ jobs:
8989
git config --global user.name 'NiPreps Bot'
9090
git config --global user.email '[email protected]'
9191
- name: Set up Python ${{ matrix.python-version }}
92-
uses: conda-incubator/setup-miniconda@v2
92+
uses: conda-incubator/setup-miniconda@v3
9393
with:
9494
auto-update-conda: true
9595
auto-activate-base: true
@@ -108,12 +108,12 @@ jobs:
108108
python-${{ matrix.python-version }}-${{ env.CACHE_NUM }}
109109
- name: Install DataLad
110110
run: |
111-
conda install git-annex datalad pip
112-
pip install datalad-osf
111+
conda install git-annex=*=alldep* pip
112+
pip install datalad datalad-osf
113113
- name: Install fsl
114114
run: |
115115
conda install fsl-fugue fsl-topup
116-
- uses: actions/checkout@v3
116+
- uses: actions/checkout@v4
117117
- name: Install dependencies
118118
timeout-minutes: 5
119119
run: |

.maint/MAINTAINERS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ If you are participating because of your affiliation with another organization (
1212
| Esteban | Oscar | @oesteban | 0000-0001-8435-6191 | Lausanne University Hospital and University of Lausanne, Lausanne, Switzerland |
1313
| Goncalves | Mathias | @mgxd | 0000-0002-7252-7771 | Department of Psychology, Stanford University, CA, USA |
1414
| Markiewicz | Christopher J. | @effigies | 0000-0002-6533-164X | Department of Psychology, Stanford University, CA, USA |
15-

.maint/PIs.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ If you are participating because of your affiliation with another organization (
1414
| Poldrack | Russell A. | @poldrack | 0000-0001-6755-0259 | Department of Psychology, Stanford University, CA, USA |
1515
| Satterthwaite | Theodore D. | | 0000-0001-7072-9399 | Perelman School of Medicine, University of Pennsylvania, PA, USA |
1616
| Gorgolewski | Krzysztof J. | @chrisgorgo | 0000-0003-3321-7583 | Google LLC |
17-

.pre-commit-config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
exclude: ".*/data/.*"
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.4.0
5+
hooks:
6+
- id: check-added-large-files
7+
- id: check-docstring-first
8+
- id: check-merge-conflict
9+
- id: check-json
10+
- id: check-toml
11+
- id: check-yaml
12+
- id: debug-statements
13+
- id: end-of-file-fixer
14+
- id: fix-byte-order-marker
15+
- id: trailing-whitespace
16+
# Enable when no significant PRs are in progress
17+
# - repo: https://github.com/psf/black
18+
# rev: 23.1.0
19+
# hooks:
20+
# - id: black
21+
# - repo: https://github.com/pycqa/isort
22+
# rev: 5.12.0
23+
# hooks:
24+
# - id: isort

0 commit comments

Comments
 (0)