Implement Forge repository foundation
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Validate implemented canonical skill packages."""
|
||||
from importlib.machinery import SourceFileLoader
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
installer = SourceFileLoader('forge_installer', str(Path(__file__).with_name('install-skills.py'))).load_module()
|
||||
errors = []
|
||||
for path in installer.discover():
|
||||
try:
|
||||
installer.manifest(path)
|
||||
installer.safe_source(path)
|
||||
print(f'VALID: {path.name}')
|
||||
except (ValueError, UnicodeError) as exc:
|
||||
errors.append(str(exc))
|
||||
for error in errors:
|
||||
print(f'INVALID: {error}', file=sys.stderr)
|
||||
print(f'{len(installer.discover()) - len(errors)} implemented skill(s); {len(installer.RESERVED - {p.name for p in installer.discover()})} reserved')
|
||||
sys.exit(bool(errors))
|
||||
Reference in New Issue
Block a user