diff options
| author | Munyoki Kilyungi | 2025-06-23 15:01:55 +0300 |
|---|---|---|
| committer | BonfaceKilz | 2025-07-07 07:58:31 +0300 |
| commit | 862ba4970295c8c7c661d7095451ae5a01760758 (patch) | |
| tree | 6c39a6a61a36aefc007a8b56510693de7e989f0f /gn3/case_attributes.py | |
| parent | cab825799d4638a094f081355c0c4cee4e86d9c7 (diff) | |
| download | genenetwork3-862ba4970295c8c7c661d7095451ae5a01760758.tar.gz | |
Add CaseAttributeEdit dataclass for inbredset_id, user_id, diff.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/case_attributes.py')
| -rw-r--r-- | gn3/case_attributes.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gn3/case_attributes.py b/gn3/case_attributes.py index 7c84890..099b9cc 100644 --- a/gn3/case_attributes.py +++ b/gn3/case_attributes.py @@ -4,6 +4,7 @@ import csv import json import uuid import tempfile +from dataclasses import dataclass from typing import Union from enum import Enum, auto from pathlib import Path @@ -33,6 +34,14 @@ caseattr = Blueprint("case-attribute", __name__) CATTR_DIFFS_DIR = "case-attribute-diffs" + +@dataclass +class CaseAttributeEdit: + inbredset_id: int + user_id: str + diff: dict + + class NoDiffError(ValueError): """Raised if there is no difference between the old and new data.""" def __init__(self): |
