11[build-system ]
22build-backend = " hatchling.build"
3- requires = [" hatchling" , " hatch-vcs" ]
3+ requires = [" hatchling" , " hatch-vcs" , " hatch-fancy-pypi-readme " ]
44
55[project ]
66name = " spatialdata-plot"
7+ dynamic = [" readme" , " version" ]
78description = " Static plotting for spatial data."
9+ requires-python = " >=3.11"
10+ license = " BSD-3-Clause"
11+ classifiers = [
12+ " Development Status :: 4 - Beta" ,
13+ " Intended Audience :: Science/Research" ,
14+ " Natural Language :: English" ,
15+ " Operating System :: POSIX :: Linux" ,
16+ " Operating System :: MacOS :: MacOS X" ,
17+ " Typing :: Typed" ,
18+ " Programming Language :: Python :: 3" ,
19+ " Programming Language :: Python :: 3.11" ,
20+ " Programming Language :: Python :: 3.12" ,
21+ " Programming Language :: Python :: 3.13" ,
22+ " Environment :: Console" ,
23+ " Framework :: Jupyter" ,
24+ " Topic :: Scientific/Engineering :: Bio-Informatics" ,
25+ " Topic :: Scientific/Engineering :: Visualization" ,
26+ ]
27+ keywords = [
28+ " spatial omics" ,
29+ " spatial data analysis" ,
30+ " visualization" ,
31+ " plotting" ,
32+ " bio-informatics" ,
33+ " single-cell" ,
34+ ]
835authors = [
9- {name = " scverse" },
36+ {name = " Tim Treis" },
37+ {name = " Wouter-Michiel Vierdag" },
38+ {name = " Sonja Stockhaus" },
1039]
1140maintainers = [
12- {name = " scverse" , email = " tim.treis@helmholtz-munich.de" },
13- ]
14- urls.Documentation = " https://spatialdata.scverse.org/projects/plot/en/latest/index.html"
15- urls.Source = " https://github.com/scverse/spatialdata-plot.git"
16- urls.Home-page = " https://github.com/scverse/spatialdata-plot.git"
17- requires-python = " >=3.10"
18- dynamic = [
19- " version" # allow version to be set by git tags
41+ {name = " Tim Treis" , email = " tim.treis@helmholtz-munich.de" },
2042]
21- license = {file = " LICENSE" }
22- readme = " README.md"
43+
2344dependencies = [
2445 " spatialdata>=0.3.0" ,
25- " matplotlib" ,
26- " scikit-learn" ,
27- " scanpy" ,
28- " matplotlib_scalebar" ,
46+ " matplotlib>=3.3" ,
47+ " matplotlib-scalebar>=0.8.0" ,
48+ " scikit-learn>=0.24.0" ,
49+ " scanpy>=1.9.3" ,
50+ " numpy>=1.23.0" ,
51+ " pandas>=2.1.0" ,
2952]
3053
3154[project .optional-dependencies ]
3255dev = [
33- " bump2version" ,
56+ " pre-commit>=3.0.0" ,
57+ " hatch>=1.9.0" ,
58+ " jupyterlab" ,
59+ " notebook" ,
60+ " ipykernel" ,
61+ " ipywidgets" ,
62+ " jupytext" ,
63+ " pytest" ,
64+ " pytest-cov" ,
65+ " ruff" ,
66+ ]
67+ test = [
68+ " pytest>=7" ,
69+ " pytest-xdist>=3" ,
70+ " pytest-mock>=3.5.0" ,
71+ " pytest-cov>=4" ,
72+ " coverage[toml]>=7" ,
73+ " pytest-timeout>=2.1.0" ,
74+ " pooch" , # for scipy.datasets module
3475]
3576docs = [
36- " sphinx>=4.5" ,
77+ " ipython>=8.6.0" ,
78+ " ipywidgets>=8.0.0" ,
79+ " sphinx>=5.3" ,
80+ " sphinx-autodoc-annotation" ,
81+ " sphinx-autodoc-typehints>=1.10.3" ,
3782 " sphinx-book-theme>=1.0.0" ,
3883 " sphinx_rtd_theme" ,
39- " myst-nb" ,
40- " sphinxcontrib-bibtex>=1.0.0" ,
41- " sphinx-autodoc-typehints" ,
84+ " sphinxcontrib-bibtex>=2.3.0" ,
85+ " myst-nb>=0.17.1" ,
4286 " sphinx-design" ,
43- # For notebooks
44- " ipython>=8.6.0" ,
45- " sphinx-copybutton" ,
46- ]
47- test = [
48- " pytest" ,
49- " pytest-cov" ,
50- " pooch" , # for scipy.datasets module
87+ " sphinx-copybutton>=0.5.0" ,
5188]
5289# this will be used by readthedocs and will make pip also look for pre-releases, generally installing the latest available version
5390pre = [
5491 " spatialdata>=0.1.0-pre0"
5592]
5693
94+ [project .urls ]
95+ Homepage = " https://github.com/scverse/spatialdata-plot"
96+ "Bug Tracker" = " https://github.com/scverse/spatialdata-plot/issues"
97+ Documentation = " https://spatialdata.scverse.org/projects/plot/en/latest/index.html"
98+ "Source Code" = " https://github.com/scverse/spatialdata-plot"
99+
57100[tool .coverage .run ]
101+ branch = true
102+ parallel = true
58103source = [" spatialdata_plot" ]
59104omit = [
105+ " */__init__.py" ,
106+ " */_version.py" ,
60107 " **/test_*.py" ,
61108]
62109
110+ [tool .coverage .paths ]
111+ source = [
112+ " spatialdata_plot" ,
113+ " */site-packages/spatialdata_plot" ,
114+ ]
115+
116+ [tool .coverage .report ]
117+ exclude_lines = [
118+ " \\ #.*pragma:\\ s*no.?cover" ,
119+ " ^if __name__ == .__main__.:$" ,
120+ " ^\\ s*raise AssertionError\\ b" ,
121+ " ^\\ s*raise NotImplementedError\\ b" ,
122+ " ^\\ s*return NotImplemented\\ b" ,
123+ ]
124+ show_missing = true
125+ precision = 2
126+ skip_empty = true
127+ sort = " Miss"
128+
63129[tool .pytest .ini_options ]
64130testpaths = [" tests" ]
65131xfail_strict = true
66132addopts = [
67- # "-Werror", # if 3rd party libs raise DeprecationWarnings, just use filterwarnings below
68133 " --import-mode=importlib" , # allow using test files with same name
69134 " -s" # print output from tests
70135]
71- # info on how to use this https://stackoverflow.com/questions/57925071/how-do-i-avoid-getting-deprecationwarning-from-inside-dependencies-with-pytest
72136filterwarnings = [
73- # "ignore:.*U.*mode is deprecated:DeprecationWarning",
137+ " ignore::UserWarning" ,
138+ " ignore::DeprecationWarning" ,
74139]
75140
76- [tool .jupytext ]
77- formats = " ipynb,md"
78-
79141[tool .hatch .build .targets .wheel ]
80- packages = [' src/spatialdata_plot' ]
142+ packages = [" src/spatialdata_plot" ]
81143
82144[tool .hatch .version ]
83145source = " vcs"
@@ -88,6 +150,11 @@ version-file = "_version.py"
88150[tool .hatch .metadata ]
89151allow-direct-references = true
90152
153+ [tool .hatch .metadata .hooks .fancy-pypi-readme ]
154+ content-type = " text/markdown"
155+ [[tool .hatch .metadata .hooks .fancy-pypi-readme .fragments ]]
156+ path = " README.md"
157+
91158[tool .ruff ]
92159line-length = 120
93160exclude = [
@@ -97,76 +164,97 @@ exclude = [
97164 " build" ,
98165 " docs/_build" ,
99166 " dist" ,
100- " setup.py" ,
167+ " setup.py"
101168]
169+
170+ [tool .ruff .format ]
171+ docstring-code-format = true
172+
102173[tool .ruff .lint ]
103174ignore = [
175+ # line too long -> we accept long comment lines; formatter gets rid of long code lines
176+ " E501" ,
104177 # Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
105178 " E731" ,
106179 # allow I, O, l as variable names -> I is the identity matrix, i, j, k, l is reasonable indexing notation
107180 " E741" ,
108181 # Missing docstring in public package
109182 " D104" ,
183+ # ... imported but unused
184+ " F401" ,
110185 # Missing docstring in public module
111186 " D100" ,
112187 # Missing docstring in __init__
113188 " D107" ,
114- # Missing docstring in magic method
115- " D105" ,
116189 # Do not perform function calls in argument defaults.
117190 " B008" ,
118191 # Missing docstring in magic method
119192 " D105" ,
193+ # Missing blank line before section
194+ " D411" ,
195+ # B024 Do not use `__class__` for string comparisons.
196+ " B024" ,
120197]
121198select = [
122- " D" , # flake8-docstrings
123199 " I" , # isort
124200 " E" , # pycodestyle
125201 " F" , # pyflakes
126202 " W" , # pycodestyle
127- " Q" , # flake8-quotes
128- " SIM" , # flake8-simplify
129- " TID" , # flake-8-tidy-imports
130- " NPY" , # NumPy-specific rules
131- " PT" , # flake8-pytest-style
132- " B" , # flake8-bugbear
203+ # below are not autofixed
133204 " UP" , # pyupgrade
134205 " C4" , # flake8-comprehensions
206+ " B" , # flake8-bugbear
135207 " BLE" , # flake8-blind-except
136- " T20" , # flake8-print
137- " RET" , # flake8-raise
138- " PGH" , # pygrep-hooks
139208]
140- unfixable = [" B" , " UP" , " C4" , " BLE" , " T20" , " RET" ]
209+ unfixable = [" B" , " C4" , " BLE" ]
210+
211+ [tool .ruff .lint .isort ]
212+ required-imports = [" from __future__ import annotations" ]
141213
142214[tool .ruff .lint .per-file-ignores ]
143- "tests/*" = [" D" , " PT" , " B024" ]
144- "*/__init__.py" = [" F401" , " D104" , " D107" , " E402" ]
145- "docs/*" = [" D" ," B" ," E" ," A" ]
146- # "src/spatialdata/transformations/transformations.py" = ["D101","D102", "D106", "B024", "T201", "RET504"]
147- "tests/conftest.py" = [" E402" , " RET504" ]
148- "src/spatialdata_plot/pl/utils.py" = [" PGH003" ]
149-
150- [tool .ruff .lint .pydocstyle ]
151- convention = " numpy"
152-
153- [tool .bumpver ]
154- current_version = " 0.0.2"
155- version_pattern = " MAJOR.MINOR.PATCH"
156- commit_message = " bump version {old_version} -> {new_version}"
157- tag_message = " {new_version}"
158- tag_scope = " default"
159- pre_commit_hook = " "
160- post_commit_hook = " "
161- commit = true
162- tag = true
163- push = false
164-
165- [tool .bumpver .file_patterns ]
166- "pyproject.toml" = [
167- ' current_version = "{version}"' ,
168- ]
169- "README.md" = [
170- " {version}" ,
171- " {pep440_version}" ,
172- ]
215+ "*/__init__.py" = [" D104" , " F401" ]
216+ "tests/*" = [" D" ]
217+ "docs/*" = [" D" , " B" ]
218+ "src/spatialdata_plot/pl/utils.py" = [" PGH003" ]
219+
220+ [tool .ruff .lint .flake8-tidy-imports ]
221+ # Disallow all relative imports.
222+ ban-relative-imports = " all"
223+
224+ [tool .pixi .workspace ]
225+ channels = [" conda-forge" ]
226+ platforms = [" osx-arm64" , " linux-64" ]
227+
228+ [tool .pixi .dependencies ]
229+ python = " >=3.11"
230+
231+ [tool .pixi .pypi-dependencies ]
232+ spatialdata-plot = { path = " ." , editable = true }
233+
234+ # for gh-actions
235+ [tool .pixi .feature .py311 .dependencies ]
236+ python = " 3.11.*"
237+
238+ [tool .pixi .feature .py313 .dependencies ]
239+ python = " 3.13.*"
240+
241+ [tool .pixi .environments ]
242+ # 3.11 lane
243+ dev-py311 = { features = [" dev" , " test" , " py311" ], solve-group = " py311" }
244+ docs-py311 = { features = [" docs" , " py311" ], solve-group = " py311" }
245+ test-py311 = { features = [" test" , " py311" ], solve-group = " py311" }
246+
247+ # 3.13 lane
248+ default = { features = [" py313" ], solve-group = " py313" }
249+ dev-py313 = { features = [" dev" , " test" , " py313" ], solve-group = " py313" }
250+ docs-py313 = { features = [" docs" , " py313" ], solve-group = " py313" }
251+ test-py313 = { features = [" test" , " py313" ], solve-group = " py313" }
252+
253+ [tool .pixi .tasks ]
254+ lab = " jupyter lab"
255+ kernel-install = " python -m ipykernel install --user --name pixi-dev --display-name \" spatialdata-plot (dev)\" "
256+ test = " pytest -v --color=yes --tb=short --durations=10"
257+ lint = " ruff check ."
258+ format = " ruff format ."
259+ pre-commit-install = " pre-commit install"
260+ pre-commit-run = " pre-commit run --all-files"
0 commit comments