-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathpyproject.toml
156 lines (138 loc) · 4.12 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
[build-system]
requires = [
"hatchling>=1.18",
"hatch-kicad",
"hatch-fancy-pypi-readme",
"hatch-vcs",
]
build-backend = "hatchling.build"
[project]
name = "kbplacer"
authors = [
{ name = "adamws", email = "[email protected]" },
]
description = "KiCad plugin for automatic keyboard's key placement"
keywords = ["kicad"]
requires-python = ">=3.8"
license = {text = "GPL-3.0"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Manufacturing",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)"
]
dynamic = ["readme", "version"]
[project.urls]
"Homepage" = "https://github.com/adamws/kicad-kbplacer"
"Bug Tracker" = "https://github.com/adamws/kicad-kbplacer/issues"
"Sponsor" = "https://ko-fi.com/adamws"
[project.scripts]
kbplacer = "kbplacer.__main__:app"
[tool.hatch]
build.targets.sdist.include = [
"kbplacer/*.py"
]
build.targets.sdist.exclude = [
"kbplacer/kbplacer_plugin_action.py"
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "kbplacer/_version.py"
[tool.hatch.build.targets.kicad-package]
name = "Keyboard footprints placer"
description = "Plugin for mechanical keyboard design"
description_full = [
"Plugin for mechanical keyboard design.\n",
"It features automatic key placement and routing based on various ",
"layout descriptions like <a href='www.keyboard-layout-editor.com'>kle</a>, ",
"<a href='www.github.com/ergogen/ergogen'>ergogen</a> and ",
"<a href='www.caniusevia.com'>via</a>.\n",
"To learn more visit project's homepage.",
]
identifier = "com.github.adamws.kicad-kbplacer"
author = { name = "adamws", web="https://adamws.github.io" }
tags = ["keyboard"]
status = "{env:KBPLACER_KICAD_STATUS:development}"
kicad_version = "6.0"
sources = ["kbplacer", "dist"] # rewrite paths
include = [
"kbplacer/*.py",
"kbplacer/icon.png",
]
artifacts = ["dist/locale"] # generated by `release/hatch_translate.py` hook
icon = "resources/icon.png"
download_url = "{env:KBPLACER_KICAD_RELEASE_URL:https://adamws.github.io/kicad-kbplacer/{zip_name}}"
[tool.hatch.build.targets.kicad-package.hooks.custom]
path = "release/hatch_translate.py"
[tool.hatch.build.targets.kicad-package.hooks.kicad-repository]
enable-by-default = false
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
fragments = [
{ text = "KiCad plugin for mechanical keyboard design.\n" },
{ text = "https://github.com/adamws/kicad-kbplacer" },
]
[tool.hatch.envs.lint]
detached = true
dependencies = [
"black>=24.4.2",
"mypy>=1.0.0",
"ruff>=0.5.3",
]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive {args:kbplacer tests}"
style = [
"ruff check --output-format=concise {args:.}",
"black --check --diff {args:.}",
]
fmt = [
"black {args:.}",
"ruff check --fix --output-format=concise {args:.}",
"style",
]
all = [
"style",
"typing",
]
[tool.black]
target-version = ["py37"]
line-length = 88
[tool.ruff]
lint.select = ["ANN", "E", "F", "I", "N", "PL", "W"]
lint.ignore = [
# Ignore missing type annotations for `self` in method and `cls` in classmethod
"ANN101", "ANN102",
]
[tool.ruff.lint.per-file-ignores]
"kbplacer/kbplacer_plugin_action.py" = ["N802"]
"kbplacer/kbplacer_dialog.py" = ["N802"]
"kbplacer/help_dialog.py" = ["N802"]
"tests/**/*" = ["ANN"]
[tool.ruff.lint.isort]
known-first-party = ["hatch_kicad"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.coverage.run]
relative_files = true
omit = [
"kbplacer/_version.py",
]
[tool.hatch.envs.tools]
dependencies = [
"colormath==3.0.0",
"drawsvg==2.4.0",
"kicad-skip==0.2.5",
"pyurlon==0.1.0",
"PyYAML==6.0.1",
"shapely==2.0.6",
"solidpython==1.1.3",
]
[tool.hatch.envs.tools.scripts]
layout2image = "python tools/layout2image.py {args}"
layout2schematic = "python tools/layout2schematic.py {args}"
layout2url = "python tools/layout2url.py {args}"
layout2openscad = "python tools/layout2openscad.py {args}"
kle2kle = "python tools/kle2kle.py {args}"