Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
154 lines (143 loc) · 5.77 KB
/
Copy pathpyproject.toml
File metadata and controls
154 lines (143 loc) · 5.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "git-metadata-extractor"
version = "3.0.0"
description = "This project is designed to classify imaging software repositories and extract relevant information using AI models."
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
authors = [
{ name = "Quentin Chappuis", email = "quentin.chappuis@epfl.ch" },
{ name = "Robin Franken", email = "robin.franken@epfl.ch" },
{ name = "Carlos Vivar Rios", email = "carlos.vivarrios@epfl.ch" },
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
# THE cross-repo pin. The RAG index layer lives in its own repo since
# 3.0.0 and the read-side providers, `canonicalization/doi.py` and the
# gunicorn index bootstrap import it unconditionally — so it is a hard
# dependency, not an extra. Not on PyPI: pinned to an immutable tag so
# every install path (just, CI, Docker) resolves the same revision.
#
# This line is the single source of truth for the child library version.
# `tools/deploy/docker-compose.yml` pins the matching gme-sources image;
# tests/v2/test_open_pulse_sources_pin.py fails if the two drift apart
# or if either default slips back to a mutable ref (main / latest).
# Local cross-repo development overrides it with an editable checkout —
# see `just install-dev`.
"open-pulse-sources @ git+https://github.com/sdsc-ordes/open-pulse-sources@v0.1.2",
"fastapi>=0.122.0",
"uvicorn[standard]==0.34.3",
"pydantic==2.11.7",
"python-dotenv>=1.2.2",
"requests>=2.33.0",
"openai==2.1.0",
"tiktoken==0.9.0",
"google-genai>=1.31.0",
"repo-to-text>=0.7.0",
"PyLD==2.0.4",
"rdflib==6.3.2",
"rdflib-jsonld==0.6.2",
"PyYAML==6.0.2",
"selenium>=4.36.0",
"beautifulsoup4==4.13.4",
"aiohttp>=3.14.0",
"uvicorn-worker==0.3.0",
"pydantic-ai>=1.0.15",
"griffe<2",
# logfire (transitive: pydantic-ai -> logfire) imports the deprecated
# `opentelemetry._events` module, which opentelemetry-api DROPPED in
# 1.44.0 — while logfire 4.39.0 (latest) still declares
# `opentelemetry-sdk<1.45.0`, so its own range does not exclude the
# break. A fresh resolve therefore installs 1.44.0 and every test that
# touches pydantic-ai dies at import with
# `ModuleNotFoundError: No module named 'opentelemetry._events'`.
# Drop these caps once logfire stops importing the removed module.
"opentelemetry-api<1.44",
"opentelemetry-sdk<1.44",
"httpx",
"markdownify==1.2.0",
"pyshacl==0.28.1",
"click>=8.1.0",
"faiss-cpu>=1.8.0",
"numpy>=1.26",
"pyalex>=0.15",
"duckdb>=1.0",
"qdrant-client>=1.10",
"tenacity>=8",
"huggingface_hub>=1.2.0",
"graphai-client>=1.16.0",
]
[project.urls]
Homepage = "https://imaging-plaza.epfl.ch"
Repository = "https://github.com/Imaging-Plaza/git-metadata-extractor"
Issues = "https://github.com/Imaging-Plaza/git-metadata-extractor/issues"
[project.optional-dependencies]
dev = [
"pre-commit>=3.0.0",
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-testmon>=2.1.3",
"pytest-xdist>=3.6.1",
"black>=23.0.0",
"mypy>=1.0.0",
# Pinned exactly, both of them: `just v2-models-check` regenerates the
# models and compares byte-for-byte against the committed output, so the
# generator AND the formatter it shells out to are part of that contract.
# With ranges, any upstream release that reorders imports or retouches
# formatting turns the gate red on an unrelated PR (this is exactly how
# codegen 0.71.0 + ruff 0.16.0 broke it — the committed files predated
# both). Bump these deliberately, then run `just v2-models-generate`.
"ruff==0.16.0",
"datamodel-code-generator==0.71.0",
"respx>=0.21",
"requests-mock>=1.12",
]
docs = [
"mkdocs>=1.6.0",
"mkdocs-material>=9.5.0",
"mike>=2.1.3",
"pymdown-extensions>=10.14.0"
]
[tool.setuptools.packages.find]
include = ["git_metadata_extractor*"]
[tool.setuptools.package-data]
# Ship the open-pulse ontology TTL (and any other in-package data) inside
# the wheel — the SHACL gate loads it at runtime from git_metadata_extractor/validation/.
# The Docker image also gets it via the package COPY; this covers pip installs.
"*" = ["*.ttl"]
[tool.ruff]
line-length = 88
target-version = "py38"
[tool.ruff.lint]
select = ["E", "F", "W", "C90", "I", "N", "UP", "YTT", "S", "BLE", "FBT", "B", "A", "COM", "C4", "DTZ", "T10", "EM", "EXE", "FA", "ISC", "ICN", "G", "INP", "PIE", "T20", "PYI", "PT", "Q", "RSE", "RET", "SLF", "SLOT", "SIM", "TID", "TCH", "ARG", "PTH", "TD", "FIX", "ERA", "PD", "PGH", "PL", "TRY", "FLY", "NPY", "AIR", "PERF", "FURB", "LOG", "RUF"]
ignore = ["S101","T201", "G004", "E501", "FA100"]
[tool.ruff.lint.per-file-ignores]
"examples/*.py" = ["E402"]
"tests/*.py" = ["E402"]
[tool.pytest.ini_options]
markers = [
"v2: tests for the v2 extraction pipeline and schema validation track",
"live_provider: opt-in tests that hit live external provider APIs",
"llm_integration: opt-in tests that call real LLM providers",
"openalex: legacy marker for OpenAlex-scoped tests (index code lives in open-pulse-sources now)",
]
[tool.datamodel-codegen]
input_file_type = "jsonschema"
output_model_type = "pydantic_v2.BaseModel"
target_python_version = "3.10"
use_title_as_name = true
field_constraints = true
disable_timestamp = true
formatters = ["ruff-format", "ruff-check"]