Skip to content

Commit

Permalink
Merge pull request #89 from bpdanskin/add_reference_tag_w_float
Browse files Browse the repository at this point in the history
added reference tag type
  • Loading branch information
ceesem authored May 24, 2024
2 parents e233d2b + 84d3065 commit 4716fed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions emannotationschemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
BoundBoolWithValid,
BoundTagWithValid,
)
from emannotationschemas.schemas.reference_text_float import (
ReferenceTagFloat,
)

from emannotationschemas.errors import UnknownAnnotationTypeException
from emannotationschemas.flatten import create_flattened_schema
Expand Down Expand Up @@ -111,6 +114,7 @@
"bound_tag_bool_valid": BoundBoolWithValid,
"bound_tag_valid": BoundTagWithValid,
"reference_integer": ReferenceInteger,
"reference_tag_float": ReferenceTagFloat,
}


Expand Down
10 changes: 10 additions & 0 deletions emannotationschemas/schemas/reference_text_float.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import marshmallow as mm
from emannotationschemas.schemas.base import (
ReferenceTagAnnotation,
)

class ReferenceTagFloat(ReferenceTagAnnotation):
value = mm.fields.Float(
required=True, desription="Float value to be attached to the annotation"
)

0 comments on commit 4716fed

Please sign in to comment.