datajoint / datajoint-matlab

Relational data pipelines for the science lab
MIT License
42 stars 37 forks source link

Incorrect parsing of `attribute`'s type - incorrectly read from the comments #335

Closed ttngu207 closed 3 years ago

ttngu207 commented 3 years ago

using .getSchema() on an existing table with the following definition:

@schema
class ProbeAdjustment(dj.Manual):
    definition = """
    -> ProbeInsertion
    adjustment_time: datetime
    ---
    -> [nullable] Session
    -> reference.Experimenter
    estimated_depth_change=null:    float  # (um) positive: moving more dorsal (shallower), negative: moving more ventral (deeper)
    adjustment :                    varchar(128)  # new depth (ideally)
    """

this error occurred:

Error using dj.internal.Declare.matchType (line 417)
UnsupportedType: Attribute type ' moving more dorsal (shallower), negative' is not a valid
type.
ttngu207 commented 3 years ago

Corresponding code-block from MATLAB: https://github.com/datajoint/datajoint-matlab/blob/892f736dd5ea6971f63334fa839e60f8d52a8f66/%2Bdj/%2Binternal/Declare.m#L158

and from Python: https://github.com/datajoint/datajoint-python/blob/d97fe71f296ed719604c9645ff723dc47da1b06b/datajoint/declare.py#L88