Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Mermaid diagram #19

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Create Mermaid diagram
  • Loading branch information
rly committed Nov 12, 2024
commit c0a9d5a0e4b8f335e261937005cea2cce6d7252d
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,69 @@ generateExtension('<directory path>/ndx-events/spec/ndx-events.namespace.yaml');
1. [Example writing TTL pulses and stimulus presentations to an NWB file](examples/write_ttls_events.py).


## Diagram


```mermaid
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#ffffff', "primaryBorderColor': '#144E73', 'lineColor': '#D96F32'}}}%%


classDiagram
direction LR

class TimestampVectorData {
<<VectorData>>

data : NDArray[Shape["*"], Float]
--> unit : str = "seconds"
resolution : float, optional
}

class DurationVectorData {
<<VectorData>>

data : NDArray[Shape["*"], Float]
--> unit : str = "seconds"
resolution : float, optional
}

class CategoricalVectorData {
<<VectorData>>

data : NDArray[Shape["*"], Any]
meanings : MeaningsTable
filter_values : NDArray[Shape["*"], String], optional
}

class MeaningsTable {
<<DynamicTable>>

value : VectorData[NDArray[Shape["*"], Any]]
meaning : VectorData[NDArray[Shape["*"], String]]
}

class EventsTable {
<<DynamicTable>>

timestamp : TimestampVectorData
duration : DurationVectorData, optional
meanings_tables : list[MeaningsTable]
}

class NdxEventsNWBFile {
<<NWBFile>>

events : list[EventsTable]
}

CategoricalVectorData ..> MeaningsTable : object reference
EventsTable "1" *--> "0..*" MeaningsTable : contains
EventsTable "1" *--> "1..*" TimestampVectorData : contains
EventsTable "1" *--> "0..*" DurationVectorData : contains
EventsTable "1" *--> "0..*" CategoricalVectorData : contains
NdxEventsNWBFile "1" *--> "0..*" EventsTable : contains
```

## Developer installation

In a Python 3.8-3.12 environment:
Expand Down
Loading