Version 0.13
artutils 0.13.0
BREAKING CHANGES
-
Frame Analytics Data Structure Change
-
getAppdata()$artwork$brushesDTrenamed toframe_stats - All code must update references:
r$appdata$artwork$brushesDT→r$appdata$artwork$frame_stats - Reason: Transition from synthetic brush stroke data to real per-frame analytics
- Affected packages: modFrames (PR #19), artpipelines (updated)
-
-
Removed Lenient NULL Handling - Strict Fail-Fast Enforcement
-
..getArtworkStyles()no longer returns empty data.table for missing data - Missing style data now throws immediate errors
- Philosophy: Missing data indicates pipeline failure requiring immediate fix
- Migration: Ensure all artworks have style data before deploying
-
NEW FEATURES
-
Frame Analytics Database Infrastructure
- Added
getFrameAnalytics()- Retrieve 21-column per-frame analytics from database - New
app.artwork_frame_analyticstable with comprehensive temporal, color, and delta metrics - Replaces synthetic
brushes_currydataset with real production data - Columns include: temporal metrics (elapsed_minutes, cumulative_strokes, estimated_bpm), color composition (unique_colors, dominant_hex, color_diversity), delta metrics (colors_added, pixels_added, palette_change_score), and phase detection (technique_phase)
- Added
-
Security Hardening
- Added UUID validation to
getFrameAnalytics()to prevent SQL injection - Uses
artcore::validate_uuid()for strict format validation - Rejects invalid UUIDs before database query execution
- Added UUID validation to
IMPROVEMENTS
-
Fail-Fast Data Integrity
- All artworks now use real frame analytics instead of synthetic data
- Missing frame analytics data throws errors immediately (no silent failures)
- Removed lenient NULL handling from style/analytics functions
- Database FK constraints enforce referential integrity (CASCADE deletes)
TESTING
-
Comprehensive Test Coverage for Frame Analytics
- Added
test-db-frame-analytics.Rwith 6 test suites - SQL injection protection tests (6 test cases)
- Data structure validation (21-column schema verification)
- Monotonic temporal metrics validation
- Edge case testing (frame 1 baseline values)
- Connection parameter testing (with cn and without)
- Added
MIGRATION GUIDE
Update all code referencing frame data:
# BEFORE (Old)
frames <- r$appdata$artwork$brushesDT
# AFTER (New)
frames <- r$appdata$artwork$frame_statsEnsure data pipeline has processed all artworks:
If you see errors about missing frame analytics, run:
artpipelines::createFrameAnalytics(artist, artwork)