bids-website icon indicating copy to clipboard operation
bids-website copied to clipboard

Extend mermaid figure(s) for validator?

Open yarikoptic opened this issue 10 months ago • 2 comments

While going through the great visualizations @effigies cooked for us in https://bids-website.readthedocs.io/en/latest/blog/2024/11/13/bids-validator-2.html#v1146 I was asked specific questions of clarification on what any particular box corresponds to... hence we decided to add some styling and references. So instead of

graph LR;
    subgraph bids-specification;
        markdown ---> specification
        schema --> bidsschematools --> specification & schema.json
    end
    subgraph "bids-validator @ v1.14.6"; 
        regex["filename patterns"] --> Node.js
        regex["filename patterns"] --> python
        Node.js --> web
        deno
    end

    specification -. interpreted .-> regex
    schema.json ---> deno

it could look like

graph LR;
    subgraph bids-specification;
        markdown ---> specification
        schema --> bidsschematools --> specification & schema.json
    end
    subgraph "bids-validator @ v1.14.6";
        regex["filename patterns"] --> Node.js
        regex["filename patterns"] --> python
        Node.js --> web
        deno
    end

    specification -. interpreted .-> regex
    schema.json ---> deno

    schema@{label: "<a href="https://github.com/bids-standard/bids-specification/tree/v1.9.0/src/schema">src/schema/</a>", shape: docs}
    bidsschematools@{label: "<a href="https://github.com/bids-standard/bids-specification/tree/v1.9.0/tools/schemacode">tools/schemacode/</a>", shape: procs}
    schema.json@{label: "<a href="https://bids-specification.readthedocs.io/en/v1.9.0/schema.json">schema.json</a>", shape: doc}

simply by adding "styling" to the nodes via

     schema@{label: "<a href="https://github.com/bids-standard/bids-specification/tree/v1.9.0/src/schema">src/schema/</a>", shape: docs}
    bidsschematools@{label: "<a href="https://github.com/bids-standard/bids-specification/tree/v1.9.0/tools/schemacode">tools/schemacode/</a>", shape: procs}
    schema.json@{label: "<a href="https://bids-specification.readthedocs.io/en/v1.9.0/schema.json">schema.json</a>", shape: doc}

at the end (hence easy to reuse across figures)... v1.9.0 was chosen as bids version at time of release of that version of bids-validator.

Do you think it is worthwhile and whether anything else to tune there up.

yarikoptic avatar Feb 21 '25 16:02 yarikoptic

Yeah, I'm fine with improving the figures.

effigies avatar Feb 21 '25 17:02 effigies

Let's see to what we arrive in #626 and then just adopt the style/listing for consistent appearance but without "extending" really to grow into a monster of the #626 ;)

yarikoptic avatar Feb 21 '25 22:02 yarikoptic

any chance some is already working with mermaid charts and can get this done before the end of the year?

cc @effigies @julia-pfarr (maybe also cc BEP process wg ? @ericearl )

christinerogers avatar Nov 24 '25 21:11 christinerogers

Let's see if copilot could be of help here

yarikoptic avatar Nov 24 '25 22:11 yarikoptic