Skip to content

Commit fc2df69

Browse files
committed
build: moved module to src to ease tox/pytest/coverage setup
1 parent 10d05d2 commit fc2df69

12 files changed

+5
-11
lines changed

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include pylandstats/adjacency.pyx
1+
include src/pylandstats/adjacency.pyx

pyproject.toml

+2-8
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ exclude_lines = [
7171
ignore_errors = true
7272
omit = ["tests/*", "docs/conf.py"]
7373

74-
[tool.coverage.run]
75-
source = ["pylandstats"]
76-
77-
[tool.pytest.ini_options]
78-
addopts = ["--import-mode=importlib"]
79-
8074
[tool.ruff]
8175
line-length = 88
8276

@@ -91,11 +85,11 @@ known-first-party = ["pylandstats"]
9185

9286
[tool.ruff.lint.per-file-ignores]
9387
"**/__init__.py" = ["F403"]
94-
"pylandstats/landscape.py" = ["D401"] # for metric docstrings
88+
"src/pylandstats/landscape.py" = ["D401"] # for metric docstrings
9589
"tests/test_pylandstats.py" = ["D"]
9690

9791
[tool.ruff.lint.pydocstyle]
9892
convention = "numpy"
9993

10094
[tool.setuptools.packages.find]
101-
include = ["pylandstats", "pylandstats.*"]
95+
where = ["src"]

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
extensions = [
88
Extension(
99
name="pylandstats.adjacency",
10-
sources=["pylandstats/adjacency.pyx"],
10+
sources=["src/pylandstats/adjacency.pyx"],
1111
include_dirs=[np.get_include()],
1212
)
1313
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ allowlist_externals =
3232
extras =
3333
test
3434
commands =
35-
pytest -s --cov=pylandstats --cov-append --cov-report=xml --cov-report term-missing tests {posargs}
35+
pytest -s --cov=pylandstats tests {posargs}

0 commit comments

Comments
 (0)