Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
104 lines (93 loc) · 2.74 KB
/
Copy pathpyproject.toml
File metadata and controls
104 lines (93 loc) · 2.74 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
[project]
name = "d2-python"
version = "2.0.1"
description = "Build D2 diagrams with Python code."
authors = [
{name = "David Revay", email = "daverevay@gmail.com"},
{name = "Robby", email = "h0rv@users.noreply.github.com"}
]
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"typing-extensions>=4.5; python_version < '3.12'",
]
keywords = [
"d2-python",
"d2",
"py-d2",
"d2-lang",
"d2-python",
"declarative-diagrams",
"diagram-language",
"terrastruct",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python :: Free Threading :: 3 - Stable",
"Typing :: Typed",
]
[project.optional-dependencies]
bin = ["d2-bin==0.9.*"]
[project.urls]
Repository = "https://github.com/h0rv/d2-python"
Documentation = "https://github.com/h0rv/d2-python/blob/main/README.md"
"Bug Tracker" = "https://github.com/h0rv/d2-python/issues"
[dependency-groups]
dev = [
"pytest>=8",
"pytest-cov>=6",
"ruff>=0.17",
"ty>=0.0.91",
]
[tool.uv]
package = true
[tool.uv.build-backend]
module-name = "d2"
[build-system]
requires = ["uv_build>=0.13.5,<0.14"]
build-backend = "uv_build"
[tool.ty.environment]
extra-paths = ["packages/d2-bin/src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D", # docstrings
"COM812", # conflicts with the formatter
"CPY001", # copyright headers
"EM", # exception message style
"TRY003", # exception message style
"PLR0913", # Shape and Connection take many options by design
"PLR0917", # existing positional parameters stay for compatibility
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "PLR2004"]
"examples/**" = ["INP001", "T201"]
"docs/banner.py" = ["INP001"] # standalone script, not a package
"packages/d2-bin/build_wheels.py" = [
"INP001", # standalone script, not a package
"S310", # downloads fixed https release URLs
]
"packages/d2-bin/src/d2_bin/__main__.py" = [
"S603", # runs the resolved d2 binary
"S606", # execs the resolved d2 binary
]
"src/d2/_render.py" = [
"A002", # public `format` parameter
"PLC0415", # d2_bin is an optional dependency imported on use
"S603", # runs the resolved d2 binary
]
"src/d2/diagram.py" = ["A002"] # public `vars` parameter
"src/d2/style.py" = ["FBT001"] # public positional bool parameters
[tool.ty.rules]
all = "error"