-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
85 lines (76 loc) · 2.46 KB
/
Copy pathpyproject.toml
File metadata and controls
85 lines (76 loc) · 2.46 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
[tool.ariadne-codegen]
schema_path = "schema.graphql"
queries_path = "queries/"
target_package_name = "fragment_graphql_client"
[tool.poetry]
name = "fragment-python"
version = "1.1.1"
description = "Python SDK for https://fragment.dev/"
authors = ["Fragment Foundries Inc"]
license = "Apache 2.0"
readme = "README.md"
packages = [{include = "fragment"}]
[tool.poetry.dependencies]
python = "^3.10"
ariadne-codegen = "^0.17.2"
requests-oauth2client = "^1.6.0"
pydantic = "^2.8.0"
httpx = "^0.28.1"
authlib = "^1.6.12"
graphql-core = "^3.2.3"
click = "^8.1.7"
[tool.poetry.group.dev.dependencies]
pylint = "^3.2.6"
black = "^26.3.1"
isort = "^5.13.2"
mypy = "^1.11.2"
pytest = "^8.3.2"
pytest-asyncio = "^0.24.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
fragment-python-client-codegen = 'fragment.codegen.main:run'
[tool.pytest.ini_options]
testpaths = ["tests"]
# Makes the snapshotted client importable as `sdk`, so tests exercise the
# generated code rather than a hand-written approximation of it. Regenerate with
# `make snapshots`.
pythonpath = ["tests/snapshots/001-marketing-schema"]
# Everything unmarked runs offline. `make unit` deselects this marker.
markers = ["integration: needs live API credentials; see tests/conftest.py"]
[tool.mypy]
# Same path pytest uses, so `mypy tests/` can resolve the snapshotted `sdk`
# package and actually typecheck calls against the generated typed payloads.
mypy_path = "tests/snapshots/001-marketing-schema"
# tests/type_checks/ writes "this call is rejected" as `# type: ignore[...]`.
# This turns the day it stops being rejected into a failure, not a silent pass.
warn_unused_ignores = true
# The SDK is what customers typecheck against, so it is held to strict. The
# codegen package is build tooling and stays on the default settings. Spelled
# out rather than `strict = true`, which mypy only honours globally.
[[tool.mypy.overrides]]
module = [
"fragment.sdk.*",
"fragment.sync_sdk.*",
"fragment.client.*",
"fragment.exceptions",
]
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
no_implicit_reexport = true
warn_return_any = true
strict_equality = true
extra_checks = true
[tool.pylint.messages_control]
max-line-length = 88
disable = [
"missing-docstring",
"missing-class-docstring",
"missing-function-docstring",
"too-many-arguments",
]