From 2233bdf1a182eadf9a9f82d9a577de77349de755 Mon Sep 17 00:00:00 2001 From: Dawn Smith Date: Tue, 27 Jan 2026 16:01:25 -0500 Subject: [PATCH 1/5] [FIX] Convert regexes to raw strings to stop syntax warnings --- bin/dm_link.py | 2 +- datman/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dm_link.py b/bin/dm_link.py index 756a1201..16f62ad2 100755 --- a/bin/dm_link.py +++ b/bin/dm_link.py @@ -149,7 +149,7 @@ def main(): return try: - lookup = pd.read_csv(lookup_path, sep="\s+", dtype=str) # noqa: W605 + lookup = pd.read_csv(lookup_path, sep=r"\s+", dtype=str) # noqa: W605 except IOError: logger.error("Lookup file {} not found".format(lookup_path)) return diff --git a/datman/utils.py b/datman/utils.py index 7d225b86..cd30ef1c 100644 --- a/datman/utils.py +++ b/datman/utils.py @@ -509,7 +509,7 @@ def _parse_blacklist(blacklist, scan=None, subject=None): # This will mangle any commas in comments, but is the most reliable way # to split the lines - regex = ",|\s" # noqa: W605 + regex = r",|\s" for line in blacklist: fields = re.split(regex, line.strip()) try: From 8ae52489830df823e24cce5b329386e3cdd90673 Mon Sep 17 00:00:00 2001 From: Dawn Smith Date: Tue, 27 Jan 2026 18:43:39 -0500 Subject: [PATCH 2/5] [FIX] Updated dataframe.append references -> _append --- bin/dm_parse_ea.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/dm_parse_ea.py b/bin/dm_parse_ea.py index 9cbf8a40..cd99d2ce 100755 --- a/bin/dm_parse_ea.py +++ b/bin/dm_parse_ea.py @@ -217,7 +217,8 @@ def get_ratings(log): def combine_dfs(blocks, ratings): # combines the block rows with the ratings rows and sorts them - combo = blocks.append(ratings).sort_values("onset").reset_index(drop=True) + combo = blocks._append(ratings).sort_values("onset").reset_index(drop=True) + mask = pd.notnull(combo["trial_type"]) combo["space_b4_prev"] = combo["onset"].diff(periods=1) combo["first_button_press"] = combo["duration"].shift() > 0 @@ -240,7 +241,7 @@ def combine_dfs(blocks, ratings): "participant_value": last_block.participant_value, } - combo2 = combo2.append(end_row, ignore_index=True).reset_index(drop=True) + combo2 = combo2._append(end_row, ignore_index=True).reset_index(drop=True) mask = pd.notnull(combo2["trial_type"]) @@ -264,7 +265,7 @@ def combine_dfs(blocks, ratings): "duration": 0, "participant_value": 5, } - combo2 = combo2.append(new_row, ignore_index=True) + combo2 = combo2._append(new_row, ignore_index=True) combo2 = combo2.sort_values(by=["onset", "event_type"], na_position="first").reset_index(drop=True) @@ -470,7 +471,7 @@ def parse_task(ident, combo["block_score"] = np.nan combo["n_button_press"] = np.nan - combo = (combo.append(two_s_chunks).sort_values("onset").reset_index( + combo = (combo._append(two_s_chunks).sort_values("onset").reset_index( drop=True)) test = combo.loc[pd.notnull(combo["stim_file"])] From a4f04892fe4e9bb0d17622c0f85c677c525eb395 Mon Sep 17 00:00:00 2001 From: Dawn Smith Date: Tue, 27 Jan 2026 19:25:30 -0500 Subject: [PATCH 3/5] [FIX] Explicitly remove colorbar for newer libraries --- bin/dm_mripicture.py | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 bin/dm_mripicture.py diff --git a/bin/dm_mripicture.py b/bin/dm_mripicture.py old mode 100644 new mode 100755 index f60086ad..e01d81f1 --- a/bin/dm_mripicture.py +++ b/bin/dm_mripicture.py @@ -109,6 +109,7 @@ def main(): vmin=100, vmax=1100, threshold="auto", + colorbar=False, ) t1_pic.savefig(outpath, dpi=1000) logger.debug( From 27f34dc99c59f1abe711f93ad2d3ac8bccc847ae Mon Sep 17 00:00:00 2001 From: Dawn Smith Date: Wed, 28 Jan 2026 12:04:14 -0500 Subject: [PATCH 4/5] [FIX] Silence syntax warning RE: escapes --- bin/dm_parse_faces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dm_parse_faces.py b/bin/dm_parse_faces.py index 498b4801..51d7dce5 100755 --- a/bin/dm_parse_faces.py +++ b/bin/dm_parse_faces.py @@ -74,7 +74,7 @@ def find_all_data(eprime, tag): def findnum(ln): try: - txtnum = re.findall('(\d+)\r\n', ln) # noqa: W605 + txtnum = re.findall(r'(\d+)\r\n', ln) return float(txtnum[0]) except ValueError: return txtnum[0] From ff2f65b3d2e0fefb414a27fe2f6370b82a6c2470 Mon Sep 17 00:00:00 2001 From: Dawn Smith Date: Wed, 28 Jan 2026 12:25:01 -0500 Subject: [PATCH 5/5] [VER] Update package versions where possible --- pyproject.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 65a395a4..86c0a736 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,10 +34,11 @@ classifiers = [ dependencies = [ "docopt == 0.6.2", "dcm2bids==3.1.1", - "nibabel == 5.2.1", - "nilearn == 0.10.3", - "numpy == 1.24.4", - "pandas == 2.0.3", + "matplotlib==3.10.8", + "nibabel == 5.3.3", + "nilearn == 0.12.1", + "numpy == 2.4.1", + "pandas == 3.0.0", "pybids == 0.16.4", "pydicom == 2.4.4", "pysftp == 0.2.9",