Skip to content

Add dataset validator#36

Draft
yazmorukyaz wants to merge 1 commit into
hasaneyldrm:mainfrom
yazmorukyaz:agent/add-dataset-validator
Draft

Add dataset validator#36
yazmorukyaz wants to merge 1 commit into
hasaneyldrm:mainfrom
yazmorukyaz:agent/add-dataset-validator

Conversation

@yazmorukyaz

Copy link
Copy Markdown
Contributor

Summary

Adds a dependency-free Node validator for data/exercises.json and the media folders.

The validator checks:

  • JSON parseability and array shape
  • required exercise fields
  • four-digit unique IDs
  • six-language instructions and instruction_steps coverage
  • secondary_muscles array shape
  • media path format derived from id and media_id
  • exact Gym visual attribution
  • missing and orphan image/GIF files
  • duplicate exercise names as warnings, not failures

Validation

  • node --check scripts/validate-dataset.mjs
  • node scripts/validate-dataset.mjs

Result:

  • 1,324 records
  • 1,324 images
  • 1,324 GIFs
  • 0 missing required fields
  • 0 missing language instructions
  • 0 duplicate IDs
  • 0 missing media files
  • 0 orphan media files
  • 6 duplicate-name warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant