-
Notifications
You must be signed in to change notification settings - Fork 12
/
pyproject.toml
194 lines (182 loc) · 6.16 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
[tool.poetry]
name = "toucan-connectors"
version = "7.3.1"
description = "Toucan Toco Connectors"
authors = ["Toucan Toco <[email protected]>"]
license = "BSD"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.11,<3.13"
cached-property = ">=1.5.2,<3.0.0"
Jinja2 = "^3.0.3"
pydantic = "^2.4.2"
requests = "^2.28.0"
# Dependencies for extras
Authlib = { version = "^1.3.2", optional = true }
awswrangler = { version = "^3.3.0", optional = true }
clickhouse-driver = { version = ">=0.2.3,<1.0", optional = true }
cx-Oracle = { version = "^8.3.0", optional = true }
dataiku-api-client = { version = ">=9.0.1,<14.0.0", optional = true }
elasticsearch = { version = ">=7.11.0,<8", optional = true }
google-api-python-client = { version = "^2", optional = true }
google-cloud-bigquery = { version = ">=3,<4", extras = [
"bqstorage",
"pandas",
], optional = true }
hubspot-api-client = { version = ">=7.4,<11.0", optional = true }
jq = { version = "^1.2.2", optional = true }
lxml = { version = ">=4.6.5,<6.0.0", optional = true }
oauth2client = { version = "^4.1.3", optional = true }
oauthlib = { version = "3.2.2", optional = true }
pandas = [
{ version = "<2", python = "<3.12", optional = true },
{ version = ">=2", python = ">=3.12", optional = true },
]
peakina = { version = ">=0.11", optional = true }
psycopg2 = { version = "^2.7.4", optional = true }
pyarrow = { version = "*", optional = true }
pyhdb = { version = ">=0.3.4,<1.0", optional = true }
PyJWT = { version = ">=1.5.3,<3", optional = true }
pymongo = { version = ">=3.12.0", optional = true }
PyMySQL = { version = "^1.1.1", optional = true }
pyodbc = { version = ">=4,<6", optional = true }
python-graphql-client = { version = ">=0.4.3,<1.0", optional = true }
python-slugify = { version = ">=5.0.2", optional = true }
redshift-connector = { version = "^2.0.907", optional = true }
requests-oauthlib = { version = "2.0.0", optional = true }
simplejson = { version = "^3.17.6", optional = true }
snowflake-connector-python = { version = ">=2.7.12,<4.0.0", optional = true }
tctc-odata = { version = ">=0.3,<1.0", optional = true }
tenacity = { version = ">=8.0.1,<10.0.0", optional = true }
xmltodict = { version = ">=0.13.0,<1.0", optional = true }
zeep = { version = "^4.1.0", optional = true }
[tool.poetry.dev-dependencies]
click = "^8.1.7"
cryptography = ">=40.0.2"
docker = "^7.1.0"
mock = "^5.1.0"
mypy = "^1.13"
pandas-stubs = "^2.2.3.241009"
pytest = "^8.3.3"
pytest-asyncio = ">=0.19.0,<1"
pytest-cov = "^6.0.0"
pytest-mock = "^3.14.0"
pytest-rerunfailures = "^14.0"
python-graphql-client = ">=0.4.3,<1"
PyYAML = ">=6.0.1,<7"
responses = ">=0.21.0,<1"
types-pyopenssl = "^24.1.0.20240722"
types-python-slugify = "^8.0.2.20240310"
types-requests = "^2.31.0.6"
types-simplejson = "^3.19.0.20240801"
types-pymysql = "^1.1.0.20241103"
[tool.poetry.extras]
awsathena = ["awswrangler", "pandas"]
azure_mssql = ["pyodbc", "pandas"]
base = ["Authlib", "jq", "pandas", "python-slugify", "tenacity", "pandas"]
clickhouse = ["clickhouse-driver", "pandas"]
dataiku = ["dataiku-api-client", "pandas"]
elasticsearch = ["elasticsearch", "pandas"]
github = ["python-graphql-client", "pandas"]
google_analytics = ["google-api-python-client", "oauth2client", "pandas"]
google_big_query = ["google-cloud-bigquery", "pandas"]
google_cloud_mysql = ["PyMySQL", "pandas"]
google_sheets = ["google-api-python-client", "pandas"]
http_api = ["oauthlib", "requests-oauthlib", "xmltodict", "pandas"]
hubspot = ["hubspot-api-client", "pandas"]
mongo = ["pymongo", "pandas"]
mssql = ["pyodbc", "pandas"]
mssql_TLSv1_0 = ["pyodbc", "pandas"]
mysql = ["PyMySQL", "pandas"]
odata = ["oauthlib", "requests-oauthlib", "tctc_odata", "pandas"]
odbc = ["pydobc", "pandas"]
oracle_sql = ["cx_Oracle", "pandas"]
peakina = ["peakina", "pandas"]
postgres = ["psycopg2", "pandas"]
Redshift = ["redshift_connector", "lxml", "pandas"]
sap_hana = ["pyhdb", "pandas"]
snowflake = ["snowflake-connector-python", "PyJWT", "pyarrow", "pandas"]
soap = ["zeep", "lxml", "pandas"]
# All
all = [
"awswrangler",
"Authlib",
"clickhouse-driver",
"cx-Oracle",
"dataiku-api-client",
"elasticsearch",
"google-api-python-client",
"google-cloud-bigquery",
"hubspot-api-client",
"jq",
"lxml",
"oauth2client",
"oauthlib",
"openpyxl",
"peakina",
"psycopg2",
"pyarrow",
"pyhdb",
"PyJWT",
"pandas",
"pymongo",
"PyMySQL",
"pyodbc",
"python-graphql-client",
"python-slugify",
"redshift-connector",
"requests-oauthlib",
"simplejson",
"snowflake-connector-python",
"tenacity",
"tctc-odata",
"xmltodict",
"zeep",
]
[tool.poetry.group.dev.dependencies]
ruff = ">=0.6.1,<0.8.0"
pre-commit = ">=3.6,<5.0"
types-oauthlib = "^3.2.0.20240217"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
python_version = "3.11"
plugins = "pydantic.mypy"
follow_imports = "silent"
show_error_codes = true
warn_no_return = true
warn_unused_configs = true
warn_unused_ignores = true
ignore_missing_imports = true
files = [
"toucan_connectors/auth.py",
"toucan_connectors/awsathena/awsathena_connector.py",
"toucan_connectors/google_big_query/google_big_query_connector.py",
"toucan_connectors/hubspot_private_app/hubspot_connector.py",
"toucan_connectors/mongo/mongo_connector.py",
"toucan_connectors/peakina/peakina_connector.py",
"toucan_connectors/postgres/postgresql_connector.py",
"toucan_connectors/mysql/mysql_connector.py",
"toucan_connectors/snowflake/snowflake_connector.py",
"toucan_connectors/snowflake_oauth2/snowflake_oauth2_connector.py",
"toucan_connectors/redshift/redshift_database_connector.py",
"toucan_connectors/toucan_connector.py",
]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "UP", "N", "C", "B", "I001", "S", "Q"]
ignore = [
"S101", # allow use of assert
# FIXME: S105, S106, S608 and S113 should be addressed
"S105",
"S106", # possible hardcoded password
"S608", # possible SQL injection
"S113", # requests call without timeout
"N801", # class names
"N802", # function names
"N818", # exception names
"B017", # pytest.raises(Exception)
"C901", # complexity
]