-
Notifications
You must be signed in to change notification settings - Fork 10
/
pyproject.toml
115 lines (102 loc) · 3.06 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
[project]
name = "fakesnow"
description = "Fake Snowflake Connector for Python. Run, mock and test Snowflake DB locally."
version = "0.9.27"
readme = "README.md"
license = { file = "LICENSE" }
classifiers = ["License :: OSI Approved :: MIT License"]
keywords = ["snowflake", "snowflakedb", "fake", "local", "mock", "testing"]
requires-python = ">=3.9"
dependencies = [
"duckdb~=1.1.3",
"pyarrow",
"snowflake-connector-python",
"sqlglot~=25.34.0",
]
[project.urls]
homepage = "https://github.com/tekumara/fakesnow"
[project.scripts]
fakesnow = "fakesnow.cli:main"
[project.optional-dependencies]
dev = [
"build~=1.0",
"dirty-equals",
# to fix https://github.com/pandas-dev/pandas/issues/56995
"pandas-stubs",
# include compatible version of pandas, and secure-local-storage for token caching
"snowflake-connector-python[pandas, secure-local-storage]",
"pre-commit~=4.0",
"pyarrow-stubs==10.0.1.9",
"pytest~=8.0",
"pytest-asyncio",
"ruff~=0.8.1",
"twine~=6.0",
"snowflake-sqlalchemy~=1.7.0",
]
# for debugging, see https://duckdb.org/docs/guides/python/jupyter.html
notebook = ["duckdb-engine", "ipykernel", "jupysql"]
# for the standalone server
server = ["starlette", "uvicorn"]
[build-system]
requires = ["setuptools~=75.6", "wheel~=0.42"]
[tool.setuptools.packages.find]
where = ["."]
exclude = ["tests*", "node_modules*", "build*"]
[tool.pyright]
venvPath = "."
venv = ".venv"
exclude = ["**/node_modules", "**/__pycache__", "**/.*", "build"]
strictListInference = true
strictDictionaryInference = true
strictParameterNoneValue = true
reportTypedDictNotRequiredAccess = false
reportIncompatibleVariableOverride = true
reportIncompatibleMethodOverride = true
reportMatchNotExhaustive = true
reportUnnecessaryTypeIgnoreComment = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
# error on unhandled exceptions in background threads
# useful for catching errors in server or snowflake connector threads
filterwarnings = ["error::pytest.PytestUnhandledThreadExceptionWarning"]
[tool.ruff]
line-length = 120
# first-party imports for sorting
src = ["."]
fix = true
show-fixes = true
[tool.ruff.lint]
# rules to enable/ignore
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"ANN", # type annotations
"N", # pep8-naming
"B", # bugbear
"I", # isort
# "ARG", # flake8-unused-arguments - disabled because our fakes don't use all arguments
"SLF", # flake8-self
"UP", # pyupgrade
"PERF", # perflint
"RUF", # ruff-specific
"SIM", # flake8-simplify
"S113", # request-without-timeout
"A", # flake8-builtins
"ASYNC", # flake8-async
]
ignore = [
# allow no return type from dunder methods
"ANN204",
# allow == True because pandas dataframes overload equality
"E712",
]
[tool.ruff.lint.isort]
combine-as-imports = true
force-wrap-aliases = true
[tool.ruff.lint.per-file-ignores]
# test functions don't need return types
"tests/*" = ["ANN201", "ANN202"]
[tool.ruff.lint.flake8-annotations]
# allow *args: Any, **kwargs: Any
allow-star-arg-any = true