Skip to content

Add challenge structure validator - #311

Open
this-AR wants to merge 1 commit into
AlphaGPU:mainfrom
this-AR:tooling/validate-challenge-structure
Open

Add challenge structure validator#311
this-AR wants to merge 1 commit into
AlphaGPU:mainfrom
this-AR:tooling/validate-challenge-structure

Conversation

@this-AR

@this-AR this-AR commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Adds a reusable challenge validation script and wires it into CI.

The new scripts/validate_challenges.py checks challenge structure without importing runtime dependencies like PyTorch, CUDA, or JAX. It uses Python AST parsing to validate challenge metadata and required methods, making it safe to run in lightweight CI environments.

What Changed

  • Added scripts/validate_challenges.py
  • Replaced the inline duplicate-index GitHub Action logic with the validator
  • Documented the validation command in CONTRIBUTING.md
  • Cleaned up minor README / CONTRIBUTING encoding and formatting issues

Validation Covered

The script checks:

  • required files: challenge.py, challenge.html
  • duplicate challenge IDs
  • challenge directory naming
  • required Challenge metadata fields
  • required challenge methods
  • supported starter filenames
  • missing starter templates as warnings by default

Testing

Ran locally:

python scripts/validate_challenges.py
python -m black --check --diff scripts/validate_challenges.py
python -m py_compile scripts/validate_challenges.py
git diff --check

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