Skip to content

Commit

Permalink
Try 3.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Nov 21, 2023
1 parent 6fbc653 commit 1cae54e
Show file tree
Hide file tree
Showing 7 changed files with 317 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ orbs:

.dockersetup: &dockersetup
docker:
- image: pennlinc/aslprep_build:0.0.4
- image: pennlinc/aslprep_build:0.0.5
working_directory: /src/aslprep

runinstall: &runinstall
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:
apt_packages:
- graphviz
tools:
python: "3.9"
python: "3.10"

sphinx:
configuration: docs/conf.py
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM pennlinc/aslprep_build:0.0.4
FROM pennlinc/aslprep_build:0.0.5

# Install aslprep
COPY . /src/aslprep
Expand Down
8 changes: 5 additions & 3 deletions aslprep/workflows/asl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ def init_asl_preproc_wf(
"midthickness",
"pial",
"sphere_reg_fsLR",
"thickness",
"midthickness_fsLR",
"cortex_mask",
"anat_ribbon",
# Fieldmap registration
"fmap",
Expand Down Expand Up @@ -487,6 +488,7 @@ def init_asl_preproc_wf(
("std_t1w", "inputnode.target_ref_file"),
("std_mask", "inputnode.target_mask"),
("anat2std_xfm", "inputnode.anat2std_xfm"),
("std_resolution", "inputnode.resolution"),
("fmap_ref", "inputnode.fmap_ref"),
("fmap_coeff", "inputnode.fmap_coeff"),
("fmap_id", "inputnode.fmap_id"),
Expand All @@ -501,7 +503,6 @@ def init_asl_preproc_wf(
("outputnode.motion_xfm", "inputnode.motion_xfm"),
]),
(inputnode, ds_asl_std_wf, [
("std_t1w", "inputnode.ref_file"),
("anat2std_xfm", "inputnode.anat2std_xfm"),
("std_space", "inputnode.space"),
("std_resolution", "inputnode.resolution"),
Expand Down Expand Up @@ -630,8 +631,9 @@ def init_asl_preproc_wf(
("white", "inputnode.white"),
("pial", "inputnode.pial"),
("midthickness", "inputnode.midthickness"),
("thickness", "inputnode.thickness"),
("midthickness_fsLR", "inputnode.midthickness_fsLR"),
("sphere_reg_fsLR", "inputnode.sphere_reg_fsLR"),
("cortex_mask", "inputnode.cortex_mask"),
("anat_ribbon", "inputnode.anat_ribbon"),
]),
(asl_anat_wf, asl_fsLR_resampling_wf, [("outputnode.asl_file", "inputnode.asl_file")]),
Expand Down
17 changes: 16 additions & 1 deletion aslprep/workflows/asl/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
from niworkflows.interfaces.fixes import FixHeaderApplyTransforms as ApplyTransforms
from niworkflows.interfaces.utility import KeySelect
from niworkflows.utils.images import dseg_label
from smriprep.workflows.outputs import _bids_relative

from aslprep import config
from aslprep.interfaces import DerivativesDataSink
from aslprep.utils.spaces import SpatialReferences

# from smriprep.workflows.outputs import _bids_relative # fixed in new release, which reqs 3.10

BASE_INPUT_FIELDS = {
"asl": {
"desc": "preproc",
Expand Down Expand Up @@ -71,6 +72,20 @@
}


def _bids_relative(in_files, bids_root):
from pathlib import Path

if not isinstance(in_files, (list, tuple)):
in_files = [in_files]
ret = []
for file in in_files:
try:
ret.append(str(Path(file).relative_to(bids_root)))
except ValueError:
ret.append(file)
return in_files


def init_asl_fit_reports_wf(
*,
sdc_correction: bool,
Expand Down
Loading

0 comments on commit 1cae54e

Please sign in to comment.