-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
77 lines (61 loc) · 2.16 KB
/
pyproject.toml
File metadata and controls
77 lines (61 loc) · 2.16 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
[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[project]
name = "circuitpython-tool"
description = 'Command-line tool for interfacing with CircuitPython devices.'
requires-python = ">=3.10"
license = "MIT"
keywords = ["circuitpython", "microcontroller", "rp2040", "adafruit"]
authors = [
{ name = "Diony Rosa", email = "dhrosa+dev@gmail.com" },
]
dynamic = ["readme", "version"]
dependencies = ["tomlkit", "rich", "click", "rich-click", "humanize", "platformdirs", "readchar"]
[project.urls]
"Source code" = "https://github.com/dhrosa/circuitpython_tool"
# Generate a README for pypi that has all relative image links replaced with
# absolute links to images hosted on GitHub.
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "docs/README.md"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
replacement = '[\1](https://raw.githubusercontent.com/dhrosa/circuitpython_tool/main/docs/\g<2>)'
[project.scripts]
circuitpython-tool = "circuitpython_tool.cli.commands:main"
[tool.hatch.version]
path = "src/circuitpython_tool/__init__.py"
[tool.hatch.envs.default]
python = '3.10'
[tool.hatch.envs.style]
dependencies = ["setuptools", "isort", "black", "pylama", "mypy", "pytest"]
[tool.hatch.envs.style.scripts]
format = [
"isort --color src tests",
"black src tests",
]
check = [
"pylama --ignore E203 src tests", # E203 is not pep8-compliant, and black breaks it
"mypy --strict --pretty src tests",
]
all = [
"hatch run style:format",
"hatch run style:check",
]
[tool.hatch.envs.test]
dependencies = ["pytest"]
[tool.hatch.envs.test.scripts]
all = ["pytest"]
[tool.pytest.ini_options]
addopts = "--no-header -W error --showlocals -vv"
log_level = "DEBUG"
[tool.hatch.envs.docs]
dependencies = ["rich-codex", "sphinx", "sphinx-rtd-theme"]
[tool.hatch.envs.docs.scripts]
images = ["rich-codex --use-pty --skip-git-checks --no-confirm --terminal-width 100"]
sphinx = [
"python3 -m circuitpython_tool.tools.sphinx_docs",
"make -C docs html"
]