aboutsummaryrefslogtreecommitdiff
path: root/pyproject.toml
diff options
context:
space:
mode:
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml41
1 files changed, 16 insertions, 25 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 8b906c6..aab4b3f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,10 +1,6 @@
[build-system]
-#requires = ["setuptools"]
-#build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"
-#requires = ["pdm-backend"]
-#build-backend = "pdm.backend"
[project]
name = "wikiget"
@@ -51,21 +47,19 @@ Repository = "https://github.com/clpo13/wikiget"
[project.scripts]
wikiget = "wikiget.wikiget:main"
-[tool.setuptools.dynamic]
-version = {attr = "wikiget.version.__version__"}
-
[tool.hatch.version]
-path = "wikiget/version.py"
+path = "src/wikiget/version.py"
-#[tool.pdm]
-#version = { source = "file", path = "wikiget/version.py" }
+[tool.pytest.ini_options]
+addopts = [
+ "--import-mode=importlib",
+]
+testpaths = ["tests"]
-#[tool.pytest.ini_options]
-#addopts = [
-# "--import-mode=importlib",
-# "--cov=wikiget",
-#]
-#testpaths = ["test"]
+[tool.hatch.build.targets.sdist]
+exclude = [
+ "/.github",
+]
[tool.hatch.envs.default]
dependencies = [
@@ -73,8 +67,8 @@ dependencies = [
"pytest",
]
[tool.hatch.envs.default.scripts]
-test = "pytest {args:test}"
-test-cov = "coverage run -m pytest {args:test}"
+test = "python -m pytest {args}"
+test-cov = "coverage run -m pytest {args}"
cov-report = [
"- coverage combine",
"coverage report",
@@ -95,7 +89,7 @@ dependencies = [
"ruff",
]
[tool.hatch.envs.lint.scripts]
-typing = "mypy --install-types --non-interactive {args:wikiget test}"
+typing = "mypy --install-types --non-interactive {args:src/wikiget tests}"
style = [
"ruff {args:.}",
"black --check --diff {args:.}",
@@ -169,19 +163,16 @@ ban-relative-imports = "all"
[tool.ruff.per-file-ignores]
# Tests can use magic values, assertions, and relative imports
-"test/**/*" = ["PLR2004", "S101", "TID252"]
+"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.coverage.run]
source_pkgs = ["wikiget"]
branch = true
parallel = true
-omit = [
- "wikiget/version.py",
-]
[tool.coverage.paths]
-hatchtest = ["wikiget"]
-tests = ["test"]
+wikiget = ["wikiget"]
+tests = ["tests"]
[tool.coverage.report]
exclude_lines = [