Skip to content

[ENH] Add macro to generate enum tables filtered by tags #2197

@ree-gupta

Description

@ree-gupta

Currently, some documentation manually maintain duplicate enum tables when the values already exist in schema definitions with tags.

Proposal:

Add a macro that generates tables from existing enum definitions filtered by tag:

{{ MACROS___make_enum_table("type__channels", "microephys") }}

Functionality:

  1. Takes column definition (for example, type__channels)
  2. Filters enums by tag (for example, microephys)
  3. Generates formatted table automatically

Example:

Instead of manually listing microelectrophysiology (#1705 ) channel types like LFP, HP, MUA in documentation, the macro would pull all microephys-tagged enums from the type__channels definition automatically.

Backwards compatibility:
This is a documentation enhancement that doesn't change the specification itself, so it's fully backwards compatible.

Mock example:

Current manual approach:

| Value | Description |
|-------|-------------|
| LFP   | Local field potential |
| HP    | High-pass filtered signal |
| MUA   | Multi-unit activity |

Proposed macro approach:

{{ MACROS___make_enum_table("type__channels", "microephys") }}

This would automatically generate the same table by pulling from the schema.

Metadata

Metadata

Assignees

Labels

BEPenhancementNew feature or requestschema-codeUpdates or changes to the code used to parse, filter, and render the schema.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions