Skip to content

LORIS BIDS importer package (PR 2)#1425

Open
MaximeBICMTL wants to merge 2 commits into
aces:bids_staging_branchfrom
MaximeBICMTL:bids-importer-package
Open

LORIS BIDS importer package (PR 2)#1425
MaximeBICMTL wants to merge 2 commits into
aces:bids_staging_branchfrom
MaximeBICMTL:bids-importer-package

Conversation

@MaximeBICMTL
Copy link
Copy Markdown
Contributor

Builds on #1424 (diff)

Description

This PR isolates the LORIS BIDS importer out of the core lib module into its own loris-bids-importer package.

List of changes

Architecture

  • Moved the BIDS importer code from the scripts and lib.import_bids_dataset modules to a new loris-bids-importer package, which is installed by default with LORIS Python.
  • Also moved the Eeg and Physiological classes to this new package.
  • Renamed check_or_create_subject/session(params, create=False) functions to validate_subject/session(params, create=False) to be more concise and better emphasize the validation step of the pipeline.
  • Added some modality-specific submodules to the loris-bids-importer to better organize the files.

Old file structure:

python
├── lib
│   ├── eeg.py
│   ├── import_bids_dataset
│   │   ├── acquisitions.py
│   │   ├── archive.py
│   │   ├── args.py
│   │   ├── channels.py
│   │   ├── check_sessions.py
│   │   ├── check_subjects.py
│   │   ├── copy_files.py
│   │   ├── env.py
│   │   ├── events.py
│   │   ├── file_type.py
│   │   ├── main.py
│   │   ├── mri.py
│   │   ├── mri_sidecar.py
│   │   ├── physio.py
│   │   ├── print.py
│   │   └── scans.py
│   └── physiological.py
└── scripts
    └── import_bids_dataset.py

New file structure:

python
└── loris_bids_importer
    ├── pyproject.toml
    ├── README.md
    └── src
        └── loris_bids_importer
            ├── acquisitions.py
            ├── archive.py
            ├── args.py
            ├── channels.py
            ├── copy_files.py
            ├── eeg
            │   ├── main.py
            │   └── physiological.py
            ├── env.py
            ├── events.py
            ├── file_type.py
            ├── main.py
            ├── mri
            │   ├── main.py
            │   └── sidecar.py
            ├── physio.py
            ├── print.py
            ├── scans.py
            ├── scripts
            │   └── import_bids_dataset.py
            └── validation
                ├── sessions.py
                └── subjects.py

Documentation

Added a README file to the new package. Included MEG because I don't want to change the README soon. Did not talk about default_bids_vl because it is a horrible design (it should be a CLI parameter, not a global config value).

CLI parameters (breaking changes)

Renamed the BIDS importer command from import_bids_dataset.py (bids_import.py in LORIS 27) to import-bids-dataset.

Renamed CLI options to use kebab-case:

  • --createcandidate--create-candidate
  • --createsession--create-session
  • --nobidsvalidation--no-bids-validation
  • --nocopy--no-copy

@github-actions github-actions Bot added the Language: Python Issue or PR related to the Python codebase label May 14, 2026
@MaximeBICMTL MaximeBICMTL force-pushed the bids-importer-package branch from 4a0848d to 345cff3 Compare May 14, 2026 12:30
@MaximeBICMTL MaximeBICMTL force-pushed the bids-importer-package branch from 345cff3 to eb62f84 Compare May 14, 2026 12:33
@MaximeBICMTL MaximeBICMTL added Caveat for Existing Projects Issue or PR that introduces or may introduce breaking changes for existing projects Category: Documentation Issue or PR that aims to improve the documentation 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 Pipeline: BIDS importer PR or issue related to the BIDS importer labels May 14, 2026
@MaximeBICMTL MaximeBICMTL changed the base branch from main to bids_staging_branch May 14, 2026 12:34
@MaximeBICMTL MaximeBICMTL added the Area: Packaging Issue or PR related to packaging, installation, environment, or configuration label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Packaging Issue or PR related to packaging, installation, environment, or configuration Category: Documentation Issue or PR that aims to improve the documentation Category: Refactor Issue or PR that aims to improve the existing code Caveat for Existing Projects Issue or PR that introduces or may introduce breaking changes for existing projects 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