-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
166 lines (152 loc) · 4.41 KB
/
pyproject.toml
File metadata and controls
166 lines (152 loc) · 4.41 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
155
156
157
158
159
160
161
162
163
164
165
166
[build-system]
requires = ["setuptools>=65.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "hedit"
version = "0.7.5a1"
description = "Multi-agent system for HED annotation generation and validation"
readme = "PKG_README.md"
requires-python = ">=3.12"
license = "MIT"
authors = [
{name = "Annotation Garden Initiative", email = "info@annotation.garden"}
]
keywords = ["hed", "annotation", "neuroscience", "bids", "cli"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]
# Core CLI dependencies (lightweight, ~100MB)
# For full standalone mode, install with: pip install hedit[standalone]
dependencies = [
# CLI framework
"typer>=0.20.0",
"rich>=14.0.0",
"platformdirs>=4.5.0",
"pyyaml>=6.0.2",
# HTTP client for API mode
"httpx>=0.28.0",
# Data validation
"pydantic>=2.12.0",
]
[project.scripts]
hedit = "src.cli.main:cli"
[project.urls]
Homepage = "https://annotation.garden/hedit"
Documentation = "https://docs.annotation.garden/hedit"
Repository = "https://github.com/Annotation-Garden/hedit"
Issues = "https://github.com/Annotation-Garden/hedit/issues"
[project.optional-dependencies]
# Standalone mode: run LangGraph workflow locally without backend (~2GB)
# Note: hed-lsp CLI is recommended for semantic tag suggestions
# Install separately: https://github.com/hed-standard/hed-lsp
standalone = [
"langgraph>=0.2.0",
"langchain>=0.3.0",
"langchain-community>=0.3.0",
"langchain-core>=0.3.0",
"langchain-openai>=0.3.0",
"litellm>=1.50.0", # LLM proxy with native prompt caching support
"langchain-litellm>=0.2.0", # LangChain integration for LiteLLM
"hedtools>=0.5.0",
"lxml>=5.3.0",
"beautifulsoup4>=4.12.3",
"pillow>=11.0.0",
"nest-asyncio>=1.6.0",
]
# API server: run the HEDit backend server
api = [
"hedit[standalone]", # Server needs workflow capabilities
"fastapi>=0.121.0",
"uvicorn[standard]>=0.38.0",
"python-multipart>=0.0.17",
"aiofiles>=25.1.0",
"python-dotenv>=1.0.0",
]
# Development dependencies
dev = [
"hedit[api]", # Dev needs full installation
"pytest>=8.3.0",
"pytest-cov>=5.0.0",
"pytest-asyncio>=0.24.0",
"ruff>=0.7.0",
"black>=24.8.0",
"mypy>=1.11.0",
]
# All dependencies
all = [
"hedit[api,dev]",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--cov=src",
"--cov-report=html",
"--cov-report=term-missing",
"--strict-markers",
]
# Note: Coverage threshold is enforced by Codecov (80% project, 70% patch)
# Unit tests alone get ~18%, integration tests combined get 70%+
markers = [
"integration: marks tests that make real API calls (deselect with '-m \"not integration\"')",
"standalone: marks tests that run locally without backend (requires OPENROUTER_API_KEY_FOR_TESTING)",
"timeout: marks tests with a timeout (requires pytest-timeout)",
]
asyncio_mode = "auto"
[tool.coverage.run]
# Enable branch coverage for more accurate metrics
branch = true
# Use data_file for combining multiple test runs
data_file = ".coverage"
# Parallel mode allows combining coverage from multiple processes
parallel = true
omit = [
"src/utils/hed_rules.py", # Just a string constant, no logic to test
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError",
]
[tool.setuptools.packages.find]
where = ["."]
include = ["src*"]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*,.venv,*.svg,package-lock.json,examples'
check-hidden = true
# ignore-regex = ''
# ignore-words-list = ''