Skip to content

Replace pybids with ancpBIDS#94

Open
apdavison wants to merge 2 commits into
openMetadataInitiative:mainfrom
apdavison:ancpBIDS
Open

Replace pybids with ancpBIDS#94
apdavison wants to merge 2 commits into
openMetadataInitiative:mainfrom
apdavison:ancpBIDS

Conversation

@apdavison
Copy link
Copy Markdown
Member

Summary

Following on from the discussion in #69, this PR replaces pybids with ancpBIDS as the BIDS layout engine. This is a prerequisite for using ancpBIDS's metadata inheritance engine (get_metadata()) to generate in-depth neuroimaging metadata in a future PR.

A layout_to_df() shim in converter.py bridges the ancpBIDS native API to the pandas DataFrame expected by the rest of the pipeline, so main.py and utility.py are unchanged. In future, we could drop the DataFrame interface, if it seems like a good idea.

Of the two motivations for replacing pybids mentioned in #69, this PR deals with "a lot of additional dependencies we don't need", and lays the groundwork for "does not extract all the things we need".

Dependency changes

pybids (main): 33 packages
ancpBIDS (this branch): 18 packages

Packages dropped entirely:

Removed Purpose
pybids 0.17.2 the layout engine itself
bids-validator 1.14.6 unused validator
SQLAlchemy 2.0.49 pybids database backend
nibabel 5.4.2 pybids NIfTI reading
scipy 1.17.1 pulled in by pybids
formulaic 0.5.2 pybids formula parsing
fsspec 2026.4.0 pybids filesystem abstraction
astor 0.8.1 pybids AST rewriting
docopt 0.6.2 bids-validator CLI
interface_meta 2.0.1 formulaic dependency
num2words 0.5.14 pybids dependency
pathlib_abc / universal_pathlib fsspec dependencies
typing_extensions pybids compatibility shim
wrapt 1.1.3 decorator library

apdavison added 2 commits May 7, 2026 15:17
Replaces pybids and bids-validator with ancpbids as the BIDS layout
engine. A layout_to_df() shim in converter.py bridges the ancpBIDS
native API to the pandas DataFrame expected by the rest of the pipeline,
so main.py and utility.py are unchanged.

ancpBIDS correctly treats CTF MEG .ds directories as single artifacts
rather than enumerating their internal files (BadChannels, ClassFile.cls,
etc.), which is the correct BIDS interpretation. The ds000247 expected
file count in the test suite is updated accordingly (202 → 120).
* main:
  Update codemeta.json for 0.2.0 release
  Release 0.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant