fix: Allow table class names with underscores (with warning)#1375
Merged
dimitri-yatsenko merged 1 commit intomasterfrom Feb 3, 2026
Merged
fix: Allow table class names with underscores (with warning)#1375dimitri-yatsenko merged 1 commit intomasterfrom
dimitri-yatsenko merged 1 commit intomasterfrom
Conversation
1fa3089 to
c6b882a
Compare
For table class names containing underscores: 1. Emit a warning about underscores 2. Remove underscores 3. Proceed with normal CamelCase validation This restores compatibility with legacy schemas that use names like MouseScoreSheet_BodyCondition. Also adds "fetch" to supported_class_attrs for class-level access. Fixes compatibility for users migrating from DataJoint <= 0.14.1. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
c6b882a to
0330dbe
Compare
esutlie
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
For table class names containing underscores:
This restores compatibility with legacy schemas that use names like
MouseScoreSheet_BodyCondition.Also adds
fetchtosupported_class_attrsso it works as a class method (like in 0.14.x).Changes
from_camel_case(): warn if underscores, remove them, then validatetable.declare(): same logic for early validationfetchtosupported_class_attrsTest plan
test_from_camel_casepasses (warns + errors for invalid names with underscores)test_table_name_with_underscorespasses (table created successfully with warning)MouseScoreSheet_BodyCondition→mouse_score_sheet_body_condition🤖 Generated with Claude Code