Commit ·
95f672f
1
Parent(s): d1fc9ce
docs: add gitignore
Browse files- .gitignore +2 -1
- PUSH_INSTRUCTIONS.md +0 -125
.gitignore
CHANGED
|
@@ -8,4 +8,5 @@ venv/
|
|
| 8 |
.DS_Store
|
| 9 |
|
| 10 |
.agents
|
| 11 |
-
.uvicorn.log
|
|
|
|
|
|
| 8 |
.DS_Store
|
| 9 |
|
| 10 |
.agents
|
| 11 |
+
.uvicorn.log
|
| 12 |
+
PUSH_INSTRUCTION.md
|
PUSH_INSTRUCTIONS.md
DELETED
|
@@ -1,125 +0,0 @@
|
|
| 1 |
-
# Push Instructions — Musubi
|
| 2 |
-
|
| 3 |
-
Workflow GitHub-first ke Hugging Face Space. Pilih satu opsi sync (manual atau auto via GitHub Actions).
|
| 4 |
-
|
| 5 |
-
> Final QA checklist ada di bagian akhir file ini.
|
| 6 |
-
|
| 7 |
-
---
|
| 8 |
-
|
| 9 |
-
## Section A — Setup GitHub (wajib)
|
| 10 |
-
|
| 11 |
-
```bash
|
| 12 |
-
git init
|
| 13 |
-
git add .
|
| 14 |
-
git commit -m "Initial commit: Musubi v1.0"
|
| 15 |
-
```
|
| 16 |
-
|
| 17 |
-
Buat repo baru di <https://github.com/new>:
|
| 18 |
-
- Repository name: `musubi`
|
| 19 |
-
- Visibility: **public**
|
| 20 |
-
- **Jangan** tambahkan README / .gitignore / license (sudah ada di local)
|
| 21 |
-
|
| 22 |
-
```bash
|
| 23 |
-
git remote add origin https://github.com/<username>/musubi.git
|
| 24 |
-
git branch -M main
|
| 25 |
-
git push -u origin main
|
| 26 |
-
```
|
| 27 |
-
|
| 28 |
-
---
|
| 29 |
-
|
| 30 |
-
## Section B — Setup Hugging Face Space
|
| 31 |
-
|
| 32 |
-
1. Buat Space baru di <https://huggingface.co/new-space>:
|
| 33 |
-
- Owner: `lumicero`
|
| 34 |
-
- Space name: `musubi`
|
| 35 |
-
- SDK: **Docker**
|
| 36 |
-
- Hardware: **CPU basic** (free)
|
| 37 |
-
- Visibility: **public**
|
| 38 |
-
2. Buka tab **Settings → Variables and secrets**.
|
| 39 |
-
3. Tambahkan secret `ENTREZ_EMAIL` dengan value email kamu (dipakai oleh NCBI Entrez API).
|
| 40 |
-
|
| 41 |
-
---
|
| 42 |
-
|
| 43 |
-
## Section C — Opsi 1: Dual remote (manual sync)
|
| 44 |
-
|
| 45 |
-
Cocok kalau update jarang. Push sekali ke GitHub, push sekali ke HF Space.
|
| 46 |
-
|
| 47 |
-
```bash
|
| 48 |
-
git remote add space https://huggingface.co/spaces/lumicero/musubi
|
| 49 |
-
git push space main
|
| 50 |
-
```
|
| 51 |
-
|
| 52 |
-
Untuk update berikutnya:
|
| 53 |
-
|
| 54 |
-
```bash
|
| 55 |
-
git push origin main && git push space main
|
| 56 |
-
```
|
| 57 |
-
|
| 58 |
-
> Catatan: butuh **HF access token** kalau Space private (atau di-block oleh password prompt). Generate di <https://huggingface.co/settings/tokens> (scope **Write**) dan pakai sebagai password saat push pertama. Username adalah HF username.
|
| 59 |
-
|
| 60 |
-
---
|
| 61 |
-
|
| 62 |
-
## Section C — Opsi 2: GitHub Actions auto-sync (recommended)
|
| 63 |
-
|
| 64 |
-
Cocok kalau update sering. Setiap push ke `main` GitHub auto-sync ke HF Space dalam ~30 detik.
|
| 65 |
-
|
| 66 |
-
1. Buat file `.github/workflows/sync-to-hf-space.yml`:
|
| 67 |
-
|
| 68 |
-
```yaml
|
| 69 |
-
name: Sync to Hugging Face Space
|
| 70 |
-
on:
|
| 71 |
-
push:
|
| 72 |
-
branches: [main]
|
| 73 |
-
workflow_dispatch:
|
| 74 |
-
jobs:
|
| 75 |
-
sync:
|
| 76 |
-
runs-on: ubuntu-latest
|
| 77 |
-
steps:
|
| 78 |
-
- uses: actions/checkout@v4
|
| 79 |
-
with:
|
| 80 |
-
fetch-depth: 0
|
| 81 |
-
lfs: true
|
| 82 |
-
- name: Push to HF Space
|
| 83 |
-
env:
|
| 84 |
-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 85 |
-
run: |
|
| 86 |
-
git push --force https://lumicero:$HF_TOKEN@huggingface.co/spaces/lumicero/musubi main
|
| 87 |
-
```
|
| 88 |
-
|
| 89 |
-
2. Buat HF access token (**Write** scope) di <https://huggingface.co/settings/tokens>.
|
| 90 |
-
3. Di GitHub repo: **Settings → Secrets and variables → Actions → New repository secret**. Tambah `HF_TOKEN` dengan value token tersebut.
|
| 91 |
-
4. **Push manual pertama tetap perlu** (pakai Opsi 1) supaya Space tahu branch `main`-nya. Setelah itu Actions take over.
|
| 92 |
-
|
| 93 |
-
---
|
| 94 |
-
|
| 95 |
-
## Section D — Verifikasi
|
| 96 |
-
|
| 97 |
-
1. Buka URL Space: <https://huggingface.co/spaces/lumicero/musubi>
|
| 98 |
-
2. Tunggu build selesai (5–10 menit pertama; rebuild lebih cepat).
|
| 99 |
-
3. Cek **Logs** kalau ada error build.
|
| 100 |
-
4. Tes UI di browser: paste sample abstract, klik Analyze, eksplor graph.
|
| 101 |
-
|
| 102 |
-
---
|
| 103 |
-
|
| 104 |
-
## Final QA checklist
|
| 105 |
-
|
| 106 |
-
Jalankan sebelum push pertama ke HF Space. Cek lokal dulu:
|
| 107 |
-
|
| 108 |
-
```bash
|
| 109 |
-
docker build -t musubi .
|
| 110 |
-
docker run -p 7860:7860 -e ENTREZ_EMAIL=test@example.com musubi
|
| 111 |
-
```
|
| 112 |
-
|
| 113 |
-
Buka <http://localhost:7860> dan verifikasi:
|
| 114 |
-
|
| 115 |
-
- [ ] `/health` responds 200 dengan `model_loaded: true`
|
| 116 |
-
- [ ] `/analyze` dengan 1 abstract returns valid graph
|
| 117 |
-
- [ ] `/analyze` dengan 5 abstract returns valid graph dalam < 30 detik
|
| 118 |
-
- [ ] `/pubmed-search` returns abstracts (dengan `ENTREZ_EMAIL` di-set)
|
| 119 |
-
- [ ] Graph node click highlights neighbors
|
| 120 |
-
- [ ] Edge click opens evidence panel
|
| 121 |
-
- [ ] Confidence slider re-triggers analyze (debounced)
|
| 122 |
-
- [ ] Pair-type filter updates graph instantly (tanpa re-fetch)
|
| 123 |
-
- [ ] Granularity toggle re-triggers analyze
|
| 124 |
-
- [ ] No console errors di browser
|
| 125 |
-
- [ ] Dark theme konsisten di semua component
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|