-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
132 lines (117 loc) · 3.88 KB
/
pyproject.toml
File metadata and controls
132 lines (117 loc) · 3.88 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
[project]
name = "communitymech"
version = "0.1.0"
description = "Microbial Community Mechanisms Knowledge Base - LinkML-based modeling with evidence validation"
authors = [
{name = "CultureBotAI", email = "info@culturebot.ai"}
]
license = {text = "BSD-3-Clause"}
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"linkml>=1.7.0",
"linkml-runtime>=1.7.0",
"linkml-term-validator>=0.1.0",
"linkml-reference-validator>=0.1.0",
"pydantic>=2.0.0",
"pyyaml>=6.0",
"click>=8.0.0",
"jinja2>=3.0.0",
"oaklib>=0.5.0",
"requests>=2.31.0",
"numpy>=1.24.0",
"pandas>=2.0.0",
"umap-learn>=0.5.0",
"tqdm>=4.66.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.0.0",
"pre-commit>=3.0.0",
"deep-research-client[cyberian]>=0.2.4; python_version >= '3.12'",
"types-PyYAML>=6.0.0",
"types-requests>=2.31.0",
"types-tqdm>=4.66.0",
"pandas-stubs>=2.0.0",
]
koza = [
"koza>=0.5.0",
"biolink-model>=3.0.0",
]
validation = [
"linkml-validator>=0.4.0",
]
llm = [
"anthropic>=0.39.0",
"rich>=13.0.0",
]
[project.scripts]
communitymech = "communitymech.cli:main"
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
[tool.black]
line-length = 100
target-version = ["py310", "py311", "py312"]
[tool.ruff]
line-length = 100
target-version = "py310"
# The LinkML pythongen datamodel is fully regenerated by `just gen-python`
# and is not hand-edited, so style lints there create churn rather than
# signal. Exclude it from ruff (black still formats it via `just format`).
extend-exclude = ["src/communitymech/datamodel/communitymech.py"]
[tool.ruff.lint]
# T20 (print) is deliberately omitted: src/communitymech/ ships CLI
# entry points (cli.py, render_*, export/*, embedding/*, validators)
# that legitimately use print for user output, and tagging each call
# with `# noqa: T201` is louder than the rule is worth here.
select = ["E", "F", "I", "UP", "N", "S", "B", "A", "C4", "SIM"]
ignore = ["S101", "S603", "S607"]
[tool.ruff.lint.per-file-ignores]
# E501 (line-too-long) is suppressed in prompt-template modules because
# the strings are LLM prompt content; wrapping or splitting them would
# alter the rendered prompt.
"src/communitymech/llm/prompts.py" = ["E501"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"e2e: End-to-end tests that require API key (deselect with '-m \"not e2e\"')",
"integration: Integration tests",
]
# By default, skip e2e tests (require explicit --e2e flag)
addopts = "-m 'not e2e'"
[tool.mypy]
python_version = "3.10"
# warn_return_any is left off: most no-any-return reports here come from
# `requests.json()` / `.get()` chains feeding back into annotated return
# types. The annotations are correct; casting at every site is churn
# without improving safety. Re-enable if a real Any-leak hunt is needed.
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false
# The LinkML pythongen datamodel is fully regenerated by `just gen-python`
# and is not hand-edited, so type lints there create churn rather than
# signal. Excluded for the same reason ruff excludes it.
exclude = ["src/communitymech/datamodel/communitymech\\.py"]
# Optional/external modules without bundled type info — silence import-
# resolution noise. `anthropic` is an opt-in dep (LLM extra);
# `kg_microbe_browser` lives in a sibling repo. The internal modules
# under communitymech.datamodel are excluded above, but mypy still
# reports their import as an untyped follow-import.
[[tool.mypy.overrides]]
module = [
"anthropic.*",
"kg_microbe_browser.*",
"communitymech.datamodel.*",
"umap.*",
]
ignore_missing_imports = true