forked from MrBlenny/py-d2
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (98 loc) · 2.64 KB
/
pyproject.toml
File metadata and controls
110 lines (98 loc) · 2.64 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
[project]
name = "d2-python"
version = "1.0.0"
description = "An unofficial, fully typed python interface for building .d2 graph files in python."
authors = [
{name = "David Revay", email = "daverevay@gmail.com"},
{name = "Robby", email = "h0rv@users.noreply.github.com"}
]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.8"
keywords = [
"d2-python",
"d2",
"py-d2",
"d2-lang",
"d2-python",
"declarative-diagrams",
"diagram-language",
"terrastruct",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[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"
[project.scripts]
example = "d2.main:example"
[project.optional-dependencies]
dev = [
"ruff>=0.12.3",
"mypy>=0.982",
"pre-commit>=2.20.0",
]
test = [
"pytest>=7.1.3",
]
coverage = [
"coverage>=6.5.0",
"pytest-cov>=4.0.0",
]
[tool.uv]
package = true
[tool.uv.build-backend]
module-name = "d2"
[build-system]
requires = ["uv_build>=0.7.19,<0.8.0"]
build-backend = "uv_build"
[tool.mypy]
mypy_path = "src"
warn_return_any = true
warn_unused_configs = true
warn_unreachable = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -vvv -s"
testpaths = ["tests"]
pythonpath = ["tests"]
norecursedirs = ["tests/_cache"]
[tool.ruff]
line-length = 120
target-version = "py38"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"UP006", # Use `list` instead of `List` (requires Python 3.9+, keep List for 3.7+ compatibility)
"UP007", # Use `X | Y` for type annotations (requires Python 3.10+, keep Union for 3.7+ compatibility)
"UP045", # Use `X | None` for type annotations (requires Python 3.10+, keep Optional for 3.7+ compatibility)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.isort]
force-single-line = true
force-sort-within-sections = true
lines-after-imports = 2
known-first-party = ["d2"]