Skip to content

Commit e3f5b2f

Browse files
authored
feat: add slap2 acquisition types (moved from aind-data-schema) (#270)
* feat: add slap2 acquisition types (moved from aind-data-schema) * tests: coverage on new model
1 parent 4dd4b0a commit e3f5b2f

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name
2+
full-field raster scan
3+
multi-roi raster scan
4+
band scan
5+
integration scan
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""Stimulus modalities"""
2+
{% raw -%}
3+
from enum import Enum
4+
{% endraw %}
5+
6+
class Slap2AcquisitionType(str, Enum):
7+
"""Stimulus modalities"""
8+
{% for _, row in data.iterrows() %}
9+
{{ row['name'] | to_class_name | upper }} = "{{ row['name'] }}"
10+
{%- endfor %}
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""Stimulus modalities"""
2+
3+
from enum import Enum
4+
5+
6+
class Slap2AcquisitionType(str, Enum):
7+
"""Stimulus modalities"""
8+
9+
BAND_SCAN = "band scan"
10+
FULL_FIELD_RASTER_SCAN = "full-field raster scan"
11+
INTEGRATION_SCAN = "integration scan"
12+
MULTI_ROI_RASTER_SCAN = "multi-roi raster scan"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""Tests classes in slap2_acquisition_type module"""
2+
3+
import unittest
4+
5+
from aind_data_schema_models.slap2_acquisition_type import Slap2AcquisitionType
6+
7+
8+
class TestSlap2AcquisitionType(unittest.TestCase):
9+
"""Tests methods in Slap2AcquisitionType class"""
10+
11+
def test_class_construction(self):
12+
"""Tests enum can be instantiated via string"""
13+
14+
self.assertEqual(Slap2AcquisitionType.BAND_SCAN, Slap2AcquisitionType("band scan"))
15+
16+
17+
if __name__ == "__main__":
18+
unittest.main()

0 commit comments

Comments
 (0)