-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving source directory to src/anndata #1151
Changes from 34 commits
0f916d3
3159ae5
96994af
28df752
50be530
f1e3b8e
5fdbc60
878d2fd
8ae217e
abad630
4471d95
9650876
55e1f0e
09343e9
bdf7447
d2ea31b
e627fdd
61d8ecc
55afbaa
4f619f2
77a744d
7019f39
fbd89ab
d4ab295
edd2ca2
062717f
d4170cb
6f07f81
fbd5a3f
6e55886
99dcc98
2992a35
6c28074
b0efbc2
30d7891
8a845af
045c19c
a834c42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ doc = [ | |
] | ||
test = [ | ||
"loompy>=3.0.5", | ||
"pytest>=7.3", | ||
"pytest>=8.1", | ||
"pytest-cov>=2.10", | ||
"zarr", | ||
"matplotlib", | ||
|
@@ -102,15 +102,21 @@ test = [ | |
gpu = ["cupy"] | ||
|
||
[tool.hatch.build] | ||
exclude = ["anndata/tests/test_*.py", "anndata/tests/data"] | ||
exclude = [ | ||
"src/anndata/tests/conftest.py", | ||
"src/anndata/tests/test_*.py", | ||
"src/anndata/tests/data", | ||
] | ||
[tool.hatch.version] | ||
source = "vcs" | ||
[tool.hatch.build.hooks.vcs] | ||
version-file = "anndata/_version.py" | ||
version-file = "src/anndata/_version.py" | ||
|
||
[tool.coverage.run] | ||
source = ["anndata"] | ||
omit = ["anndata/_version.py", "**/test_*.py"] | ||
source_pkgs = ["anndata"] | ||
omit = ["src/anndata/_version.py", "**/test_*.py"] | ||
[tool.coverage.paths] | ||
source = ["./src", "**/site-packages"] | ||
|
||
[tool.coverage.report] | ||
exclude_also = [ | ||
|
@@ -119,8 +125,10 @@ exclude_also = [ | |
|
||
[tool.pytest.ini_options] | ||
addopts = [ | ||
# "--import-mode=importlib", # TODO: enable | ||
"--strict-markers", | ||
"--doctest-modules", | ||
"--pyargs", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I totally get this argument. What does this do other than let us use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because doctests are weird and would otherwise result in importing some modules as files and others via pytest imports the files that hosts doctests. If they are in a Using |
||
] | ||
filterwarnings = [ | ||
'ignore:Support for Awkward Arrays is currently experimental', | ||
|
@@ -137,11 +145,17 @@ filterwarnings_when_strict = [ | |
"default::dask.array.core.PerformanceWarning", | ||
] | ||
python_files = "test_*.py" | ||
testpaths = ["anndata", "docs/concatenation.rst"] | ||
testpaths = [ | ||
"anndata", # docstrings and unit tests (module name due to --pyargs) | ||
"./docs/concatenation.rst", # further doctests | ||
] | ||
# For some reason this effects how logging is shown when tests are run | ||
xfail_strict = true | ||
markers = ["gpu: mark test to run on GPU"] | ||
|
||
[tool.ruff] | ||
src = ["src"] | ||
|
||
[tool.ruff.format] | ||
docstring-code-format = true | ||
|
||
|
@@ -166,7 +180,7 @@ ignore = [ | |
] | ||
[tool.ruff.lint.per-file-ignores] | ||
# E721 comparing types, but we specifically are checking that we aren't getting subtypes (views) | ||
"anndata/tests/test_readwrite.py" = ["E721"] | ||
"src/anndata/tests/test_readwrite.py" = ["E721"] | ||
[tool.ruff.lint.isort] | ||
known-first-party = ["anndata"] | ||
required-imports = ["from __future__ import annotations"] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some explanation of why, link to a relevant issue here would be good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because you said so. there’s no issue that I’m aware of.
You said something along the lines of “let’s not make too many changes at once because this is fragile. Let’s do that when we move the tests out of the package.”