docs: PostgreSQL compatibility and decimal types for tutorials#138
Closed
dimitri-yatsenko wants to merge 4 commits intomainfrom
Closed
docs: PostgreSQL compatibility and decimal types for tutorials#138dimitri-yatsenko wants to merge 4 commits intomainfrom
dimitri-yatsenko wants to merge 4 commits intomainfrom
Conversation
Change sum(correct) to sum(CASE WHEN correct THEN 1 ELSE 0 END) PostgreSQL doesn't support summing booleans directly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use single quotes for string literals in SQL expressions. PostgreSQL treats double quotes as identifiers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change float32 to decimal for weight, duration, frame_rate - Decimal is more appropriate for manually entered values - Float remains for computed values and measurements Affected tutorials: - 01-first-pipeline: duration in Recording - 03-data-entry: duration in Session - 04-queries: weight in Subject, duration in Session - 06-object-storage: frame_rate in ImagingSession Also fixes: - PostgreSQL boolean aggregation (sum(correct) -> CASE WHEN) - PostgreSQL string quoting (double -> single quotes) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change reaction_time from float32 to decimal(3,2) in all tutorials - Add explicit decimal-to-float conversion in computation code - Decimal values from database need .astype(float) for numpy operations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Member
Author
|
Merged into #137 |
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
decimaltype for human-entered numeric fields (weight, duration, frame_rate)Changes
PostgreSQL Fixes
sum(correct)→sum(CASE WHEN correct THEN 1 ELSE 0 END)Type Improvements
float32todecimalfor manually entered values (weight, duration, frame_rate)floatfor computed values and measurementsDocumentation
heading.secondary_attributes)scripts/execute-notebooks.shfor reproducible notebook executionTest plan
🤖 Generated with Claude Code