1{
2 lib,
3 buildPythonPackage,
4 fastjsonschema,
5 fetchFromGitHub,
6 future-typing,
7 inflection,
8 orjson,
9 pandas,
10 pendulum,
11 poetry-core,
12 pydantic,
13 pytestCheckHook,
14 pythonOlder,
15 sqlalchemy,
16 ujson,
17}:
18
19buildPythonPackage rec {
20 pname = "typical";
21 version = "2.9.0";
22 pyproject = true;
23
24 disabled = pythonOlder "3.10";
25
26 src = fetchFromGitHub {
27 owner = "seandstewart";
28 repo = "typical";
29 tag = "v${version}";
30 hash = "sha256-RS4hJ7NufClroRPRO3EyHwDaMgg0s0F7D/mqcBr8O18=";
31 };
32
33 pythonRelaxDeps = [ "pendulum" ];
34
35 build-system = [ poetry-core ];
36
37 dependencies = [
38 fastjsonschema
39 future-typing
40 inflection
41 orjson
42 pendulum
43 ujson
44 ];
45
46 nativeCheckInputs = [
47 pandas
48 pydantic
49 pytestCheckHook
50 sqlalchemy
51 ];
52
53 disabledTests = [
54 # ConstraintValueError: Given value <{'key...
55 "test_tagged_union_validate"
56 # TypeError: 'NoneType' object cannot be interpreted as an integer
57 "test_ujson"
58 # Failed: DID NOT RAISE <class 'ValueError'>
59 "test_invalid_path"
60 # AssertionError
61 "test_primitive"
62 "test_tojson"
63 "test_transmute_simple"
64 ];
65
66 disabledTestPaths = [
67 # We don't care about benchmarks
68 "benchmark/"
69 # Tests are failing on Hydra
70 "tests/mypy/test_mypy.py"
71 ];
72
73 pythonImportsCheck = [ "typic" ];
74
75 meta = with lib; {
76 description = "Python library for runtime analysis, inference and validation of Python types";
77 homepage = "https://python-typical.org/";
78 changelog = "https://github.com/seandstewart/typical/releases/tag/v${version}";
79 license = licenses.mit;
80 maintainers = with maintainers; [ kfollesdal ];
81 };
82}