-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
150 lines (127 loc) · 4.26 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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-build-scripts"]
##############################
# >>> Hatch Build Config <<< #
##############################
[project]
name = "reactpy_router"
description = "A URL router for ReactPy."
readme = "README.md"
keywords = ["React", "ReactJS", "ReactPy", "components"]
license = "MIT"
authors = [{ name = "Mark Bakhit", email = "archiethemonger@gmail.com" }]
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Multimedia :: Graphics",
"Topic :: Software Development :: Widget Sets",
"Topic :: Software Development :: User Interfaces",
"Environment :: Web Environment",
"Typing :: Typed",
]
dependencies = ["reactpy>=1.0.0, <2.0.0", "typing_extensions"]
dynamic = ["version"]
urls.Changelog = "https://reactive-python.github.io/reactpy-router/latest/about/changelog/"
urls.Documentation = "https://reactive-python.github.io/reactpy-router/latest/"
urls.Source = "https://github.com/reactive-python/reactpy-router"
[tool.hatch.version]
path = "src/reactpy_router/__init__.py"
[tool.hatch.build.targets.sdist]
include = ["/src"]
artifacts = ["/src/reactpy_router/static/"]
[tool.hatch.build.targets.wheel]
artifacts = ["/src/reactpy_router/static/"]
[tool.hatch.metadata]
license-files = { paths = ["LICENSE.md"] }
[tool.hatch.envs.default]
installer = "uv"
[[tool.hatch.build.hooks.build-scripts.scripts]]
commands = [
"bun install --cwd src/js",
"bun build src/js/src/index.js --outfile src/reactpy_router/static/bundle.js --minify",
]
artifacts = []
#############################
# >>> Hatch Test Runner <<< #
#############################
[tool.hatch.envs.hatch-test]
extra-dependencies = ["pytest-sugar", "anyio", "reactpy[testing,starlette]"]
randomize = true
matrix-name-format = "{variable}-{value}"
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
[tool.pytest.ini_options]
addopts = """\
--strict-config
--strict-markers
"""
#######################################
# >>> Hatch Documentation Scripts <<< #
#######################################
[tool.hatch.envs.docs]
template = "docs"
dependencies = [
"mkdocs",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-material==9.4.0",
"mkdocs-include-markdown-plugin",
"mkdocs-spellcheck[all]",
"mkdocs-git-authors-plugin",
"mkdocs-minify-plugin",
"mike",
"mkdocstrings[python]",
"black", # Used by mkdocstrings for auto formatting
"linkcheckmd",
]
[tool.hatch.envs.docs.scripts]
serve = ["cd docs && mkdocs serve"]
build = ["cd docs && mkdocs build --strict"]
linkcheck = [
"linkcheckMarkdown docs/ -v -r",
"linkcheckMarkdown README.md -v -r",
"linkcheckMarkdown CHANGELOG.md -v -r",
]
deploy_latest = ["cd docs && mike deploy --push --update-aliases {args} latest"]
deploy_develop = ["cd docs && mike deploy --push develop"]
############################
# >>> Hatch JS Scripts <<< #
############################
[tool.hatch.envs.javascript]
detached = true
[tool.hatch.envs.javascript.scripts]
check = ["cd src/js && bun install", "cd src/js && bun run check"]
fix = ["cd src/js && bun install", "cd src/js && bun run format"]
#########################
# >>> Generic Tools <<< #
#########################
[tool.ruff]
extend-exclude = [".venv/*", ".eggs/*", "build/*"]
line-length = 120
format.preview = true
lint.extend-ignore = [
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"ARG004", # Unused static method argument
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"PLR2004", # Magic value used in comparison
"SIM115", # Use context handler for opening files
"SLF001", # Private member accessed
]
lint.preview = true
[tool.coverage.run]
branch = true
parallel = true
source = ["src/", "tests/"]
[tool.coverage.paths]
source = ["src/"]
[tool.coverage.report]
show_missing = true
exclude_lines = ["pragma: no cover", "...", "raise NotImplementedError"]