-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
236 lines (211 loc) · 6.94 KB
/
pyproject.toml
File metadata and controls
236 lines (211 loc) · 6.94 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
[project]
name = "nexusLIMS"
version = "2.7.2.dev0"
description = "Electron Microscopy Nexus LIMS project (Datasophos fork)"
authors = [
{name = "Joshua Taillon", email = "josh@datasophos.co"}
]
maintainers = [
{name = "Joshua Taillon", email = "josh@datasophos.co"}
]
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.11,<3.15"
keywords = ["microscopy", "LIMS", "materials", "electron-microscopy"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"lxml>=6.0,<7.0.0",
"requests>=2.32.0,<3.0.0",
"pytz>=2022.7",
"hyperspy[speed]>=2.1.0,<3.0.0",
"scikit-learn>=1.2.0,<2.0.0",
"python-dotenv>=1.0.0,<2.0.0",
"exspy>=0.3.2",
"pyxem>=0.21.0",
"pixstem>=0.4.0",
"python-benedict>=0.35.0,<1.0.0",
"pydantic[email]>=2.12.0",
"pydantic-settings>=2.12.0",
"email-validator>=2.3.0",
"click>=8.1.8",
"rich>=13.0.0",
"filelock>=3.0.0",
"tzlocal>=5.3.1",
"pint>=0.24.0,<1.0.0",
"rdflib>=7.0.0,<8.0.0",
"sqlmodel>=0.0.31",
"alembic>=1.17.2",
"textual>=8.0.0",
"squall-sql>=0.1.8",
]
[dependency-groups]
dev = [
"pytest>=7.2",
"coverage>=7.0.0",
"pytest-mpl>=0.16.1",
"pytest-cov>=4.0.0",
"sphinx>=9.0.0,<10",
"pydata-sphinx-theme>=0.16.1",
"roman-numerals>=4.1.0",
"ruff>=0.9.0",
"sphinxcontrib-towncrier>=0.3.2a0",
"types-lxml>=2025.8.25",
"responses>=0.25.8",
"python-semantic-release>=10.5.2",
"freezegun>=1.5.5",
"autodoc-pydantic>=2.2.0",
"sphobjinv>=2.3.1.3",
"sphinx-autodoc-typehints>=3.5.2",
"sphinx-autodoc2>=0.5.0",
"myst-nb>=1.0.0",
# Integration testing dependencies (optional)
"pytest-docker>=3.1.1",
"docker>=7.0.0",
"pytest-timeout>=2.2.0",
"sphinxcontrib-mermaid>=1.2.3",
"sphinx-design>=0.6.1",
"pre-commit>=4.5.0",
"imagecodecs>=2025.11.11",
"sphinx-autobuild>=2025.8.25",
"sphinx-copybutton>=0.5.2",
"pytest-asyncio>=1.3.0",
"textual-dev>=1.8.0",
]
[project.urls]
Homepage = "https://datasophos.github.io/NexusLIMS/stable"
Repository = "https://github.com/datasophos/NexusLIMS.git"
Documentation = "https://datasophos.github.io/NexusLIMS/stable"
"Original-NIST-Repository" = "https://github.com/usnistgov/NexusLIMS.git"
[project.scripts]
nexuslims = "nexusLIMS.cli.main:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["nexusLIMS"]
[tool.ruff]
exclude = [
"nexusLIMS/dev_scripts",
"tests/dev",
"tests/integration/docker/elabftw/init_elabftw.py"
]
[tool.ruff.lint]
select = [
"F", "E", "W", "I", "N", "D", "YTT", "UP", "S", "FBT", "B", "A", "COM", "C4",
"DTZ", "T10", "EM", "EXE", "ISC", "ICN", "G", "INP", "PIE", "T20", "PYI",
"PT", "Q", "RSE", "RET", "SLF", "SIM", "TID", "TCH", "ARG", "PTH", "ERA", "PL",
"TRY", "RUF"
]
ignore = ["N999", "UP006", "UP007", "UP035", "B905", "RUF007", "S603", "COM812"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S", "PLC0415", "PLR2004", "ARG002", "DTZ001", "DTZ005", "SLF001", "ARG001", "D102", "TRY003", "EM101", "PT017", "N817", "FBT001", "F841"]
"tests/fixtures/**/*.py" = ["F401", "E402"]
"tests/integration/**/*.py" = ["ARG002", "ARG001"]
"migrations/**/*.py" = ["D400"] # Migration files don't need perfect docstrings
"nexusLIMS/tui/**/*.py" = ["FBT001", "FBT002", "FBT003", "TRY300", "PLR2004"] # TUI patterns
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
# Use Black-compatible formatting
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.towncrier]
directory = "docs/changes"
package = "nexusLIMS"
package_dir = "nexusLIMS"
title_format = "## {version} ({project_date})"
filename = "docs/reference/changelog.md"
issue_format = "[#{issue}](https://github.com/datasophos/NexusLIMS/issues/{issue})"
[[tool.towncrier.type]]
directory = "feature"
name = "New features"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "enhancement"
name = "Enhancements"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Documentation improvements"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Miscellaneous/Development changes"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and/or Removals"
showcontent = true
[tool.coverage.run]
relative_files = true
omit = [
"nexusLIMS/dev_scripts/*",
"nexusLIMS/tui/demo_helpers.py",
"tests/dev/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"class _CustomEncoder",
"if TYPE_CHECKING:",
"@overload",
"\\.\\.\\.", # Exclude Protocol abstract methods (ellipsis)
]
[tool.pytest.ini_options]
log_cli = false
log_cli_level = "DEBUG"
# Enable automatic async test detection (for Textual TUI tests)
asyncio_mode = "auto"
# Test discovery paths - unit tests run by default, integration tests require explicit -m integration
testpaths = ["tests/unit"]
norecursedirs = ["tests/unit/files"]
# Python files and test functions/classes pattern
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Matplotlib baseline image directory for pytest-mpl
mpl-baseline-path = "tests/unit/files/figs"
# Markers for organizing tests
markers = [
"unit: Unit tests (isolated, fast)",
"integration: Integration tests (require Docker services)",
"slow: Tests that take significant time to run",
"network: Tests that require network connectivity",
"database: Tests that interact with database",
"harvester: Tests for harvester modules (NEMO, SharePoint)",
"extractor: Tests for metadata extractor modules",
"record_builder: Tests for record builder functionality",
"labarchives_live: Live integration tests against a real LabArchives server (requires NX_LABARCHIVES_* env vars)",
]
filterwarnings = [
"ignore:Using Ntlm\\(\\) is deprecated:DeprecationWarning",
"ignore:Manually creating the cbt stuct:DeprecationWarning",
"ignore:Using or importing the ABCs from:DeprecationWarning",
"ignore:the imp module is deprecated in favour of:DeprecationWarning",
"ignore:Glyph .* missing from font:UserWarning",
"ignore:The NumPy module was reloaded:UserWarning",
"ignore:Corrupt EXIF data.*:UserWarning",
"ignore:'return' in a 'finally' block:SyntaxWarning:hyperspy\\.roi",
"ignore:`scipy\\.odr` is deprecated.*:DeprecationWarning:hyperspy\\.model",
"ignore:codecs\\.open\\(\\) is deprecated.*:DeprecationWarning:rsciio\\.msa\\._api",
]
[tool.pyright]
venvPath = "."
venv = ".venv"
typeCheckingMode = "basic"
reportMissingImports = true
reportMissingTypeStubs = false