From 207ca99a3dd2d98a99086d5a91182ae8da7803be Mon Sep 17 00:00:00 2001 From: Lauren Diaz Date: Wed, 5 Mar 2025 11:20:30 -0500 Subject: [PATCH 1/6] add wearables ndx proposed uml class diagram --- doc/design/wearables_ndx.mmd | 143 +++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 doc/design/wearables_ndx.mmd diff --git a/doc/design/wearables_ndx.mmd b/doc/design/wearables_ndx.mmd new file mode 100644 index 0000000..e14fa23 --- /dev/null +++ b/doc/design/wearables_ndx.mmd @@ -0,0 +1,143 @@ +classDiagram + direction RL + + + NWBDataInterface --|> TimeSeries + NWBDataInterface <|-- NWBContainer + WearableDevice <|-- NWBContainer + WearableSensor <|-- NWBContainer + WearableSeries <|-- TimeSeries + PhysiologicalMeasure <|-- MultiContainerInterface + MultiContainerInterface <|-- NWBDataInterface + MultiContainerInterface <|-- hdmf_MultiContainerInterface + hdmf_MultiContainerInterface <|-- Container + Container <|-- AbstractContainer + NWBContainer <|-- Container + NWBContainer <|-- NWBMixin + NWBMixin <|-- AbstractContainer + + WearableSensor --> WearableDevice + WearableSeries --> WearableSensor + WearableSeries "1..*" --o PhysiologicalMeasure + + namespace pynwb.base { + class TimeSeries { + comments ~string~ + description ~string~ + data ~array[uint8]~ + resolution ~float~ + conversion ~float~ + offset ~float~ + unit ~string~ + timestamps ~array~ + timestamps_unit ~string~ + interval ~int~ + starting_time ~float~ + rate ~float~ + starting_time_unit ~string~ + control ~Iterable~ + control_description ~Iterable~ + continuity ~str~ + num_samples ~int~ + data_link ~~ + timestamp_link ~~ + + + _check_time_series_dimension(self) + __get_links(self, links) + __add_link(self, links_key, link) + _generate_field_html(self, key, value, level, access_code) + get_timestamps(self) + get_data_in_units(self) + + + + } + } + + namespace pynwb.core { + class NWBDataInterface { + } + + class MultiContainerInterface { + } + + class NWBContainer { + + name ~string~ + } + + class NWBMixin { + name ~str~ + data_type ~~ + + get_ancestor(neurodata_type) + } + } + + namespace hdmf.container { + class hdmf_MultiContainerInterface { + name ~str~ + } + + class Container { + name ~str~ + css_style ~str~ + js_script ~str~ + + set_data_io(dataset_name, data_io_class, data_io_kwargs, data_chunk_iterator_class, data_chunk_iterator_kwargs, **kwargs) + + } + + class AbstractContainer { + name ~str~ + data_type ~~ + read_io ~HDMFIO~ + all_objects ~dict~ + fields ~[List, dict]~ + object_id ~~ + modified ~bool~ + children ~~ + container_source ~~ + parent ~Container~ + + get_fields_conf() + get_read_io() + get_ancestor(data_type) + all_children() + get_ancestors() + generate_new_id(recurse) + set_modified(modified) + type_hierarchy() + reset_parent() + } + + } + + namespace NWBWearables { + class WearableDevice { + + name ~string~ + + description ~string~ + + manufacturer ~string~ + + location ~string~ + } + + class WearableSensor { + + name ~string~ + + description ~string~ + + device ~string~ + } + + class WearableSeries { + data ~array[TBD]~ + sensor ~WearableSensor~ + + get_sensor(self) + } + + class PhysiologicalMeasure{ + + } + + } + + From 02ab4fdbff805700978889070043e493208befc5 Mon Sep 17 00:00:00 2001 From: Lauren Diaz Date: Wed, 5 Mar 2025 11:26:44 -0500 Subject: [PATCH 2/6] adjust theme to fit with dark mode --- doc/design/wearables_ndx.mmd | 256 ++++++++++++++++++----------------- 1 file changed, 130 insertions(+), 126 deletions(-) diff --git a/doc/design/wearables_ndx.mmd b/doc/design/wearables_ndx.mmd index e14fa23..ed17305 100644 --- a/doc/design/wearables_ndx.mmd +++ b/doc/design/wearables_ndx.mmd @@ -1,143 +1,147 @@ -classDiagram - direction RL - - - NWBDataInterface --|> TimeSeries - NWBDataInterface <|-- NWBContainer - WearableDevice <|-- NWBContainer - WearableSensor <|-- NWBContainer - WearableSeries <|-- TimeSeries - PhysiologicalMeasure <|-- MultiContainerInterface - MultiContainerInterface <|-- NWBDataInterface - MultiContainerInterface <|-- hdmf_MultiContainerInterface - hdmf_MultiContainerInterface <|-- Container - Container <|-- AbstractContainer - NWBContainer <|-- Container - NWBContainer <|-- NWBMixin - NWBMixin <|-- AbstractContainer - - WearableSensor --> WearableDevice - WearableSeries --> WearableSensor - WearableSeries "1..*" --o PhysiologicalMeasure - - namespace pynwb.base { - class TimeSeries { - comments ~string~ - description ~string~ - data ~array[uint8]~ - resolution ~float~ - conversion ~float~ - offset ~float~ - unit ~string~ - timestamps ~array~ - timestamps_unit ~string~ - interval ~int~ - starting_time ~float~ - rate ~float~ - starting_time_unit ~string~ - control ~Iterable~ - control_description ~Iterable~ - continuity ~str~ - num_samples ~int~ - data_link ~~ - timestamp_link ~~ - - - _check_time_series_dimension(self) - __get_links(self, links) - __add_link(self, links_key, link) - _generate_field_html(self, key, value, level, access_code) - get_timestamps(self) - get_data_in_units(self) - - - - } - } - - namespace pynwb.core { - class NWBDataInterface { - } - - class MultiContainerInterface { - } - - class NWBContainer { - + name ~string~ +--- +title: Wearables NDX Class Diagram +--- +%%{init: {'theme':'neutral'}}%% + classDiagram + direction RL + + + NWBDataInterface --|> TimeSeries + NWBDataInterface <|-- NWBContainer + WearableDevice <|-- NWBContainer + WearableSensor <|-- NWBContainer + WearableSeries <|-- TimeSeries + PhysiologicalMeasure <|-- MultiContainerInterface + MultiContainerInterface <|-- NWBDataInterface + MultiContainerInterface <|-- hdmf_MultiContainerInterface + hdmf_MultiContainerInterface <|-- Container + Container <|-- AbstractContainer + NWBContainer <|-- Container + NWBContainer <|-- NWBMixin + NWBMixin <|-- AbstractContainer + + WearableSensor --> WearableDevice + WearableSeries --> WearableSensor + WearableSeries "1..*" --o PhysiologicalMeasure + + namespace pynwb.base { + class TimeSeries { + comments ~string~ + description ~string~ + data ~array[uint8]~ + resolution ~float~ + conversion ~float~ + offset ~float~ + unit ~string~ + timestamps ~array~ + timestamps_unit ~string~ + interval ~int~ + starting_time ~float~ + rate ~float~ + starting_time_unit ~string~ + control ~Iterable~ + control_description ~Iterable~ + continuity ~str~ + num_samples ~int~ + data_link ~~ + timestamp_link ~~ + + + _check_time_series_dimension(self) + __get_links(self, links) + __add_link(self, links_key, link) + _generate_field_html(self, key, value, level, access_code) + get_timestamps(self) + get_data_in_units(self) + + + + } } - class NWBMixin { - name ~str~ - data_type ~~ + namespace pynwb.core { + class NWBDataInterface { + } - get_ancestor(neurodata_type) - } - } - - namespace hdmf.container { - class hdmf_MultiContainerInterface { - name ~str~ - } + class MultiContainerInterface { + } - class Container { - name ~str~ - css_style ~str~ - js_script ~str~ + class NWBContainer { + + name ~string~ + } - set_data_io(dataset_name, data_io_class, data_io_kwargs, data_chunk_iterator_class, data_chunk_iterator_kwargs, **kwargs) + class NWBMixin { + name ~str~ + data_type ~~ + get_ancestor(neurodata_type) + } } - class AbstractContainer { - name ~str~ - data_type ~~ - read_io ~HDMFIO~ - all_objects ~dict~ - fields ~[List, dict]~ - object_id ~~ - modified ~bool~ - children ~~ - container_source ~~ - parent ~Container~ - - get_fields_conf() - get_read_io() - get_ancestor(data_type) - all_children() - get_ancestors() - generate_new_id(recurse) - set_modified(modified) - type_hierarchy() - reset_parent() + namespace hdmf.container { + class hdmf_MultiContainerInterface { + name ~str~ + } + + class Container { + name ~str~ + css_style ~str~ + js_script ~str~ + + set_data_io(dataset_name, data_io_class, data_io_kwargs, data_chunk_iterator_class, data_chunk_iterator_kwargs, **kwargs) + + } + + class AbstractContainer { + name ~str~ + data_type ~~ + read_io ~HDMFIO~ + all_objects ~dict~ + fields ~[List, dict]~ + object_id ~~ + modified ~bool~ + children ~~ + container_source ~~ + parent ~Container~ + + get_fields_conf() + get_read_io() + get_ancestor(data_type) + all_children() + get_ancestors() + generate_new_id(recurse) + set_modified(modified) + type_hierarchy() + reset_parent() + } + } - } + namespace NWBWearables { + class WearableDevice { + + name ~string~ + + description ~string~ + + manufacturer ~string~ + + location ~string~ + } - namespace NWBWearables { - class WearableDevice { - + name ~string~ - + description ~string~ - + manufacturer ~string~ - + location ~string~ - } + class WearableSensor { + + name ~string~ + + description ~string~ + + device ~string~ + } - class WearableSensor { - + name ~string~ - + description ~string~ - + device ~string~ - } + class WearableSeries { + data ~array[TBD]~ + sensor ~WearableSensor~ - class WearableSeries { - data ~array[TBD]~ - sensor ~WearableSensor~ + get_sensor(self) + } - get_sensor(self) - } + class PhysiologicalMeasure{ - class PhysiologicalMeasure{ + } } - - } - - + + From 3c4ebd58f15072bd6a60d415c90b14ece8de6679 Mon Sep 17 00:00:00 2001 From: Lauren Diaz Date: Wed, 5 Mar 2025 11:38:41 -0500 Subject: [PATCH 3/6] force white background so all elements are visible --- doc/design/wearables_ndx.mmd | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/design/wearables_ndx.mmd b/doc/design/wearables_ndx.mmd index ed17305..468bb23 100644 --- a/doc/design/wearables_ndx.mmd +++ b/doc/design/wearables_ndx.mmd @@ -1,7 +1,14 @@ --- title: Wearables NDX Class Diagram --- -%%{init: {'theme':'neutral'}}%% +%%{init: { + 'theme':'base', + 'themeVariables': { + 'background':#ffffff + } + + } +}%% classDiagram direction RL From 13935a876b2759be2ca4d629733eef7c26da5636 Mon Sep 17 00:00:00 2001 From: Lauren Diaz Date: Wed, 5 Mar 2025 11:39:48 -0500 Subject: [PATCH 4/6] attempting to force white background so all elements are visible --- doc/design/wearables_ndx.mmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/design/wearables_ndx.mmd b/doc/design/wearables_ndx.mmd index 468bb23..b742fd8 100644 --- a/doc/design/wearables_ndx.mmd +++ b/doc/design/wearables_ndx.mmd @@ -4,7 +4,7 @@ title: Wearables NDX Class Diagram %%{init: { 'theme':'base', 'themeVariables': { - 'background':#ffffff + 'mainBkg':#ffffff } } From fa7dbaf24fe4da59058a57020d3845eaa3b391c4 Mon Sep 17 00:00:00 2001 From: Lauren Diaz Date: Wed, 5 Mar 2025 11:44:27 -0500 Subject: [PATCH 5/6] adjusting back to neutral --- doc/design/wearables_ndx.mmd | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/design/wearables_ndx.mmd b/doc/design/wearables_ndx.mmd index b742fd8..e7b7a99 100644 --- a/doc/design/wearables_ndx.mmd +++ b/doc/design/wearables_ndx.mmd @@ -2,11 +2,7 @@ title: Wearables NDX Class Diagram --- %%{init: { - 'theme':'base', - 'themeVariables': { - 'mainBkg':#ffffff - } - + 'theme':'neutral', } }%% classDiagram From 450d102862b40acccd07df5c9786f148f00d30d5 Mon Sep 17 00:00:00 2001 From: Lauren Diaz Date: Wed, 5 Mar 2025 11:46:47 -0500 Subject: [PATCH 6/6] final change back to neutral --- doc/design/wearables_ndx.mmd | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/design/wearables_ndx.mmd b/doc/design/wearables_ndx.mmd index e7b7a99..ed17305 100644 --- a/doc/design/wearables_ndx.mmd +++ b/doc/design/wearables_ndx.mmd @@ -1,10 +1,7 @@ --- title: Wearables NDX Class Diagram --- -%%{init: { - 'theme':'neutral', - } -}%% +%%{init: {'theme':'neutral'}}%% classDiagram direction RL