rkrsn commited on
Commit
130ea44
·
verified ·
1 Parent(s): 8483497

Delete .github

Browse files
.github/workflows/sync-hf.yml DELETED
@@ -1,47 +0,0 @@
1
- name: Sync to HuggingFace
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- sync:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Checkout
13
- uses: actions/checkout@v4
14
- with:
15
- fetch-depth: 1
16
-
17
- - name: Install huggingface_hub
18
- run: pip install huggingface_hub
19
-
20
- - name: Sync to HuggingFace dataset repo
21
- env:
22
- HF_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
23
- run: |
24
- # Stage README_HF.md as README.md at repo root for HF
25
- cp README_HF.md README.md
26
-
27
- python3 << 'PYEOF'
28
- import os
29
- from huggingface_hub import HfApi
30
-
31
- api = HfApi(token=os.environ["HF_TOKEN"])
32
- api.upload_large_folder(
33
- folder_path=".",
34
- repo_id="ibm-research/ScarfBench",
35
- repo_type="dataset",
36
- ignore_patterns=[
37
- ".git",
38
- ".github",
39
- "README_HF.md",
40
- ".gitignore",
41
- ".pre-commit-config.yaml",
42
- ".secrets.baseline",
43
- "CONTRIBUTING.md",
44
- ],
45
- )
46
- print("Sync complete.")
47
- PYEOF
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.github/workflows/update-release-table.yml DELETED
@@ -1,95 +0,0 @@
1
- name: Update Release Table
2
-
3
- on:
4
- release:
5
- types: [published]
6
-
7
- jobs:
8
- update:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - name: Checkout
12
- uses: actions/checkout@v4
13
-
14
- - name: Add new row to releases table
15
- env:
16
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17
- TAG: ${{ github.event.release.tag_name }}
18
- run: |
19
- python3 << 'PYEOF'
20
- import subprocess, json, re, os
21
-
22
- tag = os.environ["TAG"]
23
-
24
- result = subprocess.run(
25
- ["gh", "release", "view", tag, "--json", "tagName,publishedAt,body"],
26
- capture_output=True, text=True, check=True
27
- )
28
- data = json.loads(result.stdout)
29
-
30
- date = data["publishedAt"][:10]
31
- body = data["body"].strip()
32
-
33
- # Extract first meaningful line, skip code fences and release headers
34
- lines = [
35
- l.strip() for l in body.splitlines()
36
- if l.strip()
37
- and not l.strip().startswith("```")
38
- and not re.match(r'^=+$', l.strip())
39
- and not re.match(r'^Release v', l.strip())
40
- ]
41
- desc = lines[0] if lines else tag
42
-
43
- new_row = f"| [{tag}](https://github.com/scarfbench/benchmark/releases/tag/{tag}) | {date} | {desc} |"
44
-
45
- pattern = r'(\| Version \| Date \| Description \|\n\|[-| ]+\|\n)'
46
- for fname in ["README.md", "README_HF.md"]:
47
- with open(fname) as f:
48
- content = f.read()
49
- new_content = re.sub(pattern, r'\g<1>' + new_row + '\n', content)
50
- with open(fname, "w") as f:
51
- f.write(new_content)
52
-
53
- print(f"Inserted row for {tag}: {desc}")
54
- PYEOF
55
-
56
- - name: Commit updated READMEs
57
- run: |
58
- git config user.email "github-actions[bot]@users.noreply.github.com"
59
- git config user.name "github-actions[bot]"
60
- git add README.md README_HF.md
61
- git diff --cached --quiet && echo "No changes." && exit 0
62
- git commit -m "Add ${{ github.event.release.tag_name }} to releases table [skip ci]"
63
- git push
64
-
65
- - name: Install huggingface_hub
66
- run: pip install huggingface_hub
67
-
68
- - name: Sync to HuggingFace
69
- env:
70
- HF_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
71
- TAG: ${{ github.event.release.tag_name }}
72
- run: |
73
- cp README_HF.md README.md
74
-
75
- python3 << 'PYEOF'
76
- import os
77
- from huggingface_hub import HfApi
78
-
79
- api = HfApi(token=os.environ["HF_TOKEN"])
80
- api.upload_large_folder(
81
- folder_path=".",
82
- repo_id="ibm-research/ScarfBench",
83
- repo_type="dataset",
84
- ignore_patterns=[
85
- ".git",
86
- ".github",
87
- "README_HF.md",
88
- ".gitignore",
89
- ".pre-commit-config.yaml",
90
- ".secrets.baseline",
91
- "CONTRIBUTING.md",
92
- ],
93
- )
94
- print("Sync complete.")
95
- PYEOF