Skip to content

Commit a6459a0

Browse files
authored
Merge pull request #1134 from effigies/maint/lock
MNT: Lock test environment, update with dependabot
2 parents 50656a8 + 4652449 commit a6459a0

File tree

15 files changed

+3571
-19
lines changed

15 files changed

+3571
-19
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8+
groups:
9+
actions-infrastructure:
10+
patterns:
11+
- "actions/*"
812
- package-ecosystem: "gitsubmodule"
913
directory: "/"
1014
schedule:
1115
interval: "weekly"
16+
- package-ecosystem: uv
17+
directory: "/"
18+
schedule:
19+
interval: weekly

.github/workflows/build-test-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
- python-version: '3.10'
7575
dependencies: pre
7676
fail-fast: false
77+
continue-on-error: ${{ matrix.dependencies == 'pre' }}
7778

7879
env:
7980
DEPENDS: ${{ matrix.dependencies }}

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ graft tests
33
graft doc
44

55
include tox.ini
6+
# Include uv.lock so that tox can run from sdist
7+
include uv.lock
68

79
recursive-exclude src README.md

src/bids/modeling/tests/test_statsmodels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def test_missing_value_fill():
304304

305305
# Assert that there are no missing values
306306
outputs = graph.nodes['run'].outputs_
307-
assert not np.isnan(outputs[0].model_spec.X).any().any()
307+
assert not outputs[0].model_spec.X.isna().any().any()
308308

309309
# Check that missing_values='error' raises an error
310310
with pytest.raises(ValueError):
@@ -314,4 +314,4 @@ def test_missing_value_fill():
314314
graph.run_graph(missing_values='ignore')
315315

316316
outputs = graph.nodes['run'].outputs_
317-
assert np.isnan(outputs[0].model_spec.X).any().any()
317+
assert outputs[0].model_spec.X.isna().any().any()

src/bids/modeling/tests/test_transformations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ def test_split(collection):
278278
rt_post_onsets = np.r_[collection['RT.respcat[0]'].onset,
279279
collection['RT.respcat[-1]'].onset,
280280
collection['RT.respcat[1]'].onset]
281-
assert np.array_equal(rt_pre_onsets.sort(), rt_post_onsets.sort())
281+
assert np.array_equal(np.sort(rt_pre_onsets), np.sort(rt_post_onsets))
282282

283283
rt_post_values = np.r_[collection['RT.respcat[0]'].values.values,
284284
collection['RT.respcat[-1]'].values.values,
285285
collection['RT.respcat[1]'].values.values]
286-
assert np.array_equal(rt_pre_values.sort(), rt_post_values.sort())
286+
assert np.array_equal(np.sort(rt_pre_values), np.sort(rt_post_values))
287287

288288
# Grouping SparseEventVariable by multiple columns
289289
transform.Split(collection, variables=['RT_2'], by=['loss', 'respcat'])

src/bids/tests/test_cli.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ def runner():
1515

1616
def test_cli_entrypoint(runner):
1717
res = runner.invoke(cli, catch_exceptions=False)
18-
assert "Command-line interface for PyBIDS operations" in res.stdout
19-
assert runner.invoke(cli, ['-h'], catch_exceptions=False).stdout == res.stdout
18+
if res.exit_code == 2: # click 8.2+
19+
help_text = res.stderr
20+
elif res.exit_code == 0:
21+
help_text = res.stdout
22+
assert "Command-line interface for PyBIDS operations" in help_text
23+
assert runner.invoke(cli, ['-h'], catch_exceptions=False).stdout == help_text
2024
# verify versioning
2125
assert runner.invoke(cli, ['--version'], catch_exceptions=False).stdout.startswith('pybids')
2226

@@ -65,4 +69,4 @@ def is_success(res):
6569
],
6670
catch_exceptions=False,
6771
)
68-
assert is_success(res)
72+
assert is_success(res)

src/bids/variables/variables.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,9 @@ def __init__(self, name, data, run_info, source, **kwargs):
371371
% repr(run_info))
372372
self.run_info = run_info
373373
for sc in self._property_columns:
374-
setattr(self, sc, data.pop(sc).values)
374+
arr = data.pop(sc).values
375+
arr.flags['WRITEABLE'] = True
376+
setattr(self, sc, arr)
375377
super(SparseRunVariable, self).__init__(name, data, source, **kwargs)
376378

377379
def get_duration(self):

tests/data/ds005/derivatives/events/dataset_description.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"PipelineDescription": {
2+
"GeneratedBy": [{
33
"Name": "events"
4-
},
4+
}],
55
"BIDSVersion": "1.7.1",
66
"License": "This dataset is made available under the Public Domain Dedication and License \nv1.0, whose full text can be found at \nhttp://www.opendatacommons.org/licenses/pddl/1.0/. \nWe hope that all users will follow the ODC Attribution/Share-Alike \nCommunity Norms (http://www.opendatacommons.org/norms/odc-by-sa/); \nin particular, while not legally required, we hope that all users \nof the data will acknowledge the OpenfMRI project and NSF Grant \nOCI-1131441 (R. Poldrack, PI) in any publications.",
77
"Name": "Mixed-gambles task",

tests/data/ds005/derivatives/fmriprep/dataset_description.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"Name": "fMRIPrep - fMRI PREProcessing workflow",
33
"BIDSVersion": "1.4.0",
44
"DatasetType": "derivative",
5-
"PipelineDescription": {"Name": "ds000003 Pipeline"},
65
"GeneratedBy": [
76
{
87
"Name": "fMRIPrep",

tests/data/ds005_derivs/dummy-vx.x.x/dataset_description.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"PipelineDescription": {
2+
"GeneratedBy": [{
33
"Name": "dummy"
4-
},
4+
}],
55
"BIDSVersion": "1.0.0rc2",
66
"Name": "Mixed-gambles task -- dummy derivative",
77
"ReferencesAndLinks": "Tom, S.M., Fox, C.R., Trepel, C., Poldrack, R.A. (2007). The neural basis of loss aversion in decision-making under risk. Science, 315(5811):515-8",

0 commit comments

Comments
 (0)