-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpyproject.toml
More file actions
179 lines (162 loc) · 5.22 KB
/
pyproject.toml
File metadata and controls
179 lines (162 loc) · 5.22 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
173
174
175
176
177
178
179
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "edne-correios-loader"
dynamic = ["version"]
description = "Load Brazilian Correios' e-DNE Basico text files into your database to enable CEP search"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
keywords = ["Correios", "CEP", "endereço", "address", "DNE", "eDNE", "Brasil"]
authors = [
{ name = "Cauê Thenório", email = "caue@thenorio.com.br" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"click~=8.3",
"sqlalchemy~=2.0",
]
[project.urls]
Documentation = "https://github.com/cauethenorio/edne-correios-loader#readme"
Issues = "https://github.com/cauethenorio/edne-correios-loader/issues"
Source = "https://github.com/cauethenorio/edne-correios-loader"
[project.scripts]
edne-correios-loader = "edne_correios_loader.cli:edne_correios_loader"
[project.optional-dependencies]
postgresql = ["psycopg2-binary"]
mysql = ["pymysql"]
[tool.hatch.version]
path = "src/edne_correios_loader/__about__.py"
[tool.hatch.build.targets.sdist]
exclude = ["/tests", '.gitignore', '.rtx.toml']
[tool.hatch.build.targets.wheel]
packages = ["src/edne_correios_loader"]
[dependency-groups]
dev = [
"coverage[toml]>=6.5",
"pytest",
"pytest-mock",
"faker",
"pdbpp",
"python-dotenv",
"psycopg[binary]",
"pymysql",
"cryptography",
"ruff",
"testcontainers-postgres",
"testcontainers-mysql",
]
[tool.ruff]
target-version = "py310"
line-length = 88
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"A",
"ARG",
"B",
"B9",
"C",
"C4",
"DTZ",
"E", # pycodestyle errors (https://docs.astral.sh/ruff/rules/#error-e)
"EM",
"F", # pyflakes (https://docs.astral.sh/ruff/rules/#pyflakes-f)
"FBT",
"G",
"I", # isort (https://docs.astral.sh/ruff/rules/#isort-i)
"ICN",
"N", # pep8-naming (https://docs.astral.sh/ruff/rules/#pep8-naming-n)
"PIE",
"PLC",
"PLE",
"PLR",
"PLW",
"PTH",
"Q",
"RET",
"RUF",
"S", # flake8-bandit (https://docs.astral.sh/ruff/rules/#flake8-bandit-s)
"SIM",
"T",
"T10",
"T20",
"TID",
"TRY",
"UP", # pyupgrade (https://docs.astral.sh/ruff/rules/#pyupgrade-up)
"W", # pycodestyle warnings (https://docs.astral.sh/ruff/rules/#warning-w)
"YTT" # flake8-2020 (https://docs.astral.sh/ruff/rules/#flake8-2020-ytt)
]
ignore = [
# Allow non-abstract empty methods in abstract base classes
"B027",
# Allow multi-line imports
"E401",
# Allow boolean positional values in function calls, like `dict.get(... True)`
"FBT003",
# Ignore checks for possible passwords
"S105", "S106", "S107",
# Allow nested context manager as they are easier to read
"SIM117",
# Ignore complexity
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
# Allow relative imports
"TID252",
]
unfixable = [
# Don't touch unused imports
"F401",
# Don't touch unused variables
"F841",
# Don't touch unused function arguments
"ARG001"
]
[tool.ruff.lint.isort]
known-first-party = ["edne_correios_loader"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.per-file-ignores]
# Tests can use
"tests/**/*" = [
# magic values
"PLR2004",
# assertions
"S101",
# relative imports
"TID252",
# Ambiguous variable name
"E741",
# opening files without using a context manager
"SIM115",
]
[tool.coverage.run]
source_pkgs = ["edne_correios_loader", "tests"]
branch = true
parallel = true
omit = [
"src/edne_correios_loader/__about__.py",
"tests/conftest.py",
]
[tool.coverage.paths]
edne_correios_loader = [
"src/edne_correios_loader",
"*/edne-correios-loader/src/edne_correios_loader"
]
tests = ["tests", "*/edne-correios-loader/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]