Skip to content

Commit 4d325a2

Browse files
authored
Merge branch 'main' into docstrings
2 parents df99710 + 135aa1f commit 4d325a2

File tree

14 files changed

+16
-48
lines changed

14 files changed

+16
-48
lines changed

.circleci/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
parameters:
88
python_version:
99
type: string
10-
default: "3.8"
10+
default: "3.12"
1111
machine:
1212
image: ubuntu-2404:2024.08.1
1313
working_directory: /home/circleci/src/CuBIDS
@@ -105,10 +105,11 @@ workflows:
105105
matrix:
106106
parameters:
107107
python_version:
108-
- "3.8"
109108
- "3.9"
110109
- "3.10"
111110
- "3.11"
111+
- "3.12"
112+
- "3.13"
112113
filters:
113114
tags:
114115
only: /.*/

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.8"
6+
python: "3.12"
77

88
sphinx:
99
configuration: docs/conf.py

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Before you submit a pull request, check that it meets these guidelines:
103103
2. If the pull request adds functionality, the docs should be updated. Put
104104
your new functionality into a function with a docstring, and add the
105105
feature to the list in README.rst.
106-
3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy.
106+
3. The pull request should work for Python 3.9, 3.10, 3.11, 3.12 and 3.13, and for PyPI.
107107
Check https://circleci.com/gh/PennLINC/CuBIDS
108108
and make sure that the tests pass for all supported Python versions.
109109

cubids/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _parse_validate():
7474
default=None,
7575
)
7676
parser.add_argument(
77-
"--ignore_nifti_headers",
77+
"--ignore-nifti-headers",
7878
action="store_true",
7979
default=False,
8080
help="Disregard NIfTI header content during validation",

cubids/config.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""Functions for configuring CuBIDS."""
22

33
from pathlib import Path
4-
4+
import importlib.resources
55
import yaml
6-
from pkg_resources import resource_filename as pkgrf
7-
86

97
def load_config(config_file):
108
"""
@@ -21,7 +19,7 @@ def load_config(config_file):
2119
The configuration loaded from the YAML file.
2220
"""
2321
if config_file is None:
24-
config_file = Path(pkgrf("cubids", "data/config.yml"))
22+
config_file = Path(importlib.resources.files("cubids") / "data/config.yml")
2523

2624
with config_file.open() as f:
2725
config = yaml.safe_load(f)

cubids/tests/utils.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import nibabel as nb
1010
import numpy as np
1111
import pandas as pd
12-
from pkg_resources import resource_filename as pkgrf
12+
import importlib.resources
1313

14-
TEST_DATA = pkgrf("cubids", "tests/data")
14+
TEST_DATA = importlib.resources.files("cubids") / "tests/data"
1515

1616

1717
def get_data(tmp_path):
@@ -117,18 +117,6 @@ def _add_deletion(summary_tsv):
117117
return df.loc[3, "KeyParamGroup"]
118118

119119

120-
# def _edit_tsv(summary_tsv):
121-
# df = pd.read_table(summary_tsv)
122-
# df['RenameEntitySet'] = df['RenameEntitySet'].apply(str)
123-
# df['EntitySet'] = df['EntitySet'].apply(str)
124-
# for row in range(len(df)):
125-
# if df.loc[row, 'EntitySet'] == \
126-
# "acquisition-v4_datatype-fmap_fmap-magnitude1_suffix-magnitude1":
127-
# df.at[row, 'RenameEntitySet'] = \
128-
# "acquisition-v5_datatype-fmap_fmap-magnitude1_suffix-magnitude1"
129-
# df.to_csv(summary_tsv)
130-
131-
132120
def _add_ext_files(img_path):
133121
"""
134122
Add and save extension files in the same directory as the image file.

cubids/workflows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def validate(
231231
linked_output_prefix_t,
232232
]
233233
if ignore_nifti_headers:
234-
cmd.append("--ignore_nifti_headers")
234+
cmd.append("--ignore-nifti-headers")
235235

236236
elif container_type == "singularity":
237237
cmd = [
@@ -250,7 +250,7 @@ def validate(
250250
linked_output_prefix_t,
251251
]
252252
if ignore_nifti_headers:
253-
cmd.append("--ignore_nifti_headers")
253+
cmd.append("--ignore-nifti-headers")
254254

255255
if sequential:
256256
cmd.append("--sequential")

docs/api.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. include:: links.rst
2-
31
===
42
API
53
===

docs/example.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. include:: links.rst
2-
31
===================
42
Example Walkthrough
53
===================

docs/examples.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)