Skip to content

Commit 4b04b02

Browse files
committed
necessary changes
1 parent f0e8a9d commit 4b04b02

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ repos:
2323
rev: v4.6.0
2424
hooks:
2525
- id: trailing-whitespace
26-
exclude: scanpy/tests/_data
26+
exclude: tests/_data
2727
- id: end-of-file-fixer
28-
exclude: scanpy/tests/_data
28+
exclude: tests/_data
2929
- id: check-added-large-files
3030
- id: check-case-conflict
3131
- id: check-toml

pyproject.toml

+11-11
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ scanpy = "scanpy.cli:console_main"
8585

8686
[project.optional-dependencies]
8787
test-min = [
88-
"pytest>=7.4.2,!=8.1.*",
88+
"pytest>=8.2",
8989
"pytest-nunit",
9090
"pytest-mock",
9191
"pytest-cov",
@@ -153,26 +153,23 @@ rapids = ["cudf>=0.9", "cuml>=0.9", "cugraph>=0.9"] # GPU accelerated calculati
153153
dask = ["dask[array]>=2022.09.2"] # Use the Dask parallelization engine
154154
dask-ml = ["dask-ml", "scanpy[dask]"] # Dask-ML for sklearn-like API
155155

156-
[tool.hatch.build]
157-
exclude = ["scanpy/tests"]
158156
[tool.hatch.build.targets.wheel]
159-
# TODO: move scanpy to src/
160-
only-include = ["src/testing", "scanpy"]
161-
sources = ["src", "."]
157+
packages = ["src/testing", "src/scanpy"]
162158
[tool.hatch.version]
163159
source = "vcs"
164160
[tool.hatch.build.hooks.vcs]
165-
version-file = "scanpy/_version.py"
161+
version-file = "src/scanpy/_version.py"
166162

167163
[tool.pytest.ini_options]
168164
addopts = [
169165
"--import-mode=importlib",
170166
"--strict-markers",
171167
"--doctest-modules",
172168
"-ptesting.scanpy._pytest",
169+
"--pyargs",
173170
]
174-
testpaths = ["scanpy"]
175-
norecursedirs = ["scanpy/tests/_images"]
171+
testpaths = ["./tests", "scanpy"]
172+
norecursedirs = ["tests/_images"]
176173
xfail_strict = true
177174
nunit_attach_on = "fail"
178175
markers = [
@@ -206,7 +203,7 @@ filterwarnings = [
206203
[tool.coverage.run]
207204
data_file = "test-data/coverage"
208205
source_pkgs = ["scanpy"]
209-
omit = ["scanpy/tests/*", "src/testing/*"]
206+
omit = ["tests/*", "src/testing/*"]
210207
[tool.coverage.xml]
211208
output = "test-data/coverage.xml"
212209
[tool.coverage.paths]
@@ -219,6 +216,9 @@ exclude_also = [
219216
"@numba.njit.*",
220217
]
221218

219+
[tool.ruff]
220+
src = ["src"]
221+
222222
[tool.ruff.format]
223223
docstring-code-format = true
224224

@@ -247,7 +247,7 @@ ignore = [
247247
]
248248
[tool.ruff.lint.per-file-ignores]
249249
# Do not assign a lambda expression, use a def
250-
"scanpy/tools/_rank_genes_groups.py" = ["E731"]
250+
"src/scanpy/tools/_rank_genes_groups.py" = ["E731"]
251251
[tool.ruff.lint.isort]
252252
known-first-party = ["scanpy", "testing.scanpy"]
253253
required-imports = ["from __future__ import annotations"]

src/scanpy/_utils/compute/__init__.py

Whitespace-only changes.

src/scanpy/neighbors/_backends/__init__.py

Whitespace-only changes.

tests/test_embedding_plots.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def adata():
3434
from sklearn.datasets import make_blobs
3535

3636
empty_pixel = np.array([1.0, 1.0, 1.0, 0]).reshape(1, 1, -1)
37-
image = imread(HERE.parent.parent / "docs/_static/img/Scanpy_Logo_RGB.png")
37+
image = imread(HERE.parent / "docs/_static/img/Scanpy_Logo_RGB.png")
3838
x, y = np.where(np.logical_and.reduce(~np.equal(image, empty_pixel), axis=2))
3939

4040
# Just using to calculate the hex coords

0 commit comments

Comments
 (0)