Skip to content

Commit 1f16768

Browse files
authored
Merge pull request #466 from effigies/chore/baipp-upgrade
chore: Unpin build-and-inspect-python-package
2 parents cd73249 + af41241 commit 1f16768

File tree

9 files changed

+15
-18
lines changed

9 files changed

+15
-18
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# 2025-02-18 - [email protected] - sty: ruff format [ignore-rev]
2+
78f2667f5801fa96cecbfd0aafcddc5723b1d096
13
# 2024-07-19 - [email protected] - chore(ruff): ruff check --fix && ruff format [git-blame-ignore-rev]
24
6333f4735f341e556113325c7bc9d0f2e284e418
35
# 2024-03-07 - [email protected] - STY: ruff format smriprep [git-blame-ignore-rev]

.github/workflows/build_test_deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,15 @@ jobs:
4646
with:
4747
fetch-depth: 0
4848
persist-credentials: false
49-
# Note that we cannot upgrade this past 2.9 until uv build resolves a bug
50-
# or build-and-inspect-python-package lets us select build as a backend
49+
# Note that we may need to revert to 2.9 if bugs are found in `uv build`,
50+
# unless build-and-inspect-python-package lets us select build as a backend
5151
#
5252
# https://github.com/astral-sh/uv/issues/5450
5353
# or https://github.com/hynek/build-and-inspect-python-package/issues/155
5454
#
55-
# When we do move on, we should leave a comment to fall back in case of future uv build bugs
56-
- uses: hynek/[email protected]
55+
# If 2.9 is required, then we will need to pin to hatchling 1.26.x to avoid
56+
# incompatibilities with twine and the package metadata emitted by hatchiling.
57+
- uses: hynek/build-and-inspect-python-package@v2
5758
with:
5859
upload-name-suffix: -main
5960
attest-build-provenance-github: ${{ github.event_name != 'pull_request' }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ docker:
1818

1919

2020
.git-blame-ignore-revs:
21-
git log --grep "\[git-blame-ignore-rev\]" --pretty=format:"# %ad - %ae - %s%n%H" --date short \
21+
git log --grep "ignore-rev\]" --pretty=format:"# %ad - %ae - %s%n%H" --date short \
2222
> .git-blame-ignore-revs
2323
echo >> .git-blame-ignore-revs

pyproject.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
[build-system]
2-
# Pin hatchling 1.26 to keep metadata 2.3
3-
# The hynek/build-and-inspect-python-package action is pinned at 2.8,
4-
# which in turn pins a twine that rejects 2.4.
5-
# Until uv build fixes a problem with its tar library, we're stuck here.
6-
# https://github.com/hynek/build-and-inspect-python-package/issues/155
7-
# https://github.com/astral-sh/uv/issues/5450
8-
requires = ["hatchling~=1.26.3", "hatch-vcs"]
2+
requires = ["hatchling", "hatch-vcs"]
93
build-backend = "hatchling.build"
104

115
[project]

src/smriprep/interfaces/templateflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ def fetch_template_files(
205205
if specs.get('resolution') and not set(specs['resolution']) & set(available_resolutions):
206206
fallback_res = available_resolutions[0] if available_resolutions else None
207207
LOGGER.warning(
208-
f"Template {name[0]} does not have resolution(s): {specs['resolution']}."
209-
f"Falling back to resolution: {fallback_res}."
208+
f'Template {name[0]} does not have resolution(s): {specs["resolution"]}.'
209+
f'Falling back to resolution: {fallback_res}.'
210210
)
211211
specs['resolution'] = fallback_res
212212

src/smriprep/utils/bids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def write_derivative_description(bids_dir, deriv_dir):
143143
if 'SMRIPREP_DOCKER_TAG' in os.environ:
144144
desc['GeneratedBy'][0]['Container'] = {
145145
'Type': 'docker',
146-
'Tag': f"poldracklab/smriprep:{os.environ['SMRIPREP_DOCKER_TAG']}",
146+
'Tag': f'poldracklab/smriprep:{os.environ["SMRIPREP_DOCKER_TAG"]}',
147147
}
148148
if 'SMRIPREP_SINGULARITY_URL' in os.environ:
149149
desc['GeneratedBy'][0]['Container'] = {

src/smriprep/workflows/anatomical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def init_anat_fit_wf(
773773
LOGGER.info('ANAT Stage 1: Adding template workflow')
774774
ants_ver = ANTsInfo.version() or '(version unknown)'
775775
desc += f"""\
776-
{"Each" if num_t1w > 1 else "The"} T1w image was corrected for intensity
776+
{'Each' if num_t1w > 1 else 'The'} T1w image was corrected for intensity
777777
non-uniformity (INU) with `N4BiasFieldCorrection` [@n4], distributed with ANTs {ants_ver}
778778
[@ants, RRID:SCR_004757]"""
779779
desc += '.\n' if num_t1w > 1 else ', and used as T1w-reference throughout the workflow.\n'

src/smriprep/workflows/outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ def _combine_cohort(in_template):
13251325
template = in_template.split(':')[0]
13261326
if 'cohort-' not in in_template:
13271327
return template
1328-
return f"{template}+{in_template.split('cohort-')[-1].split(':')[0]}"
1328+
return f'{template}+{in_template.split("cohort-")[-1].split(":")[0]}'
13291329
return [_combine_cohort(v) for v in in_template]
13301330

13311331

src/smriprep/workflows/surfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ def _get_surfaces(subjects_dir: str, subject_id: str, surfaces: list[str]) -> tu
16841684

16851685
surf_dir = Path(subjects_dir) / subject_id / 'surf'
16861686
all_surfs = {
1687-
surface: sorted(str(fn) for fn in surf_dir.glob(f"[lr]h.{surface.replace('_', '.')}"))
1687+
surface: sorted(str(fn) for fn in surf_dir.glob(f'[lr]h.{surface.replace("_", ".")}'))
16881688
for surface in expanded_surfaces
16891689
}
16901690

0 commit comments

Comments
 (0)