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