Skip to content

Commit 45956bc

Browse files
committed
v2.0.4 - DOI-determinative dedup + uncertain-pair review moved to Smart Merge step
- Smart Merge: records with different normalized DOIs are never the same publication. Enforced in the matching negative rule, in the borderline listing (list_borderline), and at the apply step (decide_borderline), so such pairs are never auto-merged nor shown for manual review — even for legacy/pre-fix borderline queues. - Uncertain ("borderline") pair review moved from the Filter step to the Smart Merge step as a Yes/No gate: warn that some pairs need manual review, review on demand, then "save & complete" the merge; or complete directly. - Rewrote all Python module docstrings in English; removed academic citations from file headers. - Removed dead, never-rendered merge-page components and their now-unused imports; added Smart Merge DOI tests (doi_conflict + Stage-4 guard).
1 parent aef8258 commit 45956bc

51 files changed

Lines changed: 491 additions & 929 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/api/jobs/runner.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
"""Basit, tek-kullanıcılı job runner.
1+
"""Simple, single-user job runner.
22
3-
- Tek aktif iş + sıralı kuyruk (self-hosted için yeterli)
4-
- Bellekte log + progress; opsiyonel olarak proje klasörüne persist
5-
- SSE üzerinden canlı stream
3+
Runs background jobs as asyncio tasks with in-memory state, log, and progress
4+
tracking, streamed live to clients over SSE. Provides per-project exclusivity to
5+
prevent overlapping heavy jobs and a dedicated thread pool for cancellable
6+
CPU-bound work so the rest of the app stays responsive.
67
"""
78

89
from __future__ import annotations

apps/api/main.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
"""BibexPy v2 — FastAPI uygulama girişi.
1+
"""BibexPy FastAPI application entry point.
22
3-
Geliştirme:
4-
cd apps/api && python -m uvicorn main:app --reload --port 8001
5-
cd apps/web && npm run dev # ayrı terminal
6-
7-
Backend tüm router'ları `/api/` prefix altında mount eder; bu, ileride
8-
frontend ile aynı host'tan serve edilse bile URL çakışmasını önler.
9-
10-
`_frontend_root()` — opsiyonel statik UI mount (varsa). Geliştirmede
11-
genelde frontend ayrı çalıştığı için `None` döner ve devre dışı kalır.
3+
Builds the FastAPI app, configures CORS, and mounts all API routers under
4+
the ``/api`` prefix. Optionally serves the static frontend export when one
5+
is present, otherwise runs in API-only mode.
126
"""
137

148
from __future__ import annotations

apps/api/routers/audit.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
"""Audit log endpoint'leri."""
1+
"""API endpoints for project audit logs.
2+
3+
Provides routes to list, summarize, append, and clear audit entries for a
4+
project, plus a Markdown report export. Entries are scoped to the project's
5+
currently active analysis.
6+
"""
27

38
from __future__ import annotations
49

apps/api/routers/downloads.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
"""Üretilen dosyalar için genel indirme endpoint'i."""
1+
"""Generic file download endpoint for generated project artifacts.
2+
3+
Serves files from an allow-listed set of project subfolders (raw, processed,
4+
merged, exports, snapshots), validating the project and folder and guarding
5+
against path traversal before returning the file.
6+
"""
27

38
from pathlib import Path
49

apps/api/routers/export_folder.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
"""Belirli bir lokal klasöre kopyalama — self-hosted için.
1+
"""API routes for copying project export files to a local folder.
22
3-
Self-hosted tek kullanıcı senaryosunda backend ve kullanıcı aynı makinededir;
4-
backend'in yazma yetkisi olan herhangi bir klasöre çıktıyı bırakabilir.
3+
Intended for self-hosted single-user deployments where the backend and user
4+
share the same machine. Provides endpoints to copy selected export files into
5+
any backend-writable target folder and to suggest common output locations.
56
"""
67

78
import shutil

apps/api/routers/prepare.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
"""Veri hazırlama orkestratörü.
1+
"""Data preparation orchestration endpoints.
22
3-
Tek butonla ham CSV/TXT'leri otomatik XLSX'e çevirir.
4-
Kullanıcı dönüşüm seçimleri yapmasına gerek kalmaz.
3+
Exposes API routes that automatically convert raw uploaded CSV/TXT
4+
files into merged XLSX outputs, report preparation status (including
5+
staleness), reset preparation, and delete individual processed files.
56
"""
67

78
from pathlib import Path

apps/api/routers/quality.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
"""Veri kalitesi & grafik endpoint'leri.
1+
"""Data quality and chart API endpoints.
22
3-
UI bu endpoint'leri:
4-
- Dashboard panelinde alan-bazlı doluluk yüzdelerini göstermek için
5-
- Records sayfası üstündeki chart'lar için kullanır.
3+
Exposes per-field fill-rate statistics and a weighted health score for a
4+
project's merged dataset, an exportable overview table (CSV/XLSX), and
5+
aggregated chart data (year, journal, document type, language, citation
6+
distributions) consumed by the dashboard and records pages.
67
"""
78

89
from __future__ import annotations

apps/api/routers/records.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
"""Kayıt seviyesinde işlemler — toplu silme, seçilenleri zenginleştirme.
1+
"""API router for record-level operations on a project's merged dataset.
22
3-
Her destrüktif işlem önce snapshot alır ve audit log'a yazılır.
3+
Provides endpoints to bulk-delete records, edit a single record, and list or
4+
restore dataset snapshots. Every destructive operation takes a snapshot first
5+
and writes an entry to the audit log.
46
"""
57

68
from __future__ import annotations

apps/api/routers/report.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"""Rapor endpoint'leri — ham günlük (MD/TXT/PDF) + LLM metodoloji raporu (MD/TXT/PDF).
1+
"""Report endpoints for the operation log and the methodology report.
22
3-
Export adımından sonraki son adım. İki çıktı türü:
4-
• Ham operasyon günlüğü — sürecin birebir kaydı.
5-
• Metodoloji raporu — günlüğün LLM ile İngilizce makale metnine dönüştürülmüş hali.
3+
Serves two output types in Markdown, plain text, and PDF formats:
4+
- Raw operation log: a faithful record of the processing pipeline.
5+
- Methodology report: an English narrative generated from the log via an LLM.
66
"""
77

88
from __future__ import annotations

apps/api/routers/settings.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
"""Ayarlar endpoint — .env dosyasını UI üzerinden oku/yaz.
1+
"""Settings endpoints for reading and writing the .env file from the UI.
22
3-
Yalnız self-hosted senaryo için tasarlandı. Backend ve frontend aynı makinedeyse
4-
kullanıcı API key ve email gibi alanları UI'dan girebilir.
3+
Exposes a FastAPI router that lists editable configuration fields (storage path,
4+
enrichment API keys, LLM provider/model), validates filesystem paths, and persists
5+
updates back to the .env file. Intended for self-hosted setups where the backend
6+
and frontend run on the same machine.
57
"""
68

79
from __future__ import annotations

0 commit comments

Comments
 (0)