Skip to content

Commit

Permalink
Merge pull request nipreps#1200 from nipreps/fix/sloppy-last-merges
Browse files Browse the repository at this point in the history
FIX: Revise the last two sloppy merges
  • Loading branch information
oesteban authored Mar 19, 2024
2 parents e57973e + 1d993d8 commit a833602
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mriqc/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,14 @@ def parse_args(args=None, namespace=None):
# Force initialization of the BIDSLayout
config.execution.init()

participant_labels = [
participant_label = [
d.name[4:] for d in config.execution.bids_dir.glob("sub-*")
if d.is_dir() and d.exists()
]

if config.execution.participant_label is not None:
selected_label = set(config.execution.participant_label)
if (missing_subjects := selected_label - set(participant_labels)):
if (missing_subjects := selected_label - set(participant_label)):
parser.error(
"One or more participant labels were not found in the BIDS directory: "
f"{', '.join(missing_subjects)}."
Expand Down
2 changes: 1 addition & 1 deletion mriqc/data/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class GroupTemplate:
def __init__(self):
import jinja2

self.template_str = Loader(__package__)("data/reports/group.html")
self.template_str = Loader("mriqc")("data/reports/group.html")
self.env = jinja2.Environment(
loader=jinja2.FileSystemLoader(searchpath="/"),
trim_blocks=True,
Expand Down
2 changes: 1 addition & 1 deletion mriqc/interfaces/common/ensure_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
OUT_MASK_NAME = "{prefix}_resmask{ext}"
REF_FILE_NAME = "resample_ref.nii.gz"
REF_MASK_NAME = "mask_ref.nii.gz"
load_data = Loader(__package__)
load_data = Loader("mriqc")


class EnsureSizeInputSpec(BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion mriqc/reports/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def gen_html(csv_file, mod, csv_failed=None, out_file=None):
else:
from io import BytesIO as TextIO

load_data = Loader(__package__)
load_data = Loader("mriqc")

QCGROUPS = {
"T1w": [
Expand Down
2 changes: 1 addition & 1 deletion mriqc/reports/individual.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from nireports.assembler.report import Report
from niworkflows.data import Loader

_load_data = Loader(__package__)
_load_data = Loader("mriqc")


def generate_reports():
Expand Down
2 changes: 1 addition & 1 deletion mriqc/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

from niworkflows.data import Loader

_load_data = Loader(__package__)
_load_data = Loader("mriqc")


@contextmanager
Expand Down

0 comments on commit a833602

Please sign in to comment.