Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds new proofreading schema #72

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions emannotationschemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
CompartmentProofreadStatus,
ProofreadStatus,
ProofreadingBoolStatusUser,
CompartmentProofreadStatusReference,
GeneralProofreadStatusReference
)
from emannotationschemas.schemas.neuropil import FlyNeuropil
from emannotationschemas.schemas.groups import SimpleGroup
Expand Down Expand Up @@ -84,6 +86,8 @@
"derived_numeric_value": DerivedNumeric,
"proofread_status": ProofreadStatus,
"compartment_proofread_status": CompartmentProofreadStatus,
"compartment_proofread_status_reference": CompartmentProofreadStatusReference,
"general_proofread_status_reference": GeneralProofreadStatusReference,
"proofreading_boolstatus_user": ProofreadingBoolStatusUser,
"fly_neuropil": FlyNeuropil,
"reference_point": FlatSegmentationReferenceSinglePoint,
Expand Down
31 changes: 31 additions & 0 deletions emannotationschemas/schemas/proofreading.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
AnnotationSchema,
BoundSpatialPoint,
NumericField,
ReferenceAnnotation
)
from marshmallow import fields, validate

Expand Down Expand Up @@ -54,3 +55,33 @@ class ProofreadingBoolStatusUser(ProofreadingBoolStatus):
required=True,
description="User who assessed the proofreading status.",
)

class CompartmentProofreadStatusReference(ReferenceAnnotation):
user_id = fields.Int(
required=False,
description="User who assessed the proofreading status.",
)
status_dendrite = fields.String(
required=True,
validate=validate.OneOf(proofread_choices),
description=f"Proofread status of the dendrite only. {options_text}",
)
status_axon = fields.String(
required=True,
validate=validate.OneOf(proofread_choices),
description=f"Proofread status of the axon only. {options_text}",
)

class GeneralProofreadStatusReference(ReferenceAnnotation):
user_id = fields.Int(
required=False,
description="User who assessed the proofreading status.",
)
status_dendrite = fields.String(
required=True,
description=f"Proofread status of the dendrite only. Can be any string.",
)
status_axon = fields.String(
required=True,
description=f"Proofread status of the axon only. Can be any string.",
)