-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
187 lines (162 loc) · 4.96 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
[tool.poetry]
name = "id-translation"
version = "0.12.2.dev1"
description = "Convert IDs into human-readable labels."
authors = ["Richard Sundqvist <[email protected]>"]
readme = "README.md"
homepage = "https://github.com/rsundqvist/id-translation"
repository = "https://github.com/rsundqvist/id-translation"
documentation = "https://id-translation.readthedocs.io"
keywords = ["id-translation"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/rsundqvist/id-translation/issues"
"Changelog" = "https://github.com/rsundqvist/id-translation/blob/master/CHANGELOG.md"
[tool.poetry.scripts]
[tool.poetry.dependencies]
python = "<4,>=3.11"
pandas = ">=2.0.3"
sqlalchemy = ">=2.0.5" # 2.0.5 (YANKED) is the minimum version where UUID tests pass for Microsoft SQL server.
rics = ">=4.0.1"
[tool.poetry.group.manual-extras.dependencies]
# Extras that must be available for docs + tests go here. Doc/test-only deps go in their respective groups.
polars = { version = "^1.7.1" }
dask = { version = ">=2024.4.1", extras = ["dataframe"] }
[tool.poetry.group.docs]
[tool.poetry.group.docs.dependencies]
# duplicate object warnings for sphinx>=4
# description: https://github.com/astropy/astropy/issues/11723
# https://github.com/astropy/astropy/pull/12270
sphinx = "^7.2.6"
sphinx-gallery = "^0.15.0"
pydata-sphinx-theme = "^0.15.2"
myst-parser = "^2.0.0"
nbsphinx = "^0.9.3"
ipython = "^8.22.2"
sphinxcontrib-programoutput = "^0.17.0"
[tool.poetry.group.notebooks]
optional = true
[tool.poetry.group.notebooks.dependencies]
jupyterlab = ">=3,<5"
ipywidgets = "*"
jupyterlab-execute-time = "*"
tqdm = "*"
[tool.poetry.group.test.dependencies]
pytest = "^8.1.1"
xdoctest = "^1.1.3"
coverage = "^7.4.4"
pytest-cov = ">=4.1,<6.0"
# Minio tests
s3fs = { version = "^2024.2.0", platform = "linux" }
# db drivers and related dependencies
pg8000 = "^1.30.5"
pymssql = "^2.2.11"
pymysql = "^1.1.0"
cryptography = "*"
[tool.poetry.group.devops.dependencies]
invoke = "^2.2.0"
mypy = "^1.12.0"
ruff = "^0.6.9"
safety = "^3.0.1"
codespell = "^2.2.6"
bump2version = "^1.0.1"
[tool.ruff]
line-length = 120
fix = true
unsafe-fixes = false
output-format = "grouped"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 80
line-ending = "lf"
[tool.ruff.lint]
exclude = ["notebooks/*"]
select = [
"ANN",
"S",
"I",
"B",
"D",
"F",
"W",
"E",
"SLOT",
"SIM",
"TID",
# "TD", TODOs
"TCH",
"ARG",
"PTH",
"NPY",
"PD",
"N",
"PERF",
"PLC",
"PLE",
"PLR",
"PLW",
"UP",
"FURB",
"RUF",
"TRY",
]
ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in method
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"ANN401",
"TID252", # Prefer absolute imports over relative imports from parent modules
"TRY003", # Avoid specifying long messages outside the exception class
"TRY300", # Consider moving this statement to an `else` block
"PD901", # Avoid using the generic variable name `df` for DataFrames
"PLC0415", # `import` should be at the top-level of a file
"PLR0913", #
"SIM108", # Use ternary operator - coverage issue, see https://github.com/nedbat/coveragepy/issues/509
]
allowed-confusables = ["ℹ"] # ℹ️INFO in docstrings
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D",
"S101", # Allow 'assert' keyword
"ANN",
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"PLR2004", # Allow magic values
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]
"tests/offline/test_placeholder_translations.py" = ["PTH123"]
"tests/mapping/*" = ["ARG003", "ARG004", "ARG005"]
# D102 Missing docstring in public method - Docstrings are inherited, but linters
# can't realiably know this unless they import the code.
"src/id_translation/offline/_translation_map.py" = ["D102"]
"src/id_translation/testing.py" = ["D102"]
"src/id_translation/dio/integration/*" = ["D102"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pycodestyle]
max-line-length = 150
[tool.pytest]
[tool.pytest.ini_options]
filterwarnings = [
"error",
"ignore::pytest.PytestUnraisableExceptionWarning",
"ignore:Did not recognize type:sqlalchemy.exc.SAWarning",
"ignore:No fetcher given:UserWarning",
]
log_file_level = 10
log_file = "pytest.log"
[build-system]
requires = ["poetry-core>=1.0.8"]
build-backend = "poetry.core.masonry.api"