datajoint-python
datajoint-python copied to clipboard
schema name should not allow "upper-case"
A schema name with upper-case letter in it will result in incorrect behavior when referenced by another schema. Note: no error thrown
Quick example:
schema = dj.schema('Schema_A')
@schema
class Subject(dj.Manual)
definition = """
name: varchar(32)
"""
schema = dj.schema('schema_b')
@schema
class Recording(dj.Manual)
definition = """
-> Schema_A.Subject
id: smallint
"""
Here, schema_b.Recording
will not be able to reference Schema_A.Subject
properly.
@ttngu207 Hmm, for this one I am a bit unclear what you mean by
schema_b.Recording
will not be able to referenceSchema_A.Subject
properly
How about like this?
schema1 = dj.Schema('Schema_A')
@schema1
class Subject(dj.Manual):
definition = """
name: varchar(32)
"""
Schema_A = dj.VirtualModule('Schema_A', 'Schema_A')
schema2 = dj.Schema('schema_b')
@schema2
class Recording(dj.Manual):
definition = """
-> Schema_A.Subject
id: smallint
"""
schema2.drop()
schema1.drop()
In PR #893, I've added a test for this specific example.