Compare commits

...

2 Commits

Author SHA1 Message Date
Korbinian Slavik 7f3db170af fix: add repo_manifest.json — correct projects_root and access_control paths 2026-04-08 13:48:52 +02:00
VSlavik1 1d81a4778d init: integrate MusicOCR workspace base 2026-04-08 11:31:55 +00:00
4 changed files with 104 additions and 0 deletions

25
.github/workflows/backup.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Backup Data Repo
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * *"
jobs:
backup:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
lfs: true
- name: Create archive
run: |
tar -czf musicocr-data-repo.tgz projects campaigns manifests .gitattributes
- name: Upload archive artifact
uses: actions/upload-artifact@v4
with:
name: musicocr-data-repo-backup
path: musicocr-data-repo.tgz

44
.github/workflows/validate.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Validate Data Repo
on:
push:
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Validate JSON files
run: |
python - <<'PY'
import json
from pathlib import Path
json_files = list(Path(".").rglob("*.json"))
bad = []
for path in json_files:
try:
json.loads(path.read_text(encoding="utf-8"))
except Exception as exc:
bad.append(f"{path}: {exc}")
if bad:
raise SystemExit("Invalid JSON files:\n" + "\n".join(bad))
print(f"Validated {len(json_files)} JSON files.")
PY
- name: Check required top-level folders
run: |
test -d projects
test -d manifests

View File

@ -0,0 +1,31 @@
{
"schema_version": "1.0",
"users": {
"admin@example.org": {
"role": "admin",
"github_logins": ["komisla"],
"all_projects": true,
"can_create_projects": true
},
"reviewer@example.org": {
"role": "viewer",
"projects": [
{
"name": "Bach-Singet-dem-Herrn",
"access": "read"
}
]
},
"annotator@example.org": {
"role": "editor",
"projects": [
{
"name": "Bach-Singet-dem-Herrn",
"access": "write",
"pages": [1, 2, 3],
"sections": ["alto", "tenor"]
}
]
}
}
}

View File

@ -0,0 +1,4 @@
{
"schema_version": "1.0",
"users": {}
}