-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
180 lines (165 loc) · 4.29 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
[project]
name = "pg_upsert"
dynamic = ["version"]
authors = [{ name = "Caleb Grant", email = "[email protected]" }]
description = "A Python library for upserting data into postgres."
readme = { file = "README.md", content-type = "text/markdown" }
license = { file = "LICENSE" }
requires-python = ">=3.10,<3.14"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
]
dependencies = [
"psycopg2-binary>=2.9,<3",
"tabulate>=0.9,<0.10",
"pyyaml>=6.0.1,<7",
"typer>=0.15,<0.16",
]
keywords = ["postgresql", "postgres", "dbms", "etl", "upsert", "database"]
[project.optional-dependencies]
dev = [
"build",
"bump-my-version",
"markdown-include",
"mkdocs",
"mkdocstrings",
"mkdocstrings-python",
"mkdocs-material",
"pre-commit",
"pytest",
"pytest-cov",
"python-dotenv",
"ruff",
"tox-uv",
"twine",
]
[project.scripts]
pg-upsert = "pg_upsert.cli:app"
[tool.setuptools.dynamic]
version = { attr = "pg_upsert.__version__.__version__" }
[project.urls]
Homepage = "https://pg-upsert.readthedocs.io"
Repository = "https://github.com/geocoug/pg-upsert"
Issues = "https://github.com/geocoug/pg-upsert/issues"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"*cache*",
]
# The line length to use when enforcing long-lines violations (like E501).
line-length = 120
# Assume Python 3.13.
target-version = "py313"
# Whether to automatically exclude files that are ignored by .ignore, .gitignore, .git/info/exclude, and global gitignore files.
respect-gitignore = true
# Default autofix behavior
fix = false
[tool.ruff.lint]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# A list of rule codes or prefixes to enable.
# Prefixes can specify exact rules (like F841), entire categories (like F), or anything in between.
# Default = Pyflakes `E` and `F` codes.
select = [
"E",
"F",
"Q",
"B",
"I",
"UP",
"N",
"S",
"C4",
"T20",
"RET",
"SIM",
"PD",
"RUF",
]
ignore = ["PD901", "S101", "F401", "SIM117", "F811", "UP031"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.bumpversion]
current_version = "1.5.3"
commit = true
commit_args = "--no-verify"
tag = true
[[tool.bumpversion.files]]
filename = "src/pg_upsert/__version__.py"
[tool.pytest.ini_options]
addopts = [
"--cov=pg_upsert",
"--cov=tests",
"--strict-markers",
"--strict-config",
"-ra",
"--cov-branch",
"--color=yes",
# "--cov-fail-under=90",
]
testpaths = "tests"
log_cli = true
[tool.coverage.report]
exclude_also = [
"from .__version__ import __title__",
"from .cli import app",
"if __name__ == .__main__.:",
]
[tool.tox]
required = ["tox>=4.24"]
env_list = ["py310", "py311", "py312", "py313", "build", "docs"]
skip_missing_interpreters = true
isolated_build = true
[tool.tox.env_run_base]
description = "Run tests under {base_python}"
deps = ["pytest", "pytest-cov", "python-dotenv"]
commands = [["pytest", "{posargs}"]]
[tool.tox.env.docs]
description = "Build documentation using MkDocs"
deps = [
"mkdocs",
"mkdocstrings",
"mkdocstrings-python",
"mkdocs-material",
"markdown-include",
]
commands = [["mkdocs", "build", "-c", "-q"]]
[tool.tox.env.build]
description = "Build distribution packages"
deps = ["tox-uv"]
commands = [["uv", "build"]]