Skip to content

Conversation

@MaximeBICMTL
Copy link
Contributor

@MaximeBICMTL MaximeBICMTL commented Jan 16, 2026

Description

First PR in the LORIS BIDS reader effort, which adds a new loris-bids-reader package as well as the BidsJsonFile and BidsDatasetDescriptionJsonFile classes, and starts to adopt them in the current codebase.

Design choices

  • loris-bids-reader is a new Python package, it is designed to work as a standalone library independent of LORIS, similarly to the bids-eeg-chunker package.
  • There is a BidsJsonFile abstract class:
    • This class is inherited by all file-specific BIDS JSON classes (such as BidsDatasetDescriptionJsonFile).
    • The file-specific classes can then implenebt there own validation logic, be used as type hints, and add links to the relevant BIDS documentation in their docstrings.
  • As discussed in the last imaging meeting, this approach does not use the Pydantic-based validation approach in order to avoid the double source of truth problem.
  • Instead, we only validate manually the fields that we really need in our pipelines. This is the approach that we currently use in our codebase. While it offers weaker typing and validation, it results in a lot less code to maintain.

@github-actions github-actions bot added the Language: Python Issue or PR related to the Python codebase label Jan 16, 2026
@MaximeBICMTL MaximeBICMTL changed the base branch from main to bids_staging_branch January 16, 2026 07:13
@MaximeBICMTL MaximeBICMTL force-pushed the loris_bids_reader_1_dataset_description branch from 6407f9c to ae33039 Compare January 16, 2026 07:37
@MaximeBICMTL MaximeBICMTL added Area: BIDS Issue or PR related to the handling of BIDS datasets Complexity: Medium Issue or PR that requires a moderate effort or expertise to implement, review, or test labels Jan 16, 2026
@MaximeBICMTL MaximeBICMTL force-pushed the loris_bids_reader_1_dataset_description branch from ae33039 to 5131e37 Compare January 16, 2026 07:44
@MaximeBICMTL MaximeBICMTL added Pipeline: BIDS importer PR or issue related to the BIDS importer Category: Refactor Issue or PR that aims to improve the existing code and removed Area: BIDS Issue or PR related to the handling of BIDS datasets labels Jan 16, 2026
@MaximeBICMTL MaximeBICMTL marked this pull request as ready for review January 16, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Refactor Issue or PR that aims to improve the existing code Complexity: Medium Issue or PR that requires a moderate effort or expertise to implement, review, or test Language: Python Issue or PR related to the Python codebase Pipeline: BIDS importer PR or issue related to the BIDS importer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant