forked from schuenke/BMCTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
127 lines (113 loc) · 3.13 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
[build-system]
requires = ["setuptools>=60", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "BMCTool"
version = "1.0.0"
description = "A python tool to perform Bloch-McConnell (BMC) simulations."
readme = "README.md"
requires-python = ">=3.11"
license = { file = "LICENSE" }
keywords = ["MRI, Bloch, Bloch-McConnell, CEST, simulation"]
authors = [{ name = "Patrick Schuenke", email = "patrick.schuenke@ptb.de" }]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = [
"numpy>=1.23,<3.0",
"matplotlib",
"tqdm",
"PyYAML",
"pypulseq",
]
[project.optional-dependencies]
test = [
"coverage",
"codecov",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-xdist",
]
lint = ["mypy", "ruff", "pre-commit"]
docs = ["sphinx", "sphinx_rtd_theme", "sphinx-pyproject"]
[project.urls]
"repository" = "https://github.com/schuenke/BMCTool"
# PyTest section
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = ["error"]
# MyPy section
[tool.mypy]
warn_return_any = true
check_untyped_defs = true
warn_no_return = true
warn_unreachable = true
warn_unused_ignores = true
exclude = ["docs"]
[tool.ruff]
line-length = 120
extend-exclude = ["__init__.py"]
exclude = ["docs/**"]
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"E", # pycodestyle errors
"F", # Pyflakes
"FA", # flake8-future-annotations
"I", # isort
"N", # pep8-naming
"NPY", # NumPy-specific rules
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"UP", # pyupgrade
"PIE", # flake8-pie
"PTH", # flake8-use-pathlib
"T20", # flake8-print
"Q", # flake8-quotes
"W", # pycodestyle warnings
"YTT", # flake8-2020
"ERA", # flake8-eradicate
]
extend-select = [
"ANN001", # type annotation for function argument
"ANN201", # return type annonation public function
"ANN205", # return type annonation static method
"ANN401", # any type annotation
"BLE001", # blind exception
"D107", # missing docstring in __init__
"D415", # first line should end with punctuation
"D417", # undocumented-parameter
]
ignore = [
"B024", # ABC without abstractmethod
"N999", # invalid module name
"COM812", # missing-trailing-comma (conflict with formatter)
"SIM108", # if-else-block-instead-of-if-exp
]
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
quote-style = "single"
skip-magic-trailing-comma = false
[tool.typos.default]
locale = "en-us"
[tool.typos.default.extend-words]
Reson = "Reson" # required for Proc. Intl. Soc. Mag. Reson. Med.
NOE = "NOE" # Nuclear Overhauser Effect
[tool.coverage.paths]
source = ["src", "*/site-packages"]