-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
132 lines (118 loc) · 3.31 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
############################
# --- Package Settings --- #
############################
[project]
name = "cloud-engineering-project"
description = "My package description"
authors = [{ name = "<your name>", email = "some-email@gmail.com" }]
readme = "README.md"
requires-python = ">=3.7"
license = { text = "MIT" }
dependencies = ["boto3", "fastapi", "pydantic-settings", "openai", "requests"]
classifiers = ["Programming Language :: Python :: 3"]
keywords = [
"python",
"fast-api",
"aws",
"lambda",
"s3",
"cloud-engineering",
"project",
]
# version will be derived dynamically from version.txt via setuptools
dynamic = ["version"]
# docs: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata
[tool.setuptools.dynamic]
version = { file = "version.txt" }
# optional dependencies can be installed with square brackets, e.g. `pip install my-package[test,static-code-qa]`
[project.optional-dependencies]
aws-lambda = ["mangum"]
api = ["uvicorn", "moto[server]"]
stubs = ["boto3-stubs[s3]"]
notebooks = ["jupyter", "ipykernel", "rich"]
test = ["pytest", "pytest-cov", "moto[s3]"]
release = ["build", "twine"]
static-code-qa = [
"pre-commit",
"pylint",
"black",
"isort",
"flake8",
"flake8-docstrings",
"Flake8-pyproject",
"radon",
]
# Installing dev depenendencies in your virtual env makes it so that during development VS Code can
# - surface linting errors
# - automatically apply formatting
# - show enhanced autocompletion for stubs libraries
# See .vscode/settings.json to see how VS Code is configured to use these tools
dev = ["cloud-engineering-project[aws-lambda,test,release,static-code-qa,stubs,notebooks,api]"]
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
# include more than only .py files in the distribution package (wheel)
[tool.setuptools.package-data]
files_api = ["*.json"]
##############################
# --- Code Quality Tools --- #
##############################
[tool.pytest.ini_options]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
[tool.black]
line-length = 119
# regular expression ignoring multiple patterns separated by '|' and newlines
exclude = '''
/(
\.venv
| venv
)/
'''
[tool.flake8]
docstring-convention = "all"
ignore = [
"D107",
"D212",
"E501",
"W503",
"W605",
"D203",
"D100",
"R701",
"D401",
# D103: Missing docstring in public function
"D103",
# D101: Missing docstring in public class
"D101",
# D102: Missing docstring in public method
"D102",
# D104: Missing docstring in public package
"D104",
# D105: Missing docstring in magic method
"D105",
]
exclude = [".venv"]
max-line-length = 119
# radon
radon-max-cc = 10
[tool.isort]
profile = "black"
multi_line_output = "VERTICAL_HANGING_INDENT"
force_grid_wrap = 2
line_length = 119
[tool.pylint."messages control"]
disable = [
"line-too-long",
"trailing-whitespace",
"missing-function-docstring",
"consider-using-f-string",
"import-error",
"too-few-public-methods",
"redefined-outer-name",
"unused-argument",
"inconsistent-return-statements",
"unsupported-binary-operation",
"unsubscriptable-object",
"missing-module-docstring",
]