-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
153 lines (135 loc) · 3.97 KB
/
pyproject.toml
File metadata and controls
153 lines (135 loc) · 3.97 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "type-bridge"
version = "1.4.4"
description = "A modern, Pythonic ORM for TypeDB with an Attribute-based API"
readme = "README.md"
requires-python = ">=3.13"
license = {text = "MIT"}
authors = [
{name = "ds1sqe", email = "ds1sqe@mensakorea.org"}
]
keywords = ["typedb", "orm", "database", "typeql", "graph-database"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"typedb-driver>=3.8.0",
"pydantic>=2.12.4",
"isodate==0.7.2",
"lark>=1.1.9",
"jinja2>=3.1.0",
"typer>=0.15.0",
"type-bridge-core>=1.4.4",
]
[project.urls]
Homepage = "https://github.com/ds1sqe/type-bridge"
Repository = "https://github.com/ds1sqe/type-bridge"
Documentation = "https://ds1sqe.github.io/type-bridge/"
Issues = "https://github.com/ds1sqe/type-bridge/issues"
[project.scripts]
type-bridge = "type_bridge.migration.__main__:main"
[project.optional-dependencies]
dev = [
"pytest>=9.0.1",
"pytest-asyncio>=1.3.0",
"pytest-order>=1.2.0",
"pytest-cov>=6.0.0",
"pytest-benchmark>=5.1.0",
"ruff>=0.14.5",
"pyright>=1.1.407",
]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.27",
"mkdocs-gen-files>=0.5",
"mkdocs-literate-nav>=0.6",
"mkdocs-section-index>=0.3",
]
[tool.ty.environment]
# Point ty to the project virtualenv for accurate import resolution
python = ".venv"
extra-paths = ["."]
# Tests and examples use metaclass patterns that ty can't fully understand
[[tool.ty.overrides]]
include = ["tests/**", "examples/**"]
[tool.ty.overrides.rules]
# Metaclass-generated __init__ kwargs
unknown-argument = "ignore"
# Dynamic attributes from hasattr checks
unresolved-attribute = "ignore"
# Dynamic method calls after hasattr
call-non-callable = "ignore"
# Type coercion in tests
invalid-argument-type = "ignore"
invalid-assignment = "ignore"
unsupported-operator = "ignore"
[tool.mypy]
python_version = "3.13"
ignore_missing_imports = false
strict = false
mypy_path = ["typings"]
[tool.ruff]
line-length = 100
target-version = "py313"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
ignore = [
"N802", # Function name should be lowercase (intentional for field functions like String, Long)
"E501", # Line too long (some docstrings and complex expressions)
]
[tool.ruff.lint.per-file-ignores]
"examples/*.py" = ["F841", "E402"]
# Allow unused variables, Function level import in examples for demonstration
"tests/*.py" = ["F841", "N806"] # Allow unused variables and PascalCase class types in tests
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"integration: marks tests as integration tests (require running TypeDB)",
"proxy: marks tests as proxy integration tests (require proxy server + TypeDB)",
"unit: marks tests as unit tests (fast, no external dependencies)",
"benchmark: marks tests as benchmarks (run with --benchmark-only)",
]
# By default, run only unit tests (exclude integration, proxy, and benchmark tests)
addopts = "-m 'not integration and not benchmark and not proxy'"
[tool.coverage.run]
source = ["type_bridge"]
branch = true
omit = [
"type_bridge/__main__.py",
"type_bridge/migration/__main__.py",
"type_bridge/generator/__main__.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"@abstractmethod",
"\\.\\.\\.",
]
show_missing = true
precision = 2
[tool.coverage.html]
directory = "htmlcov"
[tool.uv.workspace]
members = [
"type-bridge-core",
]
[tool.uv.sources]
type-bridge-core = { workspace = true }
[dependency-groups]
dev = [
"mypy>=1.19.0",
]