-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
148 lines (131 loc) · 3.44 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
[tool.poetry]
name = "fastapi-mongodb"
version = "0.0.1b4"
description = "A library that simplifies work and integration with MongoDB for a FastAPI project."
license = "MIT"
authors = ["Kostiantyn Salnykov <kostiantyn.salnykov@gmail.com>"]
maintainers = ["Kostiantyn Salnykov <kostiantyn.salnykov@gmail.com>"]
readme = "README.md"
homepage = "https://kostiantyn-salnykov.github.io/fastapi-mongodb/"
repository = "https://github.com/Kostiantyn-Salnykov/fastapi-mongodb/"
documentation = "https://kostiantyn-salnykov.github.io/fastapi-mongodb/"
keywords = ["fastapi", "mongodb", "pydantic", "motor", "pymongo", "orjson", "pyjwt"]
packages = [
{ "include" = "fastapi_mongodb" },
]
classifiers = [
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules"
]
[tool.poetry.urls]
"Issues" = "https://github.com/Kostiantyn-Salnykov/fastapi-mongodb/issues"
"Discussions" = "https://github.com/Kostiantyn-Salnykov/fastapi-mongodb/discussions"
[tool.poetry.extras]
orjson = ["orjson"]
[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.68.1"
motor = "^2.5.1"
click = "^8.0.1"
pymongo = { extras = ["tls", "srv"], version = "^3.12.0" }
pydantic = { extras = ["email", "dotenv"], version = "^1.8.2" }
pyjwt = "^2.1.0"
orjson = { optional = true, version = "^3.6.3" }
[tool.poetry.dev-dependencies]
uvicorn = "*"
httpx = "*"
ipython = "*"
pylint = "*"
black = "*"
flake8 = "*"
factory-boy = "*"
xenon = "*"
pytest = "*"
pytest-asyncio = "*"
pytest-cov = "*"
coverage = "*"
faker = "*"
pyupgrade = "^2.25.0"
bandit = "^1.7.0"
tox = "^3.24.3"
pydocstyle = { extras = ["toml"], version = "^6.1.1" }
mkdocs-material = "^7.3.0"
pymdown-extensions = "^8.2"
mkdocs-macros-plugin = "^0.6.0"
mkdocs-i18n = "^0.4.2"
mkdocs-static-i18n = "^0.19"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# === Pytest ===
[tool.pytest.ini_options]
#addopts = "--maxfail=1 -rf"
norecursedirs = ["venv", "mongodb",]
testpaths = ["tests",]
python_files = ["test*.py"]
python_functions = ["*_test", "test_*"]
console_output_style = "progress"
# === Coverage ===
[tool.coverage.run]
branch = true
source = ["fastapi_mongodb"]
#omit = ["*/.local/*", "*/.idea/*", "*./venv/*", "*test*", "*__init__*", "*run.py"]
[tool.coverage.report]
# show_missing = true
ignore_errors = true
sort = "Cover"
precision = 4
omit = ["*/.local/*", "*/.idea/*", "*./venv/*", "*test*", "*__init__*", "*run.py"]
exclude_lines = ["pragma: no cover", "def __repr__", "if __name__ = .__main__.:"]
[tool.coverage.html]
directory = "coverage_html_report"
# === Black ===
[tool.black]
line-length = 120
target-version = ['py39']
include = '\.pyi?$'
extend-exclude = '''
/(
| dist
| .pytest_cache
| .tox
| mongodb
| tests
| docs
| docs_src
)/
'''
# === Isort ===
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 120
# === Tox ===
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist = py39
[testenv]
whitelist_externals = poetry
commands =
poetry install -v
poetry run pytest -v
"""
# === Pylint ===
[tool.pylint.messages_control]
disable = "C0330, C0326"
[tool.pylint.format]
max-line-length = "120"
# === Bandit ===
[tool.bandit]
targets = ["fastapi_mongodb"]
# === Pydocstyle ===
[tool.pydocstyle]
match = '(?!test_).*\.py'
match_dir = "^fastapi_mongodb"
ignore = "D107,D203"