academia-mcp 1.8.0__tar.gz → 1.8.1__tar.gz

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 (46) hide show
  1. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/PKG-INFO +1 -1
  2. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/server.py +2 -4
  3. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/__init__.py +2 -4
  4. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/latex.py +9 -18
  5. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp.egg-info/PKG-INFO +1 -1
  6. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/pyproject.toml +1 -1
  7. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_latex.py +3 -16
  8. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/LICENSE +0 -0
  9. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/README.md +0 -0
  10. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/__init__.py +0 -0
  11. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/__main__.py +0 -0
  12. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/files.py +0 -0
  13. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/latex_templates/agents4science_2025/agents4science_2025.sty +0 -0
  14. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/latex_templates/agents4science_2025/agents4science_2025.tex +0 -0
  15. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/llm.py +0 -0
  16. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/pdf.py +0 -0
  17. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/py.typed +0 -0
  18. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/anthology_search.py +0 -0
  19. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/arxiv_download.py +0 -0
  20. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/arxiv_search.py +0 -0
  21. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/bitflip.py +0 -0
  22. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/document_qa.py +0 -0
  23. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/hf_datasets_search.py +0 -0
  24. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/py.typed +0 -0
  25. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/review.py +0 -0
  26. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/s2_citations.py +0 -0
  27. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/visit_webpage.py +0 -0
  28. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/tools/web_search.py +0 -0
  29. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp/utils.py +0 -0
  30. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp.egg-info/SOURCES.txt +0 -0
  31. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp.egg-info/dependency_links.txt +0 -0
  32. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp.egg-info/entry_points.txt +0 -0
  33. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp.egg-info/requires.txt +0 -0
  34. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/academia_mcp.egg-info/top_level.txt +0 -0
  35. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/setup.cfg +0 -0
  36. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_anthology_search.py +0 -0
  37. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_arxiv_download.py +0 -0
  38. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_arxiv_search.py +0 -0
  39. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_bitflip.py +0 -0
  40. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_document_qa.py +0 -0
  41. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_extract_json.py +0 -0
  42. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_hf_dataset_search.py +0 -0
  43. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_review.py +0 -0
  44. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_s2_citations.py +0 -0
  45. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_visit_webpage.py +0 -0
  46. {academia_mcp-1.8.0 → academia_mcp-1.8.1}/tests/test_web_search.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: academia-mcp
3
- Version: 1.8.0
3
+ Version: 1.8.1
4
4
  Summary: MCP server that provides different tools to search for scientific publications
5
5
  Author-email: Ilya Gusev <phoenixilya@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/IlyaGusev/academia_mcp
@@ -13,8 +13,7 @@ from .tools.hf_datasets_search import hf_datasets_search
13
13
  from .tools.anthology_search import anthology_search
14
14
  from .tools.document_qa import document_qa
15
15
  from .tools.latex import (
16
- compile_latex_from_file,
17
- compile_latex_from_str,
16
+ compile_latex,
18
17
  get_latex_template,
19
18
  get_latex_templates_list,
20
19
  read_pdf,
@@ -65,8 +64,7 @@ def run(
65
64
  server.add_tool(s2_get_references)
66
65
  server.add_tool(hf_datasets_search)
67
66
  server.add_tool(anthology_search)
68
- server.add_tool(compile_latex_from_file)
69
- server.add_tool(compile_latex_from_str)
67
+ server.add_tool(compile_latex)
70
68
  server.add_tool(get_latex_template)
71
69
  server.add_tool(get_latex_templates_list)
72
70
  server.add_tool(visit_webpage)
@@ -5,8 +5,7 @@ from .hf_datasets_search import hf_datasets_search
5
5
  from .s2_citations import s2_get_references, s2_get_citations
6
6
  from .document_qa import document_qa
7
7
  from .latex import (
8
- compile_latex_from_file,
9
- compile_latex_from_str,
8
+ compile_latex,
10
9
  get_latex_template,
11
10
  get_latex_templates_list,
12
11
  read_pdf,
@@ -24,8 +23,7 @@ __all__ = [
24
23
  "s2_get_citations",
25
24
  "hf_datasets_search",
26
25
  "document_qa",
27
- "compile_latex_from_file",
28
- "compile_latex_from_str",
26
+ "compile_latex",
29
27
  "get_latex_template",
30
28
  "get_latex_templates_list",
31
29
  "web_search",
@@ -46,7 +46,7 @@ def get_latex_template(template_name: str) -> str:
46
46
  return json.dumps({"template": template_path.read_text(), "style": style_path.read_text()})
47
47
 
48
48
 
49
- def compile_latex_from_file(
49
+ def compile_latex(
50
50
  input_filename: str, output_filename: str = "output.pdf", timeout: int = 60
51
51
  ) -> str:
52
52
  """
@@ -63,24 +63,8 @@ def compile_latex_from_file(
63
63
  if not input_filename_path.exists():
64
64
  input_filename_path = Path(get_workspace_dir()) / input_filename
65
65
  assert input_filename_path.exists(), f"Input file {input_filename} does not exist"
66
- with open(input_filename_path, "r", encoding="utf-8") as file:
67
- latex_code = file.read()
68
- return compile_latex_from_str(latex_code, output_filename, timeout)
66
+ latex_code = input_filename_path.read_text(encoding="utf-8")
69
67
 
70
-
71
- def compile_latex_from_str(
72
- latex_code: str, output_filename: str = "output.pdf", timeout: int = 60
73
- ) -> str:
74
- """
75
- Compile a latex code.
76
-
77
- Returns a string with the result of the compilation.
78
-
79
- Args:
80
- latex_code: The latex code to compile.
81
- output_filename: The path to the output pdf file.
82
- timeout: The timeout for the compilation. 60 seconds by default.
83
- """
84
68
  if shutil.which("pdflatex") is None:
85
69
  return "pdflatex is not installed or not found in PATH."
86
70
 
@@ -116,6 +100,13 @@ def compile_latex_from_str(
116
100
  except Exception:
117
101
  pass
118
102
 
103
+ try:
104
+ bib_source_path = input_filename_path.parent / "references.bib"
105
+ if bib_source_path.exists():
106
+ shutil.copyfile(bib_source_path, temp_dir_path / "references.bib")
107
+ except Exception:
108
+ pass
109
+
119
110
  try:
120
111
  subprocess.run(
121
112
  [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: academia-mcp
3
- Version: 1.8.0
3
+ Version: 1.8.1
4
4
  Summary: MCP server that provides different tools to search for scientific publications
5
5
  Author-email: Ilya Gusev <phoenixilya@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/IlyaGusev/academia_mcp
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "academia-mcp"
7
- version = "1.8.0"
7
+ version = "1.8.1"
8
8
  description = "MCP server that provides different tools to search for scientific publications"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -3,8 +3,7 @@ import tempfile
3
3
  from pathlib import Path
4
4
 
5
5
  from academia_mcp.tools.latex import (
6
- compile_latex_from_file,
7
- compile_latex_from_str,
6
+ compile_latex,
8
7
  get_latex_template,
9
8
  get_latex_templates_list,
10
9
  read_pdf,
@@ -25,12 +24,6 @@ def test_latex_get_latex_template() -> None:
25
24
  assert result["style"] is not None
26
25
 
27
26
 
28
- def test_latex_compile_latex_from_str() -> None:
29
- template = json.loads(get_latex_template("agents4science_2025"))
30
- result = compile_latex_from_str(template["template"], "test.pdf")
31
- assert "Compilation successful" in result
32
-
33
-
34
27
  def test_latex_compile_latex_from_file() -> None:
35
28
  template = json.loads(get_latex_template("agents4science_2025"))
36
29
  with tempfile.TemporaryDirectory() as temp_dir:
@@ -39,7 +32,7 @@ def test_latex_compile_latex_from_file() -> None:
39
32
  tex_file_path = temp_dir_path / tex_filename
40
33
  pdf_filename = "test.pdf"
41
34
  tex_file_path.write_text(template["template"], encoding="utf-8")
42
- result = compile_latex_from_file(str(tex_file_path), pdf_filename)
35
+ result = compile_latex(str(tex_file_path), pdf_filename)
43
36
  assert "Compilation successful" in result
44
37
 
45
38
 
@@ -51,13 +44,7 @@ def test_latex_read_pdf() -> None:
51
44
  tex_file_path = temp_dir_path / tex_filename
52
45
  pdf_filename = "test.pdf"
53
46
  tex_file_path.write_text(template["template"], encoding="utf-8")
54
- compile_latex_from_file(str(tex_file_path), pdf_filename)
47
+ compile_latex(str(tex_file_path), pdf_filename)
55
48
  read_result = json.loads(read_pdf(pdf_filename))
56
49
  assert read_result
57
50
  assert "Page 1" in read_result[0]
58
-
59
-
60
- def test_latex_compile_latex_error() -> None:
61
- template = json.loads(get_latex_template("agents4science_2025"))
62
- result = compile_latex_from_str(template["template"][:100], "test.pdf")
63
- print(result)
File without changes
File without changes
File without changes