Finish the computing-basics pilot and the local OnCo reference slice.
All checks were successful
synthetic / suite (push) Successful in 56s
All checks were successful
synthetic / suite (push) Successful in 56s
The single-operator pilot keeps static projection. Local OnCo use requires a CC BY-NC origin notice, and the slice stays out of public CI. Assistant: grok Assistant-Session: 01a15378-f601-7fe2-a143-8e1500a1d59c
This commit is contained in:
parent
55f6180b8e
commit
f8c94d3272
33 changed files with 1278 additions and 48 deletions
50
scripts/audit_public_tree.py
Normal file
50
scripts/audit_public_tree.py
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Fail if the public tree contains the OnCo corpus or a redistributed slice."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
FORBIDDEN_TRACKED = (
|
||||
"tests/onco-reference/local/",
|
||||
"tests/onco-reference/authorization.json",
|
||||
"upstream-onco/",
|
||||
)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
problems: list[str] = []
|
||||
tracked = subprocess.run(
|
||||
["git", "ls-files"],
|
||||
cwd=ROOT,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
).stdout.splitlines()
|
||||
for path in tracked:
|
||||
for prefix in FORBIDDEN_TRACKED:
|
||||
if path.startswith(prefix):
|
||||
problems.append(f"tracked licensed path: {path}")
|
||||
if path.startswith("examples/") and path.endswith(".json"):
|
||||
text = (ROOT / path).read_text(encoding="utf-8")
|
||||
if "CC-BY-NC-4.0" in text or "Data from OnCo" in text:
|
||||
problems.append(f"public example carries OnCo rights: {path}")
|
||||
examples = ROOT / "examples" / "dataspaces"
|
||||
for snapshot_path in examples.glob("*/snapshot.json"):
|
||||
snapshot = json.loads(snapshot_path.read_text(encoding="utf-8"))
|
||||
for source in snapshot.get("sources") or []:
|
||||
if source.get("license") == "CC-BY-NC-4.0":
|
||||
problems.append(f"{snapshot_path}: CC-BY-NC source {source.get('id')}")
|
||||
if problems:
|
||||
print("\n".join(problems), file=sys.stderr)
|
||||
return 1
|
||||
print("Public tree has no OnCo slice")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
python3 scripts/validate_fixtures.py
|
||||
python3 scripts/audit_public_tree.py
|
||||
python3 -m unittest discover -s tests -p 'test_*.py'
|
||||
python3 scripts/check_ui_boundary.py
|
||||
python3 scripts/check_ui_provenance.py
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue