forked from bcgov/STRR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (160 loc) · 4.73 KB
/
Copy pathpyproject.toml
File metadata and controls
172 lines (160 loc) · 4.73 KB
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
[tool.poetry]
name = "strr-api"
version = "0.3.33"
description = ""
authors = ["thorwolpert <thor@wolpert.ca>"]
license = "BSD 3-Clause"
readme = "README.md"
packages = [{include = "strr_api", from = "src"}]
[tool.poetry.dependencies]
python = "^3.12.2"
flask = "3.0.3"
launchdarkly-server-sdk = "^9.0.1"
python-dotenv = "^1.0.0"
flask-sqlalchemy = "^3.1.1"
flask-migrate = "^4.0.4"
sentry-sdk = "^1.24.0"
flask-babel = "^4.0.0"
flask-cors = "^4.0.0"
flask-jwt-oidc = "0.8.0"
gunicorn = "^21.2.0"
jsonschema = {extras = ["format"], version = "^4.20.0"}
pycountry = "^23.12.11"
psycopg2-binary = "^2.9.9"
pytest-env = "^1.1.3"
coloredlogs = "^15.0.1"
flask-httpauth = "^4.8.0"
flasgger = "^0.9.7.1"
pydantic = {extras = ["email"], version = "^2.12.5"}
google-auth = "^2.29.0"
google-cloud-storage = "2.14.0"
geoalchemy2 = "^0.15.1"
weasyprint = "^62.3"
sqlalchemy-utils = "^0.41.2"
nanoid = "^2.0.0"
sql-versioning = { git = "https://github.com/bcgov/sbc-connect-common.git", subdirectory = "python/sql-versioning", branch = "main" }
gcp-queue = { git = "https://github.com/bcgov/sbc-connect-common.git", subdirectory = "python/gcp-queue", branch = "main" }
testcontainers = "^4.14.0"
[tool.poetry.group.test.dependencies]
freezegun = "^1.2.2"
hypothesis = "^6.75.6"
pexpect = "^4.8.0"
pytest = "^8.0.0"
pytest-cov = "^4.0.0"
pytest-mock = "^3.10.0"
requests-mock = "^1.11.0"
testcontainers = "^4.14.0"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.1.1"
black = "^23.12.1"
pylint = "^3.0.3"
bandit = "^1.7.6"
isort = "^5.13.2"
testcontainers = "^4.14.0"
pytest-check = "^2.6.2"
strr-test-utils = { path = "../tests/python-test-utils", develop = true }
[tool.bandit]
exclude_dirs = [".venv","tests"]
skips = ["B104"]
[tool.black]
target-version = ["py310", "py311", "py312"]
line-length = 120
include = '\.pyi?$'
extend-exclude = '''
/(
# The following are specific to Black, you probably don't want those.
migrations
| devops
)/
'''
[tool.isort]
atomic = true
profile = "black"
line_length = 120
skip_gitignore = true
skip_glob = ["migrations", "devops"]
[tool.pylint.main]
fail-under = 10
max-line-length = 120
ignore = [ "migrations", "devops", "tests"]
ignore-patterns = ["^\\.#"]
ignored-modules= ["flask_sqlalchemy", "sqlalchemy", "SQLAlchemy" , "alembic", "scoped_session"]
ignored-classes= "scoped_session"
ignore-long-lines = "^\\s*(# )?<?https?://\\S+>?$"
extension-pkg-whitelist = "pydantic"
notes = ["FIXME","XXX","TODO"]
overgeneral-exceptions = ["builtins.BaseException", "builtins.Exception"]
confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFINED"]
disable = "C0209,C0301,W0511,W0613,W0703,W1514,R0801,R0902,R0903,R0911,R0401,R1705,R1718,W3101"
argument-naming-style = "snake_case"
attr-naming-style = "snake_case"
class-attribute-naming-style = "any"
class-const-naming-style = "UPPER_CASE"
class-naming-style = "PascalCase"
const-naming-style = "UPPER_CASE"
function-naming-style = "snake_case"
inlinevar-naming-style = "any"
method-naming-style = "snake_case"
module-naming-style = "any"
variable-naming-style = "snake_case"
docstring-min-length = -1
good-names = ["i", "j", "k", "ex", "Run", "_"]
bad-names = ["foo", "bar", "baz", "toto", "tutu", "tata"]
defining-attr-methods = ["__init__", "__new__", "setUp", "asyncSetUp", "__post_init__"]
exclude-protected = ["_asdict", "_fields", "_replace", "_source", "_make", "os._exit"]
valid-classmethod-first-arg = ["cls"]
valid-metaclass-classmethod-first-arg = ["mcs"]
[tool.pytest.ini_options]
minversion = "2.0"
testpaths = [
"tests",
]
addopts = "--verbose --strict -p no:warnings --cov=src --cov-config=pyproject.toml --cov-report html:htmlcov --cov-report xml:coverage.xml --cov-report term-missing"
python_files = [
"test*.py"
]
norecursedirs = [
".git", ".tox", "venv*", "requirements*", "build",
]
log_cli = true
log_cli_level = "1"
filterwarnings = [
"ignore::UserWarning",
"ignore::DeprecationWarning:testcontainers.*:",
"ignore::DeprecationWarning:docker.*:",
"ignore::ResourceWarning:testcontainers.*:",
]
markers = [
"slow",
"serial",
"conf: Inject flask config values into the app fixture",
"integration: full-stack tests using strr_test_utils (Postgres, Redis, HTTP)",
]
[tool.coverage.run]
branch = true
source = [
"src/strr_api",
]
omit = [
"wsgi.py",
"gunicorn_config.py",
# DSS: PostGIS geometry + SQL function dss_containing_organization_id — cover in integration tests
"*/models/dss.py",
]
[tool.coverage.report]
fail_under = 80
exclude_lines = [
"pragma: no cover",
"from",
"import",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
'if __name__ == "__main__":',
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"