diff options
Diffstat (limited to 'gn3/db')
-rw-r--r-- | gn3/db/traits.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gn3/db/traits.py b/gn3/db/traits.py index 6c6118a..d315eb9 100644 --- a/gn3/db/traits.py +++ b/gn3/db/traits.py @@ -1,10 +1,17 @@ """This contains all the necessary functions that are required to add traits to the published database""" -from collections import namedtuple from typing import Any, Dict, Optional +from dataclasses import dataclass -riset = namedtuple('riset', ['name', 'id']) +@dataclass(frozen=True) +class riset: + """Class for keeping track of riset. A riset is a group e.g. rat HSNIH-Palmer, +BXD + + """ + name: str + r_id: int def get_riset(data_type: str, name: str, conn: Any): |