Skip to content

Commit

Permalink
[DATALAD RUNCMD] isort the gitrepo we modified
Browse files Browse the repository at this point in the history
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "python3 -m isort -m3 --fgw 2 --tc {outputs}",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [
  "heudiconv/bids/*py",
  "heudiconv/bids/tests/*py"
 ],
 "pwd": "."
}
^^^ Do not change lines above ^^^
  • Loading branch information
yarikoptic committed Mar 29, 2022
1 parent 08390bd commit de6087c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 47 deletions.
6 changes: 3 additions & 3 deletions heudiconv/bids/schema.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from pathlib import Path
import logging
import re
from pathlib import Path

import yaml

from heudiconv.utils import remove_prefix

import logging

lgr = logging.getLogger(__name__)


Expand Down
54 changes: 26 additions & 28 deletions heudiconv/bids/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
"""Test functions of heudiconv.bids.utils module.
"""

import re
import os
import os.path as op
from pathlib import Path
from random import (random,
choice,
seed
)
from datetime import (datetime,
timedelta,
)
from collections import (OrderedDict,
)
import re
import string
from collections import OrderedDict
from datetime import (
datetime,
timedelta,
)
from glob import glob
from pathlib import Path
from random import (
choice,
random,
seed,
)

import nibabel
import string
import pytest
from numpy import testing as np_testing

from heudiconv.tests.utils import TESTS_DATA_PATH
from heudiconv.utils import (
load_json,
save_json,
create_tree,
load_json,
remove_suffix,
save_json,
)

from .. import (
maybe_na,
treat_age,
find_fmap_groups,
populate_intended_for,
get_shim_setting,
get_key_info_for_fmap_assignment,
find_compatible_fmaps_for_run,
find_compatible_fmaps_for_session,
select_fmap_from_compatible_groups,
SHIM_KEY,
AllowedCriteriaForFmapAssignment,
KeyInfoForForce,
find_compatible_fmaps_for_run,
find_compatible_fmaps_for_session,
find_fmap_groups,
get_key_info_for_fmap_assignment,
get_shim_setting,
maybe_na,
populate_intended_for,
select_fmap_from_compatible_groups,
treat_age,
)

from heudiconv.tests.utils import (
TESTS_DATA_PATH,
)

import pytest

def gen_rand_label(label_size, label_seed, seed_stdout=True):
seed(label_seed)
Expand Down
30 changes: 14 additions & 16 deletions heudiconv/bids/utils.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
"""Handle BIDS specific operations"""

import csv
import errno
import hashlib
import logging
import os
import os.path as op
import logging
import numpy as np
import re
from collections import OrderedDict
from datetime import datetime
import csv
from random import sample
from glob import glob
import errno
from random import sample

from ..external.pydicom import dcm
import numpy as np

from .. import __version__
from ..external.pydicom import dcm
from ..parser import find_files
from ..utils import (
load_json,
save_json,
create_file_if_missing,
json_dumps,
update_json,
set_readonly,
is_readonly,
get_datetime,
remove_suffix,
is_readonly,
json_dumps,
load_json,
remove_prefix,
remove_suffix,
save_json,
set_readonly,
update_json,
)
from .. import __version__

from .schema import BIDSFile


lgr = logging.getLogger(__name__)

# Fields to be populated in _scans files. Order matters
Expand Down

0 comments on commit de6087c

Please sign in to comment.