2
2
build-backend = " hatchling.build"
3
3
requires = [" hatchling" , " hatch-build-scripts" ]
4
4
5
+ # #############################
6
+ # >>> Hatch Build Config <<< #
7
+ # #############################
8
+
5
9
[project ]
6
10
name = " reactpy_router"
7
11
description = " A URL router for ReactPy."
@@ -24,7 +28,7 @@ classifiers = [
24
28
" Environment :: Web Environment" ,
25
29
" Typing :: Typed" ,
26
30
]
27
- dependencies = [" reactpy>=1.0.0" , " typing_extensions" ]
31
+ dependencies = [" reactpy>=1.0.0, <2.0.0 " , " typing_extensions" ]
28
32
dynamic = [" version" ]
29
33
urls.Changelog = " https://reactive-python.github.io/reactpy-router/latest/about/changelog/"
30
34
urls.Documentation = " https://reactive-python.github.io/reactpy-router/latest/"
@@ -35,10 +39,10 @@ path = "src/reactpy_router/__init__.py"
35
39
36
40
[tool .hatch .build .targets .sdist ]
37
41
include = [" /src" ]
38
- artifacts = [" /src/reactpy_router/static/bundle.js " ]
42
+ artifacts = [" /src/reactpy_router/static/" ]
39
43
40
44
[tool .hatch .build .targets .wheel ]
41
- artifacts = [" /src/reactpy_router/static/bundle.js " ]
45
+ artifacts = [" /src/reactpy_router/static/" ]
42
46
43
47
[tool .hatch .metadata ]
44
48
license-files = { paths = [" LICENSE.md" ] }
@@ -53,7 +57,9 @@ commands = [
53
57
]
54
58
artifacts = []
55
59
56
- # >>> Hatch Tests <<<
60
+ # ############################
61
+ # >>> Hatch Test Runner <<< #
62
+ # ############################
57
63
58
64
[tool .hatch .envs .hatch-test ]
59
65
extra-dependencies = [" pytest-sugar" , " anyio" , " reactpy[testing,starlette]" ]
@@ -63,24 +69,30 @@ matrix-name-format = "{variable}-{value}"
63
69
[[tool .hatch .envs .hatch-test .matrix ]]
64
70
python = [" 3.9" , " 3.10" , " 3.11" , " 3.12" ]
65
71
66
- # >>> Hatch Documentation Scripts <<<
72
+ [tool .pytest .ini_options ]
73
+ addopts = """ \
74
+ --strict-config
75
+ --strict-markers
76
+ """
77
+
78
+ # ######################################
79
+ # >>> Hatch Documentation Scripts <<< #
80
+ # ######################################
67
81
68
82
[tool .hatch .envs .docs ]
69
83
template = " docs"
70
- detached = true
71
84
dependencies = [
72
85
" mkdocs" ,
73
86
" mkdocs-git-revision-date-localized-plugin" ,
74
87
" mkdocs-material==9.4.0" ,
75
88
" mkdocs-include-markdown-plugin" ,
76
- " linkcheckmd" ,
77
89
" mkdocs-spellcheck[all]" ,
78
90
" mkdocs-git-authors-plugin" ,
79
91
" mkdocs-minify-plugin" ,
80
92
" mike" ,
81
93
" mkdocstrings[python]" ,
82
- " black" ,
83
- " reactpy_router @ {root:uri} " ,
94
+ " black" , # Used by mkdocstrings for auto formatting
95
+ " linkcheckmd " ,
84
96
]
85
97
86
98
[tool .hatch .envs .docs .scripts ]
@@ -94,10 +106,23 @@ linkcheck = [
94
106
deploy_latest = [" cd docs && mike deploy --push --update-aliases {args} latest" ]
95
107
deploy_develop = [" cd docs && mike deploy --push develop" ]
96
108
109
+ # ###########################
110
+ # >>> Hatch JS Scripts <<< #
111
+ # ###########################
97
112
98
- # >>> Generic Tools <<<
113
+ [tool .hatch .envs .javascript ]
114
+ detached = true
115
+
116
+ [tool .hatch .envs .javascript .scripts ]
117
+ check = [" cd src/js && bun install" , " cd src/js && bun run check" ]
118
+ fix = [" cd src/js && bun install" , " cd src/js && bun run format" ]
119
+
120
+ # ########################
121
+ # >>> Generic Tools <<< #
122
+ # ########################
99
123
100
124
[tool .ruff ]
125
+ extend-exclude = [" .venv/*" , " .eggs/*" , " build/*" ]
101
126
line-length = 120
102
127
format.preview = true
103
128
lint.extend-ignore = [
@@ -111,13 +136,6 @@ lint.extend-ignore = [
111
136
" SLF001" , # Private member accessed
112
137
]
113
138
lint.preview = true
114
- extend-exclude = [" .venv/*" , " .eggs/*" , " build/*" ]
115
-
116
- [tool .pytest .ini_options ]
117
- addopts = """ \
118
- --strict-config
119
- --strict-markers
120
- """
121
139
122
140
[tool .coverage .run ]
123
141
branch = true
0 commit comments