Skip to content

Commit 42effa5

Browse files
Properly sort packaging and move code into a src dir
https://hynek.me/articles/testing-packaging/ thanks Hynek!
1 parent 0d88a8a commit 42effa5

7 files changed

Lines changed: 8 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fix:
2626

2727
.PHONY: test
2828
test:
29-
uv run coverage run --module pytest $(SRCDIR)
29+
uv run coverage run --module pytest test
3030
uv run coverage report
3131
uv run coverage html

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ dependencies = [
88
"structlog",
99
]
1010

11+
[build-system]
12+
requires = ["hatchling"]
13+
build-backend = "hatchling.build"
14+
1115
[tool.coverage.run]
1216
branch = true
1317
dynamic_context = "test_function"

src/python_template/__init__.py

Whitespace-only changes.

test/__init__.py

Whitespace-only changes.

test_sample.py renamed to test/test_sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import skeleton
1+
from python_template import skeleton
22

33

44
def test_nothing():

uv.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)