-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (156 loc) · 5.93 KB
/
Copy pathpyproject.toml
File metadata and controls
172 lines (156 loc) · 5.93 KB
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
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "opg_pipeline_builder"
version = "0.4.0"
description = "Provides common re-usable components for building OPG data pipelines"
readme = "README.md"
requires-python = ">=3.12, <3.13"
dependencies = [
"aiobotocore>=2.26.0",
"awswrangler>=3.11.0",
"boto3==1.41.5",
"croniter>=6.0.0",
"data-linter>=6.3.3",
"dataengineeringutils3>=1.4.3",
"pyarrow>=18.1.0",
"pydantic>=2.11.4",
"pydbtools>=5.8.1",
"s3fs==2025.12.0",
"ssm-parameter-store>=19.11.0",
]
[tool.uv]
package = true
[project.optional-dependencies]
dev = [
"bandit>=1.8.6",
"detect-secrets>=1.5.0",
"duckdb>=1.2.2",
"mkdocs-material>=9.6.12",
"mkdocstrings>=0.29.1",
"mkdocstrings-python>=1.16.10",
"mypy>=1.19.1",
"pre-commit>=4.2.0",
"ruff>=0.14.8",
"safety>=3.2.9",
"sqlglot>=26.16.4",
"types-python-dateutil>=2.9.0.20260408",
"types-pyyaml>=6.0.12.20260408",
]
test = [
"duckdb>=1.2.2",
"moto>=5.1.4",
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"pytest-mock>=3.14.0",
]
[tool.pytest.ini_options]
addopts = "--cov=src --cov-report=term-missing"
[tool.lint.coverage.paths]
source = ["src", "tests"]
[tool.lint.coverage.run]
branch = true
source = ["src", "tests"]
[tool.lint.coverage.report]
show_missing = true
[tool.mypy]
strict = true
disallow_untyped_defs = true
exclude = "migrations|dist|build|typings"
explicit_package_bases = true
warn_unused_ignores = true
show_error_codes = true
mypy_path = "src"
ignore_missing_imports = true
[tool.lint.ruff]
select = [
"A", # flake8-builtins (redefinition of bultins)
"ANN", # flake8-annotations (type annotations are everywhere)
"ARG", # flake8-unused-arguments (unused argument in function/method/class/lambda)
"B", # flake8-bugbear (bugs & design problems)
"B9", # flake8-bugbear strict (bugs & design problems)
"BLE", # flake8-blind-except (no "except:" or "except Exception:")
"COM", # flake8-commas (force trailing commas) -> unelegant
"C4", # flake8-comprehensions (better list/set/dict comprehensions)
"C90", # McCabe (code complexity)
"D", # pydocstyle (documentation style)
"DJ", # flake8-django (practices on Django)
"DTZ", # flake8-datetimez (usage of unsafe naive datetime class)
"E", # pycodestyle (violation of PEP-8)
"EM", # flake8-errmsg (format error messages)
"EXE", # flake8-executable (executable permissions and shebangs)
"ERA", # eradicate (no commented-out code)
"F", # pyflakes (invalid Python code)
"FBT", # flake8-boolean-trap (misusage of booleans in function declaration & calls)
"G", # flake8-logging-format (logging format strings)
"I", # isort (import order)
"ICN", # flake8-import-conventions (how certain packages should be imported or aliased)
# "INP", # flake8-no-pep420 (ban PEP-420 implicit namespace packages) -> long live implicit namespace packages!
"INT", # flake8-gettext (f-string resolved before function calls)
"ISC", # flake8-implicit-str-concat (string literal concatenation)
"N", # pep8-naming (naming conventions)
"NPY", # NumPy-specific rules (e.g. deprecated-type-alias and legacy-random)
"PD", # pandas-vet (pandas code)
"PIE", # flake8-pie (miscellaneous lints)
"PGH", # pygrep-hooks (miscellaneous lints, e.g. "use specific rule codes when using noqa")
"PL", # Pylint (static code analyser)
"PT", # flake8-pytest-style (style issues or inconsistencies with pytest-based tests)
"PTH", # flake8-use-pathlib (use of functions that can be replaced by pathlib module)
"PYI", # flake8-pyi (provide specializations for type hinting stub files)
"Q0", # flake8-quotes (avoid escaping quotes)
"RSE", # flake8-raise (improvements for raise statements)
"RET", # flake8-return (check return values)
"RUF", # ruff-specific rules
"S", # flake8-bandit (security)
"SIM", # flake8-simplify (tips to simplify the code)
"SLF", # flake8-self (private member access)
"T10", # flake8-debugger
"T20", # flake8-print (no print nor pprint)
"TCH", # flake8-type-checking (move import only intended for type-checking in "if TYPE_CHECKING" blocs)
"TID", # flake8-tidy-imports (ordonated imports)
"TRY", # tryceratops (exception handling AntiPatterns)
"UP", # pyupgrade (upgrate syntax for newer versions of Python)
"YTT", # flake8-2020 (misuse of sys.version and sys.version_info)
"W" # pycodestyle (violation of PEP-8)
]
ignore = [
"ANN101", # missing type annotation for self, but hinting self all the time is useless
"ANN102", # missing type annotation for cls but hinting cls all the time is useless
"ANN401", # disallows Any, but some elements should be Any when they are external
"B024", # forces abstract classes to have at least one abstract method, but sometimes a class is virtually abstract
"D100", # Missing docstring in public module
"D105", # docstrings on magic methods, useless docstrings are well known
"E501", # line size, but bug-bear already set it with a tolerance of 10% (B950)
"UP007" # ignore or-wise typing for py3.9 support
]
exclude = ["typings", "playground"]
[tool.lint.ruff.per-file-ignores]
"docs/conf.py" = [
"A001", # redefine some builtins (like "copyright") is OK in docs
]
"noxfile.py" = [
"D402" # repeating the name of the function is OK for nox since it's to display it to the user
]
"tests/*" = [
"ARG", # some arguments are unused in tests functions but useful (e.g. mocks)
"S101", # asserts are OK for tests
"SLF001" # accessing private members is OK for tests
]
[tool.lint.ruff.pydocstyle]
convention = "google"
[tool.lint.ruff.isort]
known-first-party = ["src", "tests"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.lint.isort]
profile = "black"
line_length = 88
known_first_party = ["src", "tests"]
[tool.lint.bandit]
skips = [
"B101", # assert used
]