There was no noticeable positive impact from having coverage reports on every single test run. While adding a separate command to check coverage might be added in the future, the overhead of collecting the coverage for every test run made seems not worth it currently.
57 lines
1.6 KiB
TOML
57 lines
1.6 KiB
TOML
[build-system]
|
|
requires = ["setuptools"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "clan"
|
|
description = "clan cli tool"
|
|
dynamic = ["version"]
|
|
scripts = { clan = "clan_cli:main" }
|
|
license = { text = "MIT" }
|
|
|
|
[project.urls]
|
|
Homepage = "https://clan.lol/"
|
|
Documentation = "https://docs.clan.lol/"
|
|
Repository = "https://git.clan.lol/clan/clan-core"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["clan_lib*", "clan_cli*"]
|
|
exclude = ["clan_lib.nixpkgs*", "result"]
|
|
|
|
[tool.setuptools.package-data]
|
|
clan_cli = [
|
|
"py.typed",
|
|
"vms/mimetypes/**/*",
|
|
"webui/assets/**/*",
|
|
"flash/*.sh",
|
|
]
|
|
clan_lib = [
|
|
"clan_core_templates/**/*",
|
|
"**/allowed-packages.json",
|
|
"ssh/*.sh",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests", "clan_cli", "clan_lib"]
|
|
faulthandler_timeout = 240
|
|
log_level = "DEBUG"
|
|
log_format = "%(message)s"
|
|
addopts = "--durations 5 --color=yes --new-first -W error -n auto" # Add --pdb for debugging
|
|
norecursedirs = ["clan_cli/tests/helpers", "clan_lib/nixpkgs"]
|
|
# All tests which evaluate any nix library code from clan-core need to use the
|
|
# `with_core` marker, so basically all tests which evaluate a flake with
|
|
# machines. In the CI pipeline we run these tests in a separate derivation
|
|
# depending on clan-core. All other tests do not need to depend on clan-core
|
|
# and can be cached more effectively.
|
|
markers = ["impure", "with_core"]
|
|
filterwarnings = "default::ResourceWarning"
|
|
python_files = ["test_*.py", "*_test.py"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
warn_redundant_casts = true
|
|
disallow_untyped_calls = true
|
|
disallow_untyped_defs = true
|
|
no_implicit_optional = true
|
|
exclude = "clan_lib.nixpkgs"
|