Rename script for consistency

This commit is contained in:
Henry Mercer
2025-09-10 18:12:20 +01:00
parent f537110285
commit d9bc711b1c
4 changed files with 7 additions and 9 deletions

View File

@@ -77,7 +77,7 @@ jobs:
cd pr-checks
python -m pip install --upgrade pip
pip install ruamel.yaml==0.17.31
python3 sync-back.py
python3 sync_back.py
python3 sync.py
- name: "Merge in progress: Finish merge and push"

View File

@@ -27,10 +27,10 @@ To sync action versions from generated workflows back to source templates:
```bash
# Dry run to see what would be changed
python3 pr-checks/sync-back.py --dry-run --verbose
python3 pr-checks/sync_back.py --dry-run --verbose
# Actually apply the changes
python3 pr-checks/sync-back.py
python3 pr-checks/sync_back.py
```
The sync-back script automatically updates:

View File

@@ -1,22 +1,20 @@
#!/usr/bin/env python3
"""
Tests for the sync-back.py script
Tests for the sync_back.py script
"""
import os
import tempfile
import shutil
import unittest
from pathlib import Path
from unittest.mock import patch
import sys
import tempfile
import unittest
# Add the current directory to sys.path and import the sync_back module
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
# Import the sync-back module
import importlib.util
spec = importlib.util.spec_from_file_location("sync_back", os.path.join(os.path.dirname(__file__), "sync-back.py"))
spec = importlib.util.spec_from_file_location("sync_back", os.path.join(os.path.dirname(__file__), "sync_back.py"))
sync_back = importlib.util.module_from_spec(spec)
spec.loader.exec_module(sync_back)