-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
195 lines (173 loc) · 6.18 KB
/
pyproject.toml
File metadata and controls
195 lines (173 loc) · 6.18 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "python-db2sql"
version = "1.0.0"
description = "Dump any supported source database into a PostgreSQL SQL file"
requires-python = ">=3.9"
license = { text = "MIT" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"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",
]
readme = "README.rst"
authors = [{ name = "Jacques Raphanel", email = "jraphanel@sismic.fr" }]
keywords = ["development", "database", "mssql", "mysql", "sqlite", "postgresql", "oracle"]
dependencies = [
"sqlalchemy>=2",
"colorama",
"pyyaml",
"pydantic>=2,<3",
"questionary>=2",
]
[project.optional-dependencies]
mssql = ["pymssql"]
mysql = ["pymysql"]
postgres = ["psycopg2-binary"]
oracle = ["oracledb"]
sqlite = []
all = ["pymssql", "pymysql", "psycopg2-binary", "oracledb"]
[project.scripts]
db2sql = "db2sql.interface.cli:main"
[project.entry-points."db2sql.readers"]
mssql = "db2sql.infrastructure.persistence.mssql:build_reader"
sqlite = "db2sql.infrastructure.persistence.sqlite:build_reader"
mysql = "db2sql.infrastructure.persistence.mysql:build_reader"
postgres = "db2sql.infrastructure.persistence.postgres:build_reader"
oracle = "db2sql.infrastructure.persistence.oracle:build_reader"
[project.entry-points."db2sql.emitters"]
postgres = "db2sql.infrastructure.emit.postgres:PostgresSqlEmitter"
mssql = "db2sql.infrastructure.emit.mssql:MssqlSqlEmitter"
[project.entry-points."db2sql.writers"]
postgres = "db2sql.infrastructure.writer.postgres:build_writer"
mssql = "db2sql.infrastructure.writer.mssql:build_writer"
[project.urls]
changelog = "https://github.com/sismicfr/python-db2sql/blob/main/CHANGELOG.md"
homepage = "https://github.com/sismicfr/python-db2sql"
issues = "https://github.com/sismicfr/python-db2sql/issues"
repository = "http://github.com/sismicfr/python-db2sql.git"
[tool.black]
line-length = 100
target-version = ["py39"]
[flake8]
exclude = [".git",".venv",".tox","dist","docs","*egg,build"]
max-line-length = 100
# We ignore the following because we use black to handle code-formatting
# E203: Whitespace before ':'
# E501: Line too long
# W503: Line break occurred before a binary operator
ignore = ["E203","E501","W503"]
[tool.isort]
profile = "black"
multi_line_output = 3
order_by_type = false
[tool.mypy]
files = "."
exclude = ["build/.*"]
# 'strict = true' is equivalent to the following:
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
no_implicit_reexport = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
# The following need to have changes made to be able to enable them:
# disallow_untyped_calls = true
[[tool.mypy.overrides]] # Overrides for currently untyped modules
module = []
ignore_errors = true
[[tool.mypy.overrides]]
module = ["colorama", "colorama.*"]
ignore_missing_imports = true
[tool.semantic_release]
assets = []
branch = "main"
version_variables = ["db2sql/_version.py:__version__"]
version_toml = ["pyproject.toml:project.version"]
commit_message = "chore: release v{version}"
commit_author = "semantic-release <semantic-release>"
commit_parser = "angular"
logging_use_named_masks = false
major_on_zero = true
tag_format = "v{version}"
# Build the Python sdist + wheel only. Standalone PyInstaller binaries
# require a per-OS runner and are produced by .github/workflows/release-binaries.yml,
# which then attaches them to the GitHub release created here.
build_command = "python -m pip install build && python -m build ."
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"ci",
"docs",
"feat",
"fix",
"perf",
"style",
"refactor",
"test",
"chore"
]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
[tool.semantic_release.changelog]
changelog_file = "CHANGELOG.md"
# `update` mode preserves the existing CHANGELOG.md content; new release
# sections are inserted at `insertion_flag` instead of regenerating the
# whole file from git history.
mode = "update"
insertion_flag = "<!-- version list -->"
exclude_commit_patterns = []
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true
[tool.pylint.messages_control]
max-line-length = 100
max-return = 10
jobs = 0 # Use auto-detected number of multiple processes to speed up Pylint.
disable = [
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
"too-many-branches",
"too-many-statements",
"duplicate-code",
]
fail-under = 10.0
max-args=15 # Maximum number of arguments for function / method.
max-attributes=20 # Maximum number of attributes for a class (see R0902).
max-local=25 # Maximum number of local variables
max-bool-expr=8 # Maximum number of boolean expressions in an if statement (see R0916).
max-public-methods = 25 # Maximum number of public methods for a class (see R0904).
max-positional-arguments = 10 # Minimum number of postional arguments
min-public-methods=1 # Minimum number of public methods
[tool.pytest.ini_options]
xfail_strict = true
markers = [
"functional: requires the docker stack (mssql/oracle/postgres) started via `make stack-up`",
"oracle: subset of functional tests that require the Oracle container (heavy, on-demand)",
]
# If 'log_cli=True' the following apply
# NOTE: If set 'log_cli_level' to 'DEBUG' will show a log of all of the HTTP requests
# made in functional tests.
log_cli_level = "INFO"
log_cli_format = "%(asctime)s.%(msecs)03d [%(levelname)8s] (%(filename)s:%(funcName)s:L%(lineno)s) %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"