Skip to contents

artutils 0.11.0

New Features

  • Batch Benchmark Calculation: Added updateArtistBenchmarks() for efficient batch recalculation
    • Replaces N individual calculations with single batch operation
    • Integrated into artwork upload pipeline via artpipelines::updateArtistData()
    • Uses transaction-wrapped DELETE + INSERT for atomicity
    • Comprehensive logging for debugging and observability
  • Database-First Benchmark Reading: getAppdata() now reads from artwork_benchmark table
    • 10-20x performance improvement (5ms vs 50-100ms per artwork)
    • Graceful fallback to dynamic calculation when DB data unavailable
    • Eliminates duplicate getArtistBenchmarks() calls

Internal Functions

  • Added .parseBenchmarkRow() helper to convert DB rows to benchmark structure
    • Handles NA values with sensible defaults (50 for scores, “low” for confidence)
    • Returns empty numeric(5) for components (DB stores only summary scores)
    • Comprehensive input validation and logging

Performance Notes

  • Known Issue: updateArtistBenchmarks() has N+1 query pattern (documented in code)
    • Each calcArtworkBenchmarks() call queries artwork_stats independently
    • For 50 artworks = 50 duplicate queries
    • TODO: Refactor to fetch once and pass to calc function
    • Current implementation prioritizes code reuse over query optimization

Bug Fixes

  • Restored URL and BugReports fields to DESCRIPTION (removed by automated check)
  • Fixed codecov.io redirect in README.md badges
  • Updated .Rbuildignore to exclude README.md from build warnings

Documentation

  • Added comprehensive roxygen2 docs for updateArtistBenchmarks()
  • Documented N+1 query issue with TODO for future optimization
  • Added CHECK_FIX_REPORT.md and CHECK_SUMMARY.md for R CMD check results

Testing

  • 274/274 tests passing (100% pass rate)
  • Added comprehensive test coverage for new functions
  • R CMD check: 0 errors, 0 warnings, 0 notes