academic-refchecker 1.2.65__py3-none-any.whl → 1.2.67__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {academic_refchecker-1.2.65.dist-info → academic_refchecker-1.2.67.dist-info}/METADATA +72 -7
  2. {academic_refchecker-1.2.65.dist-info → academic_refchecker-1.2.67.dist-info}/RECORD +33 -18
  3. {academic_refchecker-1.2.65.dist-info → academic_refchecker-1.2.67.dist-info}/entry_points.txt +1 -0
  4. {academic_refchecker-1.2.65.dist-info → academic_refchecker-1.2.67.dist-info}/top_level.txt +1 -0
  5. backend/__init__.py +21 -0
  6. backend/__main__.py +11 -0
  7. backend/cli.py +64 -0
  8. backend/concurrency.py +100 -0
  9. backend/database.py +711 -0
  10. backend/main.py +1367 -0
  11. backend/models.py +99 -0
  12. backend/refchecker_wrapper.py +1126 -0
  13. backend/static/assets/index-2P6L_39v.css +1 -0
  14. backend/static/assets/index-hk21nqxR.js +25 -0
  15. backend/static/favicon.svg +6 -0
  16. backend/static/index.html +15 -0
  17. backend/static/vite.svg +1 -0
  18. backend/thumbnail.py +517 -0
  19. backend/websocket_manager.py +104 -0
  20. refchecker/__version__.py +2 -2
  21. refchecker/checkers/crossref.py +15 -6
  22. refchecker/checkers/enhanced_hybrid_checker.py +18 -4
  23. refchecker/checkers/local_semantic_scholar.py +2 -2
  24. refchecker/checkers/openalex.py +15 -6
  25. refchecker/checkers/semantic_scholar.py +15 -6
  26. refchecker/core/refchecker.py +17 -6
  27. refchecker/utils/__init__.py +2 -1
  28. refchecker/utils/arxiv_utils.py +18 -60
  29. refchecker/utils/doi_utils.py +32 -1
  30. refchecker/utils/error_utils.py +20 -9
  31. refchecker/utils/text_utils.py +143 -27
  32. {academic_refchecker-1.2.65.dist-info → academic_refchecker-1.2.67.dist-info}/WHEEL +0 -0
  33. {academic_refchecker-1.2.65.dist-info → academic_refchecker-1.2.67.dist-info}/licenses/LICENSE +0 -0
backend/models.py ADDED
@@ -0,0 +1,99 @@
1
+ """
2
+ Pydantic models for API request/response validation
3
+ """
4
+ from pydantic import BaseModel, Field
5
+ from typing import Optional, List, Dict, Any
6
+ from datetime import datetime
7
+ from enum import Enum
8
+
9
+
10
+ class CheckSource(str, Enum):
11
+ """Source type for paper check"""
12
+ URL = "url"
13
+ FILE = "file"
14
+ TEXT = "text"
15
+
16
+
17
+ class CheckRequest(BaseModel):
18
+ """Request to check a paper"""
19
+ source_type: CheckSource
20
+ source_value: str # URL or filename
21
+ llm_provider: Optional[str] = "anthropic"
22
+ llm_model: Optional[str] = None
23
+ use_llm: bool = True
24
+
25
+
26
+ class ReferenceError(BaseModel):
27
+ """Error or warning in a reference"""
28
+ error_type: str # 'author', 'title', 'year', 'doi', 'venue', 'arxiv_id', 'unverified'
29
+ error_details: str
30
+ cited_value: Optional[str] = None
31
+ actual_value: Optional[str] = None
32
+
33
+
34
+ class ReferenceURL(BaseModel):
35
+ """Authoritative URL for a reference"""
36
+ type: str # 'semantic_scholar', 'arxiv', 'doi', 'other'
37
+ url: str
38
+
39
+
40
+ class ReferenceResult(BaseModel):
41
+ """Result for a single reference check"""
42
+ index: int
43
+ title: str
44
+ authors: List[str]
45
+ year: Optional[str] = None
46
+ venue: Optional[str] = None
47
+ cited_url: Optional[str] = None
48
+ status: str # 'verified', 'error', 'warning', 'unverified'
49
+ errors: List[ReferenceError] = []
50
+ warnings: List[ReferenceError] = []
51
+ authoritative_urls: List[ReferenceURL] = []
52
+ corrected_reference: Optional[str] = None
53
+
54
+
55
+ class SummaryStats(BaseModel):
56
+ """Summary statistics for check"""
57
+ total_refs: int
58
+ processed_refs: int
59
+ errors_count: int
60
+ warnings_count: int
61
+ unverified_count: int
62
+ verified_count: int
63
+ progress_percent: float
64
+
65
+
66
+ class CheckStatus(str, Enum):
67
+ """Status of check operation"""
68
+ STARTED = "started"
69
+ EXTRACTING = "extracting"
70
+ CHECKING = "checking"
71
+ COMPLETED = "completed"
72
+ ERROR = "error"
73
+
74
+
75
+ class WebSocketMessage(BaseModel):
76
+ """WebSocket message format"""
77
+ type: str # 'started', 'progress', 'reference_result', 'summary_update', 'completed', 'error'
78
+ data: Dict[str, Any]
79
+
80
+
81
+ class CheckHistoryItem(BaseModel):
82
+ """History item summary"""
83
+ id: int
84
+ paper_title: str
85
+ paper_source: str
86
+ timestamp: str
87
+ total_refs: int
88
+ errors_count: int
89
+ warnings_count: int
90
+ unverified_count: int
91
+ llm_provider: Optional[str] = None
92
+ llm_model: Optional[str] = None
93
+ status: str = "completed"
94
+ source_type: Optional[str] = None
95
+
96
+
97
+ class CheckHistoryDetail(CheckHistoryItem):
98
+ """Detailed history item with full results"""
99
+ results: List[ReferenceResult]