forked from moj-analytical-services/splink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
146 lines (128 loc) · 3.62 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[tool.poetry]
name = "splink"
version = "4.0.4"
description = "Fast probabilistic data linkage at scale"
authors = ["Robin Linacre <[email protected]>", "Sam Lindsay", "Theodore Manassis", "Tom Hepworth", "Andy Bond", "Ross Kennedy"]
license = "MIT"
homepage = "https://github.com/moj-analytical-services/splink"
repository = "https://github.com/moj-analytical-services/splink"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8.0,<4.0.0"
jsonschema = ">=3.2"
# 1.3.5 is the last version supporting py 3.7.1
pandas = ">1.3.5"
duckdb = ">=0.9.2"
sqlglot = ">=13.0.0"
altair = "^5.0.1"
Jinja2 = ">=3.0.3"
# need to manually specify numpy versions suitable for CI
# 1.24.4 works with python 3.8, but not 3.12
numpy = [
# version is minimum valid with above listed pandas version
{version=">=1.17.3", python = "<3.12"},
{version=">=1.26.0", python = ">=3.12"},
]
# Optional installs
# python >=3.12 requires pyspark >=4.0.0 - currently unreleased
pyspark = {version=">=3.2.1", optional=true}
awswrangler = [
{version=">=3.0.0,<4.0.0", python = ">=3.8", optional=true}
]
psycopg2-binary = {version=">=2.8.0", optional=true}
# for graph metrics
igraph = { version = ">=0.11.2", python = ">=3.8", optional=true }
[tool.poetry.group.dev]
[tool.poetry.group.dev.dependencies]
tabulate = ">=0.8.9"
pyspark = ">=3.2.1"
sqlalchemy = ">=1.4.0"
# temporarily use binary version, to avoid issues with pg_config path
psycopg2-binary = ">=2.8.0"
igraph = ">=0.11.2"
[tool.poetry.group.linting]
[tool.poetry.group.linting.dependencies]
ruff = "^0.4.2"
[tool.poetry.group.testing]
[tool.poetry.group.testing.dependencies]
# pin to reduce dependencies
pytest = ">=7.3"
pyarrow = ">=7.0.0"
networkx = ">=2.5.1"
rapidfuzz = ">=2.0.3"
[tool.poetry.group.typechecking]
optional = true
[tool.poetry.group.typechecking.dependencies]
mypy = "1.9.0"
[tool.poetry.extras]
pyspark = ["pyspark"]
spark = ["pyspark"]
athena = ["awswrangler"]
postgres = ["sqlalchemy", "psycopg2-binary"]
[build-system]
requires = ["poetry-core>=1.0.8"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
profile = "black"
[tool.ruff]
line-length = 88
lint.select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# isort
"I001",
# bugbear
"B",
# flake8-print
"T20"
]
lint.ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"B006", # Do not use mutable data structures for argument defaults"
]
[tool.pytest.ini_options]
addopts = ["-m default"]
markers = [
# only tests where backend is irrelevant:
"core",
# see tests/decorator.py::dialect_groups for group details:
"default",
"all",
# backend-specific sets
"duckdb",
"duckdb_only",
"spark",
"spark_only",
"sqlite",
"sqlite_only",
"postgres",
"postgres_only",
]
[tool.mypy]
packages = "splink"
# for now at least allow implicit optionals
# to cut down on noise. Easy to fix.
implicit_optional = true
# for now, ignore missing imports
# can remove later and install stubs, where existent
ignore_missing_imports = true
# options for strict mode
# too much to handle at once, so opt-in a little at a time
# https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
strict_equality = true
# don't worry about warning: https://github.com/python/mypy/issues/16189
strict_concatenate = true
check_untyped_defs = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
# further strict checks to add in:
# disallow_untyped_calls = true
disallow_incomplete_defs = true
# disallow_untyped_defs = true