-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
245 lines (229 loc) · 6.85 KB
/
pyproject.toml
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
237
238
239
240
241
242
243
244
245
[tool.poetry]
name = "SpectraFit"
version = "1.0.3.post2"
description = "Fast fitting of 2D- and 3D-Spectra with established routines"
readme = "README.md"
authors = ["Anselm Hahn <[email protected]>"]
maintainers = ["Anselm Hahn <[email protected]>"]
license = "BSD-3-Clause"
repository = "https://github.com/Anselmoo/spectrafit"
documentation = "https://anselmoo.github.io/spectrafit/"
homepage = "https://pypi.org/project/spectrafit/"
keywords = [
"2D-Spectra",
"3D-Spectra",
"fitting",
"curve-fitting",
"peak-fitting",
"spectrum",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Environment :: Console",
"Framework :: Matplotlib",
"Framework :: Jupyter :: JupyterLab",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Information Analysis",
]
include = [
# { path = "spectrafit/test/", format = "sdist" },
{ path = "examples/", format = "sdist" },
{ path = "spectrafit/plugins/img/SpectraFit.png", format = "sdist" },
]
exclude = ["docs/", "tools/", "spectrafit/test/", "spectrafit/**/test/"]
[tool.poetry.dependencies]
python = ">=3.8,<3.12"
lmfit = "^1.2.2"
pandas = [
{ version = "<2.2.1", markers = "python_version < '3.9'" },
{ version = "^2.2.2", markers = "python_version >= '3.9'" },
]
numpy = [
{ version = "<1.26.4", markers = "python_version < '3.9'" },
{ version = "^1.26.4", markers = "python_version >= '3.9'" },
]
emcee = "^3.1.2"
tabulate = "^0.9.0"
PyYAML = "^6.0"
openpyxl = "^3.0.9"
seaborn = "^0.13.0"
numdifftools = "^0.9.41"
tqdm = "^4.64.0"
scikit-learn = [
{ version = "<1.5.0", markers = "python_version < '3.9'" },
{ version = "^1.5.0", markers = "python_version >= '3.9'" },
]
art = ">=5.8,<7.0"
tomli = "^2.0.1"
tomli-w = "^1.0.0"
pydantic = "^2.7.0"
scipy = [
{ version = "^1.10.1", markers = "python_version < '3.9'" },
{ version = "^1.13.0", markers = "python_version >= '3.9'" },
]
jupyterlab = { version = ">=3.5.2,<5.0.0", optional = true }
plotly = { version = "^5.21.0", optional = true }
itables = { version = "^2.1.1", optional = true }
kaleido = { version = "0.2.1", optional = true }
dtale = { version = "^3.9.0", optional = true }
networkx = { extras = ["all"], version = "^3.0", optional = true }
pydot = { version = "^3.0.0", optional = true }
jupyter-dash = { version = "^0.4.2", optional = true }
ipywidgets = { version = "^8.0.4", optional = true }
dash-bootstrap-components = { version = "^1.3.0", optional = true }
dash-bootstrap-templates = [
{ version = "<=1.1.2", markers = "python_version < '3.10'" },
{ version = "^1.2.0", markers = "python_version >= '3.10'" },
]
python-pptx = { version = ">=0.6.22,<1.1.0", optional = true }
[tool.poetry.group.dev.dependencies]
pylint = "^3.0.0"
mypy = "^1.9.0"
black = { extras = ["jupyter"], version = "^24.0" }
blacken-docs = "^1.12.1"
isort = "^5.13.2"
pre-commit = [
{ version = "<=3.7.1", markers = "python_version < '3.9'" },
{ version = "^3.7.1", markers = "python_version >= '3.9'" },
]
pytest = ">=7.1.3,<9.0.0"
pytest-clarity = "^1.0.1"
pytest-cov = ">=3,<6"
pytest-console-scripts = "^1.3.1"
pytest-xdist = ">=2.5,<4.0"
pytest-plt = "^1.1.0"
pytest-mock = "^3.10.0"
types-toml = "^0.10.8"
types-PyYAML = "^6.0.11"
types-tabulate = ">=0.8.11,<0.10.0"
types-mock = ">=4.0.15,<6.0.0"
nptyping = { extras = ["complete"], version = "^2.4.1" }
dash = { extras = ["testing"], version = "^2.7.1" }
bandit = "^1.7.5"
# prospector = { extras = [
# "bandit",
# "black",
# "isort",
# "pylint",
# ], version = "^1.10.3" }
bump-pydantic = "^0.8.0"
types-setuptools = ">=74.0.0.20240831,<75.0.0.0"
[tool.poetry.group.docs.dependencies]
mkdocs-material = "^9.5.0"
mkdocstrings = { extras = ["python"], version = ">=0.26.0,<0.27.0" }
mkdocs-literate-nav = ">=0.4.1,<0.7.0"
mkdocs-section-index = "^0.3.4"
mkdocs-autorefs = "^1.0.1"
mkdocs-minify-plugin = "^0.8.0"
mkdocs-jupyter = "^0.24.0"
mkdocs-table-reader-plugin = "^3.0.0"
mike = "^2.0.0"
jupytext = "^1.14.5"
mathjax = "^0.1.2"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
spectrafit = "spectrafit.spectrafit:command_line_runner"
spectrafit-file-converter = "spectrafit.plugins.file_converter:command_line_runner"
spectrafit-data-converter = "spectrafit.plugins.data_converter:command_line_runner"
spectrafit-pkl-visualizer = "spectrafit.plugins.pkl_visualizer:command_line_runner"
spectrafit-pkl-converter = "spectrafit.plugins.pkl_converter:command_line_runner"
spectrafit-rixs-converter = "spectrafit.plugins.rixs_converter:command_line_runner"
spectrafit-rixs-visualizer = "spectrafit.plugins.rixs_visualizer:command_line_runner"
spectrafit-jupyter = "spectrafit.app.app:jupyter"
spectrafit-pptx-converter = "spectrafit.plugins.pptx_converter:command_line_runner"
[tool.poetry.extras]
jupyter = ["jupyterlab", "plotly", "itables", "kaleido", "dtale", "python-pptx"]
jupyter-dash = [
"jupyter-dash",
"ipywidgets",
"dash-bootstrap-components",
"dash-bootstrap-templates",
]
graph = ["networkx", "pydot"]
all = [
"jupyterlab",
"plotly",
"itables",
"kaleido",
"dtale",
"networkx",
"pydot",
"jupyter-dash",
"ipywidgets",
"dash-bootstrap-components",
"dash-bootstrap-templates",
"python-pptx",
]
[tool.isort]
profile = "black"
force_single_line = true
atomic = true
include_trailing_comma = true
lines_after_imports = 2
lines_between_types = 1
use_parentheses = true
src_paths = ["poetry", "tests"]
skip_glob = ["*/setup.py"]
filter_files = true
known_first_party = "poetry"
[tool.black]
line-length = 88
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| test
| tests/.*/setup.py
)/
'''
[tool.flake8]
max-doc-length = 100
max-line-length = 88
ignore = ["E203", "W503", "W605"]
[tool.pytest]
script_launch_mode = "subprocess"
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "--cov=./spectrafit/ --cov-report=xml --diff-symbols --plots -vv"
testpaths = ["spectrafit"]
[tool.pydocstyle]
match = '.*\.py'
convention = "google"
[tool.mypy]
plugins = ["pydantic.mypy", "numpy.typing.mypy_plugin"]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
pretty = true
show_error_context = true
show_error_codes = true
exclude = "**/test/test_*.py"
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true