-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
141 lines (127 loc) · 3.33 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
[tool.poetry]
name = "pydataflow-template"
version = "0.1.0"
description = "pydataflow_template"
authors = ["satokiyo <satokiyo@loop8.biz>"]
readme = "README.md"
packages = [{include = "pydataflow_template", from = "src"}]
license = "MIT"
keywords = ["apache beam", "beam"]
[tool.poetry.dependencies]
python = ">=3.8.2,<3.11"
apache-beam = {version = "2.48", extras = ["gcp"]}
pip = "22.0"
google-cloud-storage = "^2.7.0"
google-cloud-bigquery = "3.1"
beam-postgres-connector = "^0.1.0"
setuptools = "^67.6.1"
wheel = "^0.40.0"
pandas = "^2.0.1"
db-dtypes = "^1.1.1"
mysql-connector-python = "^8.0.33"
beam-mysql-connector = {url = "https://github.com/satokiyo/beam-mysql-connector/releases/download/1.8.6/beam_mysql_connector-1.8.6-py3-none-any.whl"}
urllib3 = "1.26"
[tool.poetry.group.dev.dependencies]
mypy = "^0.991"
flake8 = "^6.0.0"
black = "^23.1.0"
isort = "^5.12.0"
pytest = "^7.2.1"
tox = "^3"
pytest-mock = "^3.10.0"
pytest-freezegun = "^0.4.2"
pyproject-flake8 = "^6.0.0.post1"
python-dotenv = "^1.0.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 100
[tool.isort]
profile = "black"
line_length = 100
# import_heading_stdlib = "Standard Library"
# import_heading_thirdparty = "Third Party Library"
# import_heading_firstparty = "First Party Library"
# import_heading_localfolder = "Local Library"
# from third_party import lib1, lib2...(https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html)
multi_line_output = 3
include_trailing_comma = true
force_sort_within_sections = true
[tool.flake8]
max-line-length = 100
max-complexity = 18
ignore = "E203,E266,E402,E501,W503,"
exclude = ["__pycache__", "__init__.py"]
[tool.mypy]
no_strict_optional = true
#check_untyped_defs = true
show_error_context = false
show_column_numbers = true
ignore_missing_imports = true
#disallow_untyped_defs = true
no_implicit_optional = true
warn_return_any = true
warn_unused_ignores = true
warn_redundant_casts = true
# disallow_any_decorated = True
# disallow_any_expr = True
# disallow_any_generics = True
# disallow_untyped_decorators = True
# disallow_untyped_defs = True
# follow_imports = silent
implicit_reexport = true
namespace_packages = true
show_error_codes = true
strict_equality = true
warn_unreachable = true
warn_unused_configs = true
# disallow_any_unimported = true
# disallow_subclassing_any = true
exclude = [
"^tests/",
"^build/",
"^.venv/",
"__init__.py$",
]
[[tool.mypy.overrides]]
module = "apache_beam.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "6.0"
pythonpath = ["src", "src/pydataflow_template"]
addopts = "-rsxX -l -x --tb=long --strict-markers --ff" # -v --pdb"
testpaths = [
"tests/",
]
markers = [
"unit: mark a test as a unit test",
"integration: mark a test as an integration test",
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
py38
py39
py310
isolated_build = true
skipsdist = true
[testenv]
allowlist_externals =
poetry
docker-compose
sleep
deps =
poetry
pytest
setenv =
PYTHONPATH = .
commands =
poetry install -v --no-root
#docker-compose -f tests/integration/docker-compose.yaml up -d
#sleep 2
poetry run python -m pytest -m unit
poetry run python -m pytest -m integration
#docker-compose -f tests/integration/docker-compose.yaml down --volume
"""