-
Notifications
You must be signed in to change notification settings - Fork 14
/
pyproject.toml
192 lines (178 loc) · 4.47 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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]
[project]
name = "spatialdata-plot"
description = "Static plotting for spatial data."
authors = [
{name = "scverse"},
]
maintainers = [
{name = "scverse", email = "[email protected]"},
]
urls.Documentation = "https://spatialdata.scverse.org/projects/plot/en/latest/index.html"
urls.Source = "https://github.com/scverse/spatialdata-plot.git"
urls.Home-page = "https://github.com/scverse/spatialdata-plot.git"
requires-python = ">=3.9"
dynamic= [
"version" # allow version to be set by git tags
]
license = {file = "LICENSE"}
readme = "README.md"
dependencies = [
"spatialdata>=0.2.1",
"matplotlib",
"scikit-learn",
"scanpy",
"matplotlib_scalebar",
]
[project.optional-dependencies]
dev = [
"bump2version",
]
docs = [
"sphinx>=4.5",
"sphinx-book-theme>=1.0.0",
"sphinx_rtd_theme",
"myst-nb",
"sphinxcontrib-bibtex>=1.0.0",
"sphinx-autodoc-typehints",
"sphinx-design",
# For notebooks
"ipython>=8.6.0",
"sphinx-copybutton",
]
test = [
"pytest",
"pytest-cov",
"pooch", # for scipy.datasets module
]
# this will be used by readthedocs and will make pip also look for pre-releases, generally installing the latest available version
pre = [
"spatialdata>=0.1.0-pre0"
]
[tool.coverage.run]
source = ["spatialdata_plot"]
omit = [
"**/test_*.py",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
xfail_strict = true
addopts = [
# "-Werror", # if 3rd party libs raise DeprecationWarnings, just use filterwarnings below
"--import-mode=importlib", # allow using test files with same name
"-s" # print output from tests
]
# info on how to use this https://stackoverflow.com/questions/57925071/how-do-i-avoid-getting-deprecationwarning-from-inside-dependencies-with-pytest
filterwarnings = [
# "ignore:.*U.*mode is deprecated:DeprecationWarning",
]
[tool.black]
line-length = 120
target-version = ['py39']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
)
'''
[tool.jupytext]
formats = "ipynb,md"
[tool.hatch.build.targets.wheel]
packages = ['src/spatialdata_plot']
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "_version.py"
[tool.hatch.metadata]
allow-direct-references = true
[tool.ruff]
exclude = [
".git",
".tox",
"__pycache__",
"build",
"docs/_build",
"dist",
"setup.py",
]
lint.ignore = [
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
"E731",
# allow I, O, l as variable names -> I is the identity matrix, i, j, k, l is reasonable indexing notation
"E741",
# Missing docstring in public package
"D104",
# Missing docstring in public module
"D100",
# Missing docstring in __init__
"D107",
# Missing docstring in magic method
"D105",
# Do not perform function calls in argument defaults.
"B008",
# Missing docstring in magic method
"D105",
]
line-length = 120
lint.select = [
"D", # flake8-docstrings
"I", # isort
"E", # pycodestyle
"F", # pyflakes
"W", # pycodestyle
"Q", # flake8-quotes
"SIM", # flake8-simplify
"TID", # flake-8-tidy-imports
"NPY", # NumPy-specific rules
"PT", # flake8-pytest-style
"B", # flake8-bugbear
"UP", # pyupgrade
"C4", # flake8-comprehensions
"BLE", # flake8-blind-except
"T20", # flake8-print
"RET", # flake8-raise
"PGH", # pygrep-hooks
]
lint.unfixable = ["B", "UP", "C4", "BLE", "T20", "RET"]
target-version = "py39"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D", "PT", "B024"]
"*/__init__.py" = ["F401", "D104", "D107", "E402"]
"docs/*" = ["D","B","E","A"]
# "src/spatialdata/transformations/transformations.py" = ["D101","D102", "D106", "B024", "T201", "RET504"]
"tests/conftest.py"= ["E402", "RET504"]
"src/spatialdata_plot/pl/utils.py"= ["PGH003"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.bumpver]
current_version = "0.0.2"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "bump version {old_version} -> {new_version}"
tag_message = "{new_version}"
tag_scope = "default"
pre_commit_hook = ""
post_commit_hook = ""
commit = true
tag = true
push = false
[tool.bumpver.file_patterns]
"pyproject.toml" = [
'current_version = "{version}"',
]
"README.md" = [
"{version}",
"{pep440_version}",
]