| """ | |
| Quick verification for incremental JavaScript merge script. | |
| This performs a small run with a low JS target so you can validate logic fast. | |
| """ | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| # Ensure imports work when executed from project root. | |
| PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| if str(PROJECT_ROOT) not in sys.path: | |
| sys.path.insert(0, str(PROJECT_ROOT)) | |
| from scripts.add_incremental_javascript_dataset import main as incremental_main # noqa: E402 | |
| if __name__ == "__main__": | |
| try: | |
| sys.argv = [ | |
| "verify_incremental_javascript_merge.py", | |
| "--config", | |
| "configs/component3_incremental_js.yaml", | |
| "--target_new_javascript_examples", | |
| "100", | |
| ] | |
| incremental_main() | |
| print("") | |
| print("Incremental JS merge verification passed.") | |
| except Exception as exc: | |
| print("Incremental JS merge verification failed.") | |
| print(f"What went wrong: {exc}") | |
| print("Fix suggestion: verify dataset accessibility and rerun.") | |
| raise SystemExit(1) | |