dda793c0ef
- Introduced `kicad_cli.sh` for local and Docker-based kicad-cli execution. - Created `schops.py` for schematic operations including ERC, BOM, netlist exports, and bulk edits. - Added README.md for schops with installation and usage instructions. - Included requirements.txt for necessary Python packages. - Implemented rules engine for applying field defaults and renaming nets. - Added tests for rules engine functionality. - Introduced scope guard script to enforce file modification policies based on PR labels. - Created watch script to monitor KiCad files and trigger hardware gate on changes.
21 lines
670 B
Python
21 lines
670 B
Python
#!/usr/bin/env python3
|
|
"""Switch active compliance profile."""
|
|
from pathlib import Path
|
|
import argparse
|
|
from tools.compliance.common import repo_path, save_yaml
|
|
|
|
def main():
|
|
ap = argparse.ArgumentParser()
|
|
ap.add_argument("profile", help="Profile name (e.g., prototype, iot_wifi_eu)")
|
|
args = ap.parse_args()
|
|
|
|
p = repo_path(f"compliance/profiles/{args.profile}.yaml")
|
|
if not p.exists():
|
|
raise SystemExit(f"ERROR: unknown profile: {args.profile} (missing {p})")
|
|
|
|
save_yaml(repo_path("compliance/active_profile.yaml"), {"profile": args.profile})
|
|
print(f"Active compliance profile = {args.profile}")
|
|
|
|
if __name__ == "__main__":
|
|
main()
|