-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
173 lines (154 loc) · 4.22 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
[tool.poetry]
name = "platformics"
# placeholder version that will be replace by poetry-dynamic-versioning
version = "0.4.1"
description = "Codegen Python GraphQL Entity Framework"
authors = ["CZI Team <[email protected]>"]
license = "MIT License"
readme = "README.md"
packages = [{include = "platformics"}]
keywords = ["graphql", "codegen"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Code Generators",
"Programming Language :: Python :: 3.12",
]
repository = "https://github.com/chanzuckerberg/platformics"
[tool.poetry.scripts]
platformics = 'platformics.cli.main:cli'
[tool.poetry.dev-dependencies]
black = "^24.4.0"
uvicorn = "^0.23.1"
gunicorn = "^22.0.0"
pytest = "^7.4.0"
pytest-postgresql = "^5.0.0"
factory-boy = "^3.3.0"
pytest-asyncio = "^0.21.1"
mypy = "^1.5.1"
moto = "^4.2.3"
ruff = "^0.0.278"
isort = "^5.12.0"
faker-enum = "^0.0.2"
faker-biology = "^0.6.0"
httpx = "^0.24.1"
[tool.poetry.dependencies]
python = "^3.12"
fastapi = "^0.115.0"
biopython = "^1.84"
asyncpg = "^0.29.0"
alembic = "^1.11.1"
sgqlc = "^16.3"
psycopg-binary = "^3.1.9"
cerbos = "^0.10.0"
pydantic = "^2.1.1"
pydantic-settings = "^2.0.2"
jwcrypto = "^1.5.6"
uuid6 = "^2023.5.2"
types-requests = "^2.31.0.2"
boto3 = "^1.28.43"
boto3-stubs = {extras = ["s3", "sts"], version = "^1.28.61"}
jinja2 = "^3.1.3"
linkml = "^1.5.7"
strcase = "^1.0.0"
linkml-runtime = "^1.6.0"
sqlalchemy_utils = "^0.41.1"
strawberry-graphql = "0.257.0"
[build-system]
requires = ["poetry-core", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
# a wrapper for poetry.core.masonry.api
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
[tool.black]
line-length = 120
[tool.mypy]
show_error_codes = true
warn_unreachable = true
explicit_package_bases = true
ignore_missing_imports = true
exclude = [
"platformics/graphql_api/relay",
"platformics/thirdparty"
]
# We'd like to turn this on soon but we're not there yet.
# disallow_untyped_defs = true
# do not look at shopify and turn anything originating from it into Any
[[tool.mypy.overrides]]
module = ["platformics.graphql_api.relay.*"]
follow_imports = "skip"
[[tool.mypy.overrides]]
module = ["platformics.thirdparty.*"]
follow_imports = "skip"
[tool.ruff]
# Same as Black.
line-length = 120
# Assume Python 3.12.
target-version = "py312"
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"B", # bugbear
"I", # isort
"N", # pep8-naming
"ASYNC", # async
"COM", # commas
"C4", # comprehensions
"DTZ", # datetimez
"ISC", # implicit-str-concat
"G", # logging-format
"T20", # print
"SIM", # simplify
]
ignore = [
"E501", # line too long
"C408", # rewrite empty built-ins as literals
"T201", # print statements.
"DTZ001", # Datetime objects without timezones.
"DTZ007", # Datetime objects without timezones.
"DTZ005", # More datetimes without timezones.
"B008", # FastAPI's Dependency Injection tools make function calls in arg defaults.
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.isort]
known-first-party =["platformics"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.pytest.ini_options]
markers = [
"asyncio",
]