Skip to content

Conversation

neuromechanist
Copy link
Owner

Summary

  • Created make_root_filename_template macro for root-level directories like /stimuli
  • Fixed bidsschematools to handle path-based rules without datatypes
  • Made the macro truly generic by dynamically looking up entity definitions from schema

Changes

  1. New macro make_root_filename_template:

    • Handles root-level directories that use path instead of datatypes
    • Dynamically looks up entity prefixes from schema (e.g., stimulusstim)
    • Can be reused for future root-level directories like /code
  2. Fixed bidsschematools compatibility:

    • make_entity_table: Skip rules without datatypes
    • make_filename_template: Skip rules without datatypes
    • Removed stimuli from entity-table.md as it doesn't follow subject-scoped ordering
  3. Updated stimuli.md:

    • Now uses the schema-driven macro instead of hardcoded examples
    • Properly generates file templates from schema rules

Test

The documentation builds successfully:

uv run mkdocs build

This contributes to PR bids-standard#2022 for the stimuli BEP implementation.

- Create make_root_filename_template macro for root-level directories like /stimuli
- Update bidsschematools to skip path-based rules (without datatypes) in entity table and filename templates
- Remove stimuli from entity-table.md as it doesn't follow subject-scoped entity ordering
- Dynamically look up entity definitions from schema instead of hardcoding mappings
The test was failing because it tried to access datatypes attribute on all rules,
including the new stimuli rules that use path-based organization instead.
Copy link

codecov bot commented Sep 12, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

… stimuli tables

- Add explicit schema path loading to make_sidecar_table to avoid caching issues
- Temporarily comment out stimuli.Stimuli tables that need namespace fixes
- File tree generation from schema is now working for /stimuli directory
- Fix entity format labels in root template macro (use <label> instead of hardcoded)
- Add explicit schema loading to make_columns_table to avoid caching issues
- Re-enable all stimuli tables (sidecar and columns) that now work correctly
- File tree now properly shows stim-<label>[_part-<label>] format
@neuromechanist neuromechanist merged commit c77b7cb into master Sep 12, 2025
19 of 20 checks passed
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