1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 babel,
7 banal,
8 fingerprints,
9 jellyfish,
10 jinja2,
11 normality,
12 python-stdnum,
13 pytz,
14 pyyaml,
15 rapidfuzz,
16 typing-extensions,
17 pytestCheckHook,
18}:
19
20buildPythonPackage rec {
21 pname = "rigour";
22 version = "0.8.2";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "opensanctions";
27 repo = "rigour";
28 tag = "v${version}";
29 hash = "sha256-endggriOj+DBWfcYDQ034OvzxVCaHV9QUMAk0qtSYPg=";
30 };
31
32 build-system = [
33 hatchling
34 ];
35
36 dependencies = [
37 babel
38 banal
39 fingerprints
40 jellyfish
41 jinja2
42 normality
43 python-stdnum
44 pytz
45 pyyaml
46 rapidfuzz
47 typing-extensions
48 ];
49
50 nativeCheckInputs = [ pytestCheckHook ];
51
52 pythonImportsCheck = [
53 "rigour"
54 "rigour.names"
55 "rigour.ids"
56 "rigour.langs"
57 "rigour.mime"
58 "rigour.addresses"
59 ];
60
61 meta = {
62 description = "Data cleaning and validation functions for names, languages, identifiers, etc";
63 homepage = "https://opensanctions.github.io/rigour";
64 license = lib.licenses.mit;
65 maintainers = with lib.maintainers; [ bcdarwin ];
66 };
67}