Merge pull request #3585 from rommapp/add-test-data-generator

Add test data generator script
This commit is contained in:
Georges-Antoine Assi
2026-06-23 22:16:06 -04:00
committed by GitHub
4 changed files with 1529 additions and 2 deletions

View File

@@ -64,6 +64,7 @@ These live in `.claude/skills/` and carry the detailed rules. Invoke the one tha
**Keep comments short.** Comments should be concise, and focus on the "why" rather than the "what" (the code itself is the "what"). Avoid long paragraphs; break them into multiple lines or sentences.
**Never commit secrets.** Never commit secrets (API keys, passwords, tokens, etc.) to the repo. Use environment variables or secret management tools instead.
**Don't explain a change.** Avoid comments that explain why a change was made to the code. Focus instead on the current behaviour of the code and how it works.
**Python tools live in `backend/tools/`.** Standalone dev/test utilities and scripts (not part of the app runtime) go in `backend/tools/`, not scattered across `backend/`.
---

View File

@@ -1,4 +1,15 @@
# uv run python -m utils.generate_supported_platforms
#!/usr/bin/env python3
"""Print the supported-platforms table (Markdown) for the docs.
Walks every UniversalPlatformSlug, collects each metadata provider's
platform mapping, and emits a Markdown table (with provider link icons) to
stdout for pasting into the documentation.
Run from the backend directory:
uv run python -m tools.generate_supported_platforms
"""
from typing import TypedDict
from urllib.parse import quote

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,15 @@
#!/usr/bin/env python3
"""Diagnose a malformed XML file: bad encoding, invalid chars, parse errors.
Reads the file in chunks to surface UTF-8 issues, then runs SAX and
ElementTree parsing to report the location of structural errors, with a few
lines of context around each one.
Run from the backend directory:
uv run tools/xml_diagnostics.py <xml_file>
"""
import sys
from xml.sax.handler import ContentHandler # nosec
@@ -79,6 +91,6 @@ def diagnose_xml(filename):
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python script.py <xml_file>")
print("Usage: uv run tools/xml_diagnostics.py <xml_file>")
sys.exit(1)
diagnose_xml(sys.argv[1])