From dbb688906aa7fb262bd47236c96cbed93778250a Mon Sep 17 00:00:00 2001 From: jtyoung84 <104453205+jtyoung84@users.noreply.github.com> Date: Wed, 8 May 2024 09:32:38 -0700 Subject: [PATCH] feat: adds data enums --- .../data_name_patterns.py | 67 +++++++++++++++++++ tests/test_data_name_patterns.py | 39 +++++++++++ 2 files changed, 106 insertions(+) create mode 100644 src/aind_data_schema_models/data_name_patterns.py create mode 100644 tests/test_data_name_patterns.py diff --git a/src/aind_data_schema_models/data_name_patterns.py b/src/aind_data_schema_models/data_name_patterns.py new file mode 100644 index 0000000..c650105 --- /dev/null +++ b/src/aind_data_schema_models/data_name_patterns.py @@ -0,0 +1,67 @@ +"""Module for defining our data naming conventions""" + +from datetime import datetime +from enum import Enum + + +class RegexParts(str, Enum): + """Regular expression components to be re-used elsewhere""" + + DATE = r"\d{4}-\d{2}-\d{2}" + TIME = r"\d{2}-\d{2}-\d{2}" + + +class DataRegex(str, Enum): + """Regular expression patterns for different kinds of data and their properties""" + + DATA = f"^(?P