20 buildPythonPackage rec {
25 disabled = pythonOlder "3.7";
27 src = fetchFromGitHub {
30 rev = "refs/tags/${version}";
31 hash = "sha256-4orpoYfPGSvquhg9w63uUe8QbBa2RUpxaEJ9uy28+fU=";
36 substituteInPlace pyproject.toml \
37 --replace-fail '"--cov-fail-under=100",' "" \
38 --replace-fail '"--cov=deal",' "" \
39 --replace-fail '"--cov-report=html",' "" \
40 --replace-fail '"--cov-report=term-missing:skip-covered",' ""
43 build-system = [ flit-core ];
63 # Tests need internet access
66 "test_raises_doesnt_override_another_contract"
67 "test_raises_doesnt_override_another_contract_async"
68 "test_raises_generator"
69 # AttributeError: module 'vaa' has no attribute 'Error'
70 "test_source_vaa_scheme"
71 "test_vaa_scheme_and_custom_exception"
72 "test_scheme_string_validation_args_correct"
73 "test_method_chain_decorator_with_scheme_is_fulfilled"
74 "test_scheme_contract_is_satisfied_when_setting_arg"
75 "test_scheme_contract_is_satisfied_within_chain"
76 "test_scheme_errors_rewrite_message"
80 "test_source_get_lambda_multiline_splitted_dec"
84 # Test needs internet access
85 "tests/test_runtime/test_offline.py"
86 # depends on typeguard <4.0.0 for tests, but >=4.0.0 seems fine for runtime
87 # https://github.com/life4/deal/blob/9be70fa1c5a0635880619b2cea83a9f6631eb236/pyproject.toml#L40
88 "tests/test_testing.py"
91 pythonImportsCheck = [ "deal" ];
94 description = "Library for design by contract (DbC) and checking values, exceptions, and side-effects";
96 In a nutshell, deal empowers you to write bug-free code.
97 By adding a few decorators to your code, you get for free tests, static analysis, formal verification,
100 homepage = "https://github.com/life4/deal";
101 changelog = "https://github.com/life4/deal/releases/tag/${version}";
102 license = licenses.mit;
103 maintainers = with maintainers; [ gador ];