pybids icon indicating copy to clipboard operation
pybids copied to clipboard

Documentation for layout is out of date

Open VisLab opened this issue 5 years ago • 1 comments

Chapter 2 of the documentation in the user's guide has some issues.

Section 2.1 Loading BIDS datasets

 from bids.tests import get_test_data_path

should be:
from bids.tests.utils import get_test_data_path

Section 2.3 Extracting metadata

The following example crashes because there is no event file satisfying this: f = layout.get(task='nback', run=1, extension='nii.gz')[0].filename layout.get_events(f)

There is a top level event file associated with synthetic, but there doesn't seem to be an obvious way of getting at it with the layout object. I tried (it crashed): cols = layout.get_collections('dataset', types='events')

The next item doesn't pick up any metadata: f = layout.get(task='nback', run=1, extension='nii.gz')[0].filename layout.get_metadata(f)

VisLab avatar Nov 06 '20 19:11 VisLab

I think that the user guide hasn't stayed up to date in the same way that the example notebook has. It might be worth it to switch to an auto-run Sphinx Gallery-type approach so that we at least see when the examples/guide become outdated.

tsalo avatar Feb 26 '21 14:02 tsalo