Skip to content

Commit

Permalink
still fixing lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tientong98 committed Jan 17, 2025
1 parent 8f1b3c4 commit 4aacea4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions cubids/cubids.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def apply_tsv_changes(self, summary_tsv, files_tsv, new_prefix, raise_on_error=T
# remove renames file that gets created under the hood
subprocess.run(["rm", "-rf", "renames"])

def change_filename(self, filepath, entities, is_longitudinal=False):
def change_filename(self, filepath, entities):
"""Apply changes to a filename based on the renamed entity sets.
This function takes into account the new entity set names
Expand All @@ -468,8 +468,6 @@ def change_filename(self, filepath, entities, is_longitudinal=False):
Path prefix to a file in the affected entity set change.
entities : :obj:`dict`
A pybids dictionary of entities parsed from the new entity set name.
is_longitudinal : :obj:`bool`, optional
If True, includes "ses" in filepath. Default is False.
Notes
-----
Expand All @@ -479,7 +477,6 @@ def change_filename(self, filepath, entities, is_longitudinal=False):
filepath=filepath,
entities=entities,
out_dir=str(self.path),
is_longitudinal=self.is_longitudinal,
)

exts = Path(filepath).suffixes
Expand Down
8 changes: 4 additions & 4 deletions cubids/tests/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,28 +239,28 @@ def summary_data():
@pytest.mark.parametrize(
("name", "skeleton", "intended_for", "is_longitudinal", "expected"),
[
( # doesn't have acq-VAR
(
"relpath_long",
relpath_intendedfor_long,
"ses-01/dwi/sub-01_ses-01_acq-VAR_dir-AP_run-01_dwi.nii.gz",
True,
"pass",
),
( # doesn't have ses-01
(
"bidsuri_long",
bidsuri_intendedfor_long,
"bids::sub-01/ses-01/dwi/sub-01_ses-01_acq-VAR_dir-AP_run-01_dwi.nii.gz",
True,
"pass",
),
( # doesn't have acq-VAR
(
"relpath_cs",
relpath_intendedfor_cs,
"dwi/sub-01_acq-VAR_dir-AP_run-01_dwi.nii.gz",
False,
"pass",
),
( # pass
(
"bidsuri_cs",
bidsuri_intendedfor_cs,
"bids::sub-01/dwi/sub-01_acq-VAR_dir-AP_run-01_dwi.nii.gz",
Expand Down

0 comments on commit 4aacea4

Please sign in to comment.