-
Notifications
You must be signed in to change notification settings - Fork 12
/
pyproject.toml
180 lines (156 loc) · 3.56 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
174
175
176
177
178
179
180
[build-system]
requires = ["setuptools>=74", "wheel", "build", "setuptools_scm[toml]>=8.1"]
build-backend = "setuptools.build_meta"
[project]
name = "kfactory"
description = "KLayout API implementation of gdsfactory"
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
]
requires-python = ">=3.10"
version = "0.21.6"
authors = [
{name = "gdsfactory community", email = "contact@gdsfactory.com"},
]
dependencies = [
"aenum",
"cachetools >= 5.2.0",
"gitpython",
"loguru",
"klayout >= 0.29.7",
"pydantic >= 2.0.2, < 3",
"pydantic-settings >= 2.0.1, < 3",
"rectangle-packer",
"requests",
"ruamel.yaml.string",
"scipy",
"tomli",
"toolz",
"typer",
]
[project.optional-dependencies]
dev = [
"kfactory[full]",
"ruff",
"mypy",
"pre-commit",
"pylsp-mypy",
"python-lsp-server[all]",
"types-cachetools",
"pytest",
"types-docutils",
"types-Pygments",
"types-requests",
"types-setuptools",
"tbump",
]
docs = [
"kfactory[ipy]",
"mkdocs",
"mkdocs-jupyter>=0.24",
"mkdocstrings[python]",
"mkdocs-material",
"mkdocs_gen_files",
"mkdocs-literate-nav",
"mkdocs-section-index",
"mkdocs-video",
"pymdown-extensions",
]
ci = [
"pytest",
"pytest_regressions",
"types-cachetools",
"types-requests",
"kfactory[full]",
]
ipy = [
"ipython",
"ipywidgets",
"ipytree",
"ipyevents",
]
[project.scripts]
kf = "kfactory.cli:app"
[tool.setuptools.packages.find]
where = ["src"]
[tool.mypy]
python_version = "3.10"
strict = true
exclude = [
"src/kfactory/widgets/interactive.py",
]
plugins = "pydantic.mypy, numpy.typing.mypy_plugin"
[tool.pylsp-mypy]
enabled = true
live_mode = true
strict = true
[tool.pytest.ini_options]
testpaths = ["src", "tests"]
addopts = '--tb=short'
norecursedirs = ["extra/*.py"]
[tool.coverage.run]
omit = "**/test_*.py"
[tool.coverage.html]
directory = "_build/coverage_html_report"
[tool.codespell]
ignore-words-list = "euclidian,TE,TE/TM,te,ba,FPR,fpr_spacing,ro,nd,donot,schem"
skip = "pyproject.toml"
[tool.ruff]
fix = true
line-length = 88
exclude = ["tests", "docs", "src/kfactory/widgets/interactive.py"]
indent-width = 4
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"UP", # pyupgrade
"D", # pydocstyle
"I",
]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.tbump]
# Uncomment this if your project is hosted on GitHub:
# github_url = "https://github.com/<user or organization>/<project>/"
[tool.tbump.version]
current = "0.21.6"
# Example of a semver regexp.
# Make sure this matches current_version before
# using tbump
regex = '''
(?P<major>\d+)
\.
(?P<minor>\d+)
\.
(?P<patch>\d+)
'''
[tool.tbump.git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"
# For each file to patch, add a [[file]] config
# section containing the path of the file, relative to the
# tbump.toml location.
[[tool.tbump.file]]
src = "README.md"
[[tool.tbump.file]]
src = "pyproject.toml"
[[tool.tbump.file]]
src = "src/kfactory/__init__.py"
# You can specify a list of commands to
# run after the files have been patched
# and before the git commit is made