Skip to content

Commit 829fb70

Browse files
committed
fix: fixed paper manager
1 parent 6210b31 commit 829fb70

File tree

19 files changed

+4777
-4
lines changed

19 files changed

+4777
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ jobs:
5656
- name: Render README and docs from database
5757
run: python view/render_from_db.py
5858

59+
- name: Export database to static admin JSON
60+
run: python scripts/export_admin_json.py
61+
5962
- name: Build MkDocs site
6063
run: mkdocs build
6164

docs/admin/data.json

Lines changed: 3651 additions & 0 deletions
Large diffs are not rendered by default.

docs/admin/index.html

Lines changed: 469 additions & 0 deletions
Large diffs are not rendered by default.

docs/admin/index.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Admin Interface
2+
3+
<div class="admonition info" markdown="1">
4+
5+
The **Admin Interface** is a local web application that runs on your own machine. It cannot be hosted on GitHub Pages because it requires a live database and Python backend.
6+
7+
</div>
8+
9+
## What it does
10+
11+
The admin panel (served by Flask at `http://localhost:5000/admin`) provides:
12+
13+
- **Browse & search** all 196+ papers, datasets, and methods
14+
- **Inline editing** — click any cell to edit it directly in the table
15+
- **Add new entries** with arXiv auto-fill (paste an arXiv URL to auto-populate metadata)
16+
- **Multi-select export** — select papers and export as CSV or copy links for NotebookLM
17+
- **Sync & build** — export DB → YAML/CSV, or rebuild the static documentation site
18+
19+
## How to run it locally
20+
21+
```bash
22+
# 1. Clone the repository
23+
git clone https://github.com/DeepSoftwareAnalytics/Awesome-Issue-Resolution.git
24+
cd Awesome-Issue-Resolution
25+
26+
# 2. Install dependencies
27+
pip install -r requirements.txt
28+
29+
# 3. Start the admin server
30+
# (automatically refreshes news, re-renders docs, and builds the site)
31+
python start.py
32+
```
33+
34+
Then open **[http://localhost:5000/admin](http://localhost:5000/admin)** in your browser.
35+
36+
## Quick reference
37+
38+
| Command | Description |
39+
|---------|-------------|
40+
| `python start.py` | Full update + start server (port 5000) |
41+
| `python start.py --init` | Re-import from YAML/CSV, then full update + start |
42+
| `python start.py --no-update` | Start server immediately without update steps |
43+
| `python start.py --news` | Refresh "This Month's Papers" only |
44+
| `python start.py --render` | Re-render README/docs from DB only |
45+
| `python start.py --build` | Build static site only |
46+
47+
## Looking for the paper database?
48+
49+
Use the **[Tables & Resources](../tables/)** page to browse statistical tables, or the **[Full Paper List](../#-complete-paper-list)** in the main page.
50+
51+
To search and export papers interactively, run the admin locally as described above.

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ exclude_docs: |
5353
images/README.md
5454
**/README.md
5555
56+
# Copy admin HTML and generated JSON as-is (not processed as markdown)
57+
hooks: []
58+
5659
plugins:
5760
- search
5861

@@ -72,5 +75,6 @@ nav:
7275
- Home: index.md
7376
- Paper: paper.md
7477
- Tables & Resources: tables.md
78+
- Admin: admin/index.md
7579
- About: about.md
7680
- Cite: cite.md

scripts/export_admin_json.py

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Export the database to docs/admin/data.json for the static admin page.
4+
Run automatically during CI before mkdocs build.
5+
6+
Usage:
7+
python scripts/export_admin_json.py
8+
"""
9+
import sys
10+
import json
11+
import os
12+
from pathlib import Path
13+
from datetime import date
14+
15+
ROOT = Path(__file__).resolve().parents[1]
16+
sys.path.insert(0, str(ROOT))
17+
18+
if sys.platform == 'win32':
19+
os.system('chcp 65001 >nul 2>&1')
20+
sys.stdout.reconfigure(encoding='utf-8')
21+
22+
from models import Paper, Dataset, TrainingDataset, SFTMethod, RLMethod, FoundationModel, get_session
23+
24+
OUT_PATH = ROOT / 'docs' / 'admin' / 'data.json'
25+
26+
27+
def export():
28+
session = get_session()
29+
30+
papers = []
31+
for p in session.query(Paper).order_by(Paper.month.desc().nullslast(), Paper.id.desc()).all():
32+
links = {}
33+
if p.arxiv_link: links['arxiv'] = p.arxiv_link
34+
if p.github_link: links['github'] = p.github_link
35+
if p.huggingface_link: links['huggingface'] = p.huggingface_link
36+
if p.openreview_link: links['openreview'] = p.openreview_link
37+
if p.website_link: links['website'] = p.website_link
38+
if p.doi_link: links['doi'] = p.doi_link
39+
papers.append({
40+
'id': p.id,
41+
'short_name': p.short_name or '',
42+
'title': p.title or '',
43+
'authors': p.authors or '',
44+
'venue': p.venue or '',
45+
'month': p.month or '',
46+
'category': p.category or '',
47+
'links': links,
48+
})
49+
50+
datasets = []
51+
for d in session.query(Dataset).order_by(Dataset.name).all():
52+
links = {}
53+
if d.github_link: links['github'] = d.github_link
54+
if d.huggingface_link: links['huggingface'] = d.huggingface_link
55+
if d.website_link: links['website'] = d.website_link
56+
datasets.append({
57+
'id': d.id,
58+
'name': d.name or '',
59+
'language': d.language or '',
60+
'multimodal': d.multimodal or '',
61+
'environment': d.environment or '',
62+
'repos': d.repos or '',
63+
'amount': d.amount or '',
64+
'category': d.category or '',
65+
'links': links,
66+
})
67+
68+
training = []
69+
for t in session.query(TrainingDataset).order_by(TrainingDataset.name).all():
70+
links = {}
71+
if t.github_link: links['github'] = t.github_link
72+
if t.huggingface_link: links['huggingface'] = t.huggingface_link
73+
training.append({
74+
'id': t.id,
75+
'name': t.name or '',
76+
'language': t.language or '',
77+
'repos': t.repos or '',
78+
'amount': t.amount or '',
79+
'links': links,
80+
})
81+
82+
sft = []
83+
for m in session.query(SFTMethod).order_by(SFTMethod.resolution_percent.desc().nullslast()).all():
84+
links = {}
85+
if m.code_link: links['github'] = m.code_link
86+
if m.model_link: links['huggingface'] = m.model_link
87+
sft.append({
88+
'id': m.id,
89+
'model_name': m.model_name or '',
90+
'base_model': m.base_model or '',
91+
'training_scaffold': m.training_scaffold or '',
92+
'resolution_percent': str(m.resolution_percent) if m.resolution_percent is not None else '',
93+
'links': links,
94+
})
95+
96+
rl = []
97+
for m in session.query(RLMethod).order_by(RLMethod.resolution_percent.desc().nullslast()).all():
98+
links = {}
99+
if m.code_link: links['github'] = m.code_link
100+
if m.model_link: links['huggingface'] = m.model_link
101+
rl.append({
102+
'id': m.id,
103+
'model_name': m.model_name or '',
104+
'size': m.size or '',
105+
'architecture': m.architecture or '',
106+
'training_scaffold': m.training_scaffold or '',
107+
'reward_type': m.reward_type or '',
108+
'resolution_percent': str(m.resolution_percent) if m.resolution_percent is not None else '',
109+
'links': links,
110+
})
111+
112+
foundation = []
113+
for m in session.query(FoundationModel).order_by(FoundationModel.resolution_percent.desc().nullslast()).all():
114+
links = {}
115+
if m.code_link: links['github'] = m.code_link
116+
if m.model_link: links['huggingface'] = m.model_link
117+
foundation.append({
118+
'id': m.id,
119+
'model_name': m.model_name or '',
120+
'size': m.size or '',
121+
'architecture': m.architecture or '',
122+
'inference_scaffold': m.inference_scaffold or '',
123+
'reward_type': m.reward_type or '',
124+
'resolution_percent': str(m.resolution_percent) if m.resolution_percent is not None else '',
125+
'links': links,
126+
})
127+
128+
session.close()
129+
130+
# Category counts from papers
131+
from collections import Counter
132+
DATA_CATS = {'evaluation_datasets','training_datasets','data_collection','data_synthesis'}
133+
METHODS_CATS = {'sft','rl','single_agent','multi_agent','tool','workflow','memory','inference_scaling'}
134+
ANALYSIS_CATS = {'data_analysis','methods_analysis'}
135+
136+
def count_cat(cat_set):
137+
return sum(1 for p in papers if {t.strip() for t in p['category'].split(',') if t.strip()} & cat_set)
138+
139+
data = {
140+
'generated': date.today().isoformat(),
141+
'stats': {
142+
'total': len(papers),
143+
'data': count_cat(DATA_CATS),
144+
'methods': count_cat(METHODS_CATS),
145+
'analysis': count_cat(ANALYSIS_CATS),
146+
},
147+
'papers': papers,
148+
'datasets': datasets,
149+
'training_datasets': training,
150+
'sft_methods': sft,
151+
'rl_methods': rl,
152+
'foundation_models': foundation,
153+
}
154+
155+
OUT_PATH.parent.mkdir(parents=True, exist_ok=True)
156+
OUT_PATH.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding='utf-8')
157+
print(f'[OK] Exported {len(papers)} papers, {len(datasets)} datasets, '
158+
f'{len(sft)+len(rl)} methods → {OUT_PATH.relative_to(ROOT)}')
159+
160+
161+
if __name__ == '__main__':
162+
export()

site/404.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,25 @@
316316

317317

318318

319+
<li class="md-tabs__item">
320+
<a href="/Awesome-Issue-Resolution/admin/" class="md-tabs__link">
321+
322+
323+
324+
325+
326+
Admin
327+
328+
</a>
329+
</li>
330+
331+
332+
333+
334+
335+
336+
337+
319338
<li class="md-tabs__item">
320339
<a href="/Awesome-Issue-Resolution/about/" class="md-tabs__link">
321340

@@ -489,6 +508,33 @@
489508

490509

491510

511+
<li class="md-nav__item">
512+
<a href="/Awesome-Issue-Resolution/admin/" class="md-nav__link">
513+
514+
515+
516+
<span class="md-ellipsis">
517+
518+
519+
Admin
520+
521+
522+
523+
</span>
524+
525+
526+
527+
</a>
528+
</li>
529+
530+
531+
532+
533+
534+
535+
536+
537+
492538
<li class="md-nav__item">
493539
<a href="/Awesome-Issue-Resolution/about/" class="md-nav__link">
494540

site/about/index.html

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<link rel="canonical" href="https://DeepSoftwareAnalytics.github.io/Awesome-Issue-Resolution/about/">
1414

1515

16-
<link rel="prev" href="../tables/">
16+
<link rel="prev" href="../admin/">
1717

1818

1919
<link rel="next" href="../cite/">
@@ -326,6 +326,25 @@
326326

327327

328328

329+
330+
<li class="md-tabs__item">
331+
<a href="../admin/" class="md-tabs__link">
332+
333+
334+
335+
336+
337+
Admin
338+
339+
</a>
340+
</li>
341+
342+
343+
344+
345+
346+
347+
329348

330349

331350

@@ -500,6 +519,33 @@
500519

501520

502521

522+
523+
524+
<li class="md-nav__item">
525+
<a href="../admin/" class="md-nav__link">
526+
527+
528+
529+
<span class="md-ellipsis">
530+
531+
532+
Admin
533+
534+
535+
536+
</span>
537+
538+
539+
540+
</a>
541+
</li>
542+
543+
544+
545+
546+
547+
548+
503549

504550

505551

0 commit comments

Comments
 (0)