forked from hed-standard/hed-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
214 lines (194 loc) · 6.02 KB
/
pyproject.toml
File metadata and controls
214 lines (194 loc) · 6.02 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
[build-system]
requires = ["setuptools>=61", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "hedtools"
dynamic = ["version"]
description = "HED validation, summary, and analysis tools for annotating events and experimental metadata."
readme = "README.md"
authors = [
{ name = "VisLab" },
{ name = "Ian Callanan" },
{ name = "Monique Dennisen"},
{ name = "Jeremy Cockfield" },
{ name = "Alexander Jones" },
{ name = "Owen Winterberg" },
{ name = "Kay Robbins", email = "Kay.Robbins@utsa.edu" },
]
maintainers = [
{ name = "Kay Robbins", email = "Kay.Robbins@utsa.edu" },
]
license = {text = "MIT"}
keywords = ["HED", "hierarchical event descriptors", "validation", "neuroscience", "BIDS", "events", "metadata", "annotation"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.10"
dependencies = [
"click>=8.0.0",
"click-option-group>=0.5.0",
"defusedxml>=0.7.1",
"inflect>=7.5.0",
"numpy>=2.0.2",
"openpyxl>=3.1.5",
"pandas>=2.2.3,<3.0.0",
"portalocker>=3.1.1",
"semantic-version>=2.10.0"
]
[project.urls]
"Homepage" = "https://www.hedtags.org/"
"Documentation" = "https://www.hedtags.org/hed-python/"
"Repository" = "https://github.com/hed-standard/hed-python/"
"Bug Tracker" = "https://github.com/hed-standard/hed-python/issues"
"Changelog" = "https://github.com/hed-standard/hed-python/blob/main/CHANGELOG.md"
"HED Resources" = "https://www.hedtags.org/hed-resources/"
[project.optional-dependencies]
dev = [
"ruff>=0.8.0",
"typos>=1.29.0",
"mdformat>=0.7.0",
"mdformat-myst>=0.1.5",
]
docs = [
"sphinx>=7.1.0,<10.0",
"furo>=2024.1.29",
"sphinx-copybutton>=0.5.2",
"myst-parser>=3.0.0",
"sphinx-autodoc-typehints>=1.24.0",
"linkify-it-py>=2.0.3",
]
test = [
"coverage>=7.0.0",
]
examples = [
"jupyter>=1.0.0",
"notebook>=7.0.0",
"nbformat>=5.9.0",
"nbconvert>=7.0.0",
"ipykernel>=6.25.0",
]
[project.scripts]
# Main unified CLI
hedpy = "hed.cli.cli:main"
# Legacy commands (deprecated - use 'hedpy' instead)
validate_bids = "hed.scripts.validate_bids:main"
validate_hed_string = "hed.scripts.validate_hed_string:main"
validate_hed_sidecar = "hed.scripts.validate_hed_sidecar:main"
validate_hed_tabular = "hed.scripts.validate_hed_tabular:main"
hed_extract_bids_sidecar = "hed.scripts.hed_extract_bids_sidecar:main"
hed_validate_schemas = "hed.scripts.validate_schemas:main"
hed_update_schemas = "hed.scripts.hed_convert_schema:main"
hed_add_ids = "hed.scripts.add_hed_ids:main"
hed_check_schema_loading = "hed.scripts.check_schema_loading:main"
[tool.setuptools_scm]
write_to = "hed/_version.py"
version_scheme = "no-guess-dev"
[tool.setuptools.packages.find]
where = [""]
include = ["hed*"]
namespaces = false
[tool.setuptools.package-data]
hed = ["schema/schema_data/*.xml", "resources/*.png", "validator/data/*"]
[tool.typos.files]
extend-exclude = [
"*.pdf",
"*.svg",
"deprecated/",
"venv*/",
"*.tsv",
"*.yaml",
"*.yml",
"*.json",
"*.rdf",
"*.jsonld",
"spec_tests/",
"tests/",
"*.xml",
"*.mediawiki",
"*.omn",
"*.toml",
]
[tool.typos.default.extend-words]
# Domain-specific terms and abbreviations that are not typos
te = "te"
parms = "parms"
assertIn = "assertIn"
covert = "covert"
hed = "hed"
recuse = "recuse"
disjointness = "disjointness"
[tool.ruff]
# Target Python 3.10+
target-version = "py310"
line-length = 120
# Exclude common directories
exclude = [
'.git',
'.venv',
'venv',
'__pycache__',
'build',
'dist',
'*.egg-info',
'hed/_version.py', # Auto-generated by setuptools-scm
'spec_tests/hed-examples',
'spec_tests/hed-schemas',
'spec_tests/hed-tests',
'.status',
]
[tool.ruff.lint]
# Enable flake8-style checks plus additional rules
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"N", # pep8-naming
"B", # flake8-bugbear
"C4", # flake8-comprehensions
]
ignore = [
"E501", # Line too long (handled by formatter)
"N802", # Function name should be lowercase (many test methods use camelCase)
"N803", # Argument name should be lowercase (DataFrame df is common)
"N806", # Variable in function should be lowercase (common in scientific code)
# Style rules that are too opinionated
"SIM108", # if-else-block-instead-of-if-exp (ternary operator preference)
"SIM105", # suppressible-exception (use contextlib.suppress)
"SIM118", # in-dict-keys (x in dict vs x in dict.keys())
"SIM102", # collapsible-if (nested if statements)
"SIM103", # needless-bool (return bool vs if/else return True/False)
"SIM110", # reimplemented-builtin (any/all reimplementation)
"SIM101", # duplicate-isinstance-call
# Python 3.10+ features
"UP007", # Use X | Y for Union types (requires 3.10+)
"UP008", # Use super() without parameters (we're okay with explicit)
"UP031", # Use format strings over %-formatting (legacy code compatibility)
"UP028", # yield in for loop
"UP045", # Use X | None for Optional (requires 3.10+)
]
# Allow unused imports in __init__.py files
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.mccabe]
# Maximum complexity (matching your flake8 setting)
max-complexity = 10
[tool.ruff.lint.isort]
known-first-party = ["hed"]
[tool.ruff.format]
# Ruff format settings
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"