Moved project into a src-based layout and reorganized tests.
CI / Formatting (push) Failing after 5s
CI / Linting (push) Successful in 5s
CI / Tests (push) Successful in 8s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 4s

This commit is contained in:
2026-06-16 14:21:02 -04:00
parent 1aafecf20e
commit 49062159f9
30 changed files with 47 additions and 8 deletions
+15 -6
View File
@@ -44,24 +44,33 @@ build-backend = "hatchling.build"
source = "vcs"
[tool.hatch.build.targets.wheel]
packages = ["crabstero"]
packages = ["src/crabstero"]
[tool.hatch.build.hooks.vcs]
version-file = "crabstero/_version.py"
version-file = "src/crabstero/_version.py"
[tool.mypy]
python_version = "3.14"
strict = true
warn_unreachable = true
explicit_package_bases = true
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
pythonpath = ["src"]
addopts = [
"--import-mode=importlib",
"--strict-config",
"--strict-markers",
]
xfail_strict = true
[tool.ruff]
target-version = "py314"
extend-exclude = ["crabstero/_version.py"] # auto-generated by hatch-vcs
extend-exclude = ["src/crabstero/_version.py"] # auto-generated by hatch-vcs
[tool.ruff.lint]
select = ["ALL"]
@@ -81,7 +90,7 @@ ignore = [
]
[tool.ruff.lint.per-file-ignores]
"crabstero/__init__.py" = ["E402"] # version fallback is resolved before public imports
"src/crabstero/__init__.py" = ["E402"] # version fallback is resolved before public imports
"tests/**" = [
"S101", # assert is standard for pytest
"S311", # pseudo-random generators are fine in tests
@@ -91,12 +100,12 @@ ignore = [
]
[tool.codespell]
skip = "crabstero/_version.py,uv.lock"
skip = "src/crabstero/_version.py,uv.lock"
[tool.coverage.run]
source = ["crabstero"]
omit = [
"crabstero/_version.py",
"src/crabstero/_version.py",
]
[tool.coverage.report]