-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
109 lines (97 loc) · 2.06 KB
/
Copy pathpyproject.toml
File metadata and controls
109 lines (97 loc) · 2.06 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "image-index-serch"
version = "0.1.0"
description = "画像検索システム - CLIPとFAISSを使った画像検索エンジン"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"torch>=2.1.0",
"torchvision>=0.16.0",
"open-clip-torch>=2.24.0",
"transformers>=4.35.0",
"faiss-cpu>=1.7.4",
"pillow>=10.1.0",
"numpy>=1.26.0",
"click>=8.1.7",
"rich>=13.7.0",
"pydantic>=2.5.0",
"pydantic-settings>=2.1.0",
"pyyaml>=6.0.1",
"tqdm>=4.66.0",
# Web GUI (ローカル用途)
"fastapi>=0.115.0",
"uvicorn>=0.32.0",
"jinja2>=3.1.4",
"python-multipart>=0.0.9",
]
[project.scripts]
image-search = "image_index_search.cli:cli"
[dependency-groups]
dev = [
"mypy>=1.19.0",
"pytest>=9.0.2",
"pytest-cov>=7.0.0",
"pytest-mock>=3.15.1",
"ruff>=0.14.9",
]
[tool.ruff]
line-length = 120
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"T201",
"COM812",
"ISC001",
]
unfixable = [
"F401",
"F841",
]
pydocstyle.convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"D",
"S101",
"N802",
"ARG",
# テストは振る舞いに集中したいので、型注釈や細かなスタイルは緩める
"ANN",
"PLC0415",
"PLR2004",
"RUF002",
"RUF003",
"RUF015",
"SLF001",
"W293",
"ERA001",
"NPY002",
"F401",
"RUF100",
]
[tool.ruff.lint.pylint]
max-args = 6
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
# Jinja2テンプレートを配布物に含める(ローカルGUI用)
image_index_search = [
"web/templates/*.html",
"web/templates/partials/*.html",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]