-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
269 lines (248 loc) · 6.12 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
[tool.poetry]
name = "supabase-pydantic"
version = "0.15.2"
description = "A Pydantic(+) model generator for Supabase"
authors = ["K Boehm <kmbhm1@gmail.com>"]
license = "MIT"
repository = "https://github.com/kmbhm1/supabase-pydantic"
homepage = "https://kmbhm1.github.io/supabase-pydantic"
readme = "README.md"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Framework :: FastAPI",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Framework :: Pytest",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
]
keywords = ["supabase", "pydantic", "fastapi", "sqlalchemy", "REST", "generator", "schema", "model"]
[tool.poetry.scripts]
sb-pydantic = 'supabase_pydantic.cli:cli'
supabase-pydantic = 'supabase_pydantic.cli:cli'
[tool.poetry.dependencies]
python = "^3.10"
psycopg2-binary = "^2.9.9"
pydantic = "^2.6.3"
types-psycopg2 = "^2.9.21.20240417"
faker = "^24.11.0"
isort = "^5.13.2"
python-dotenv = "^1.0.1"
click = "^8.1.7"
toml = "^0.10.2"
ruff = "^0.4.1"
click-option-group = "^0.5.6"
jinja2 = "~3.1.5"
[tool.poetry.group.dev.dependencies]
sqlalchemy = {extras = ["mypy"], version = "^2.0.31"}
python-semantic-release = "^9.8.5"
pre-commit = "^3.7.1"
commitizen = "^3.28.0"
pytest = "^8.2.2"
mypy = "^1.11.0"
pytest-mypy = "^0.10.3"
pytest-cov = "^5.0.0"
pytest-mock = "^3.14.0"
types-toml = "^0.10.8.20240310"
networkx = "^3.3"
matplotlib = "^3.9.1.post1"
mkdocs = "^1.6.0"
mkdocs-material = "^9.5.30"
mkdocstrings = {extras = ["python"], version = "^0.25.1"}
mkdocs-redirects = "^1.2.1"
mkdocs-click = "^0.8.1"
pymdown-extensions = "^10.8.1"
[tool.supabase_pydantic]
overwrite_existing_files = true
nullify_base_schema = true
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"D", # pydocstyle
"I", # isort
"Q", # flake8-quotes
"W", # pycodestyle
]
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"docs",
"poc/",
# "notebooks",
"**/*tests*",
"scripts",
"setup.py",
"setup.cfg",
"pyproject.toml",
"poetry.lock",
"pyrightconfig.json",
".*.yml",
".*.yaml",
".*.toml",
".*.md",
".*.txt",
".*.rst",
".*.json",
".*.html",
".*.css",
".*.js",
".*.png",
".*.jpg",
".*.jpeg",
".*.gif",
".*.svg",
".*.ico",
".*.eot",
".*.ttf",
".*.woff",
".*.woff2",
".*.map",
# ".*.ipynb",
".*.pyi",
".*.pyc",
".*.pyd",
".*.pyo",
".*.pyw",
".*.pyz",
".*.pyzw",
".*.DS_Store",
".*.gitignore",
".*.gitkeep",
".*.gitmodules",
".*.gitattributes",
".*.git",
".*.hgignore",
".*.hgkeep",
".*.",
]
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"D206", # Docstring should be indented with spaces, not tabs
"E101", # indentation contains mixed spaces and tabs
"F403", # 'from module import *' used; unable to detect undefined names
"Q000", # Remove bad quotes
"Q002", # Remove bad quotes
"Q003", # Unnecessary single quotes
"W191", # Indentation contains tabs
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "single"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
plugins = ["pydantic.mypy"]
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"tests/*",
'entities/*', # generated files
'poc'
]
python_version = "3.10"
mypy_path = "."
explicit_package_bases = true
ignore_missing_imports = true
warn_unused_configs = true
warn_return_any = true
disallow_untyped_defs = true
check_untyped_defs = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.semantic_release]
allow_zero_version = true
assets = []
branch = "main"
build_command = "poetry build"
build_command_env = []
changelog_file = "CHANGELOG.md"
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
commit_parser = "angular"
dist_path = "dist/"
logging_use_named_masks = false
major_on_zero = true
no_git_verify = false
patch_without_tag = true
remove_dist = false
tag_format = "v{version}"
upload_to_pypi = false
upload_to_release = true
version_toml = ["pyproject.toml:tool.poetry.version"]
[tool.semantic_release.branches.main]
match = "(main|master)"
prerelease_token = "rc"
prerelease = false
[tool.semantic_release.changelog]
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = []
[tool.semantic_release.changelog.environment]
block_start_string = "{%"
block_end_string = "%}"
variable_start_string = "{{"
variable_end_string = "}}"
comment_start_string = "{#"
comment_end_string = "#}"
trim_blocks = false
lstrip_blocks = false
newline_sequence = "\n"
keep_trailing_newline = false
extensions = []
autoescape = true
[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "KB <kmbhm1@gmail.com>"
[tool.semantic_release.commit_parser_options]
allowed_tags = ["build", "chore", "ci", "docs", "feat", "feature", "fix", "perf", "style", "refactor", "test"]
minor_tags = ["feat", "feature"]
patch_tags = ["fix", "perf", "docs", "refactor"]
default_bump_level = 0
[tool.semantic_release.remote]
name = "origin"
type = "github"
ignore_token_for_push = false
insecure = false
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true
[tool.pytest.ini_options]
pythonpath = [
".",
]
log_level = "INFO"
[tool.coverage]
[tool.coverage.run]
omit = [
'__init__.py',
'.venv/*',
]
[tool.coverage.report]
skip_empty = true
fail_under = 90