Skip to content

Commit ffac74a

Browse files
committed
add publish task
1 parent 37fab4f commit ffac74a

File tree

3 files changed

+290
-581
lines changed

3 files changed

+290
-581
lines changed

pyproject.toml

+17-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,25 @@
44
name = "project"
55
version = "0.0.0"
66
description = "Scripts for managing the ReactPy respository"
7-
dependencies = ["invoke"]
7+
dependencies = ["invoke", "ruff", "black"]
88

99
# --- Hatch ----------------------------------------------------------------------------
1010

1111
[tool.hatch.envs.default]
1212
post-install-commands = ["invoke env"]
1313

1414
[tool.hatch.envs.default.scripts]
15-
lint = "invoke lint"
16-
test = "invoke test"
15+
publish = "invoke publish {args}"
16+
17+
checks = ["lint", "test"]
18+
lint = ["lint-py {args}", "lint-js {args}"]
19+
test = ["test-py", "test-js"]
20+
21+
lint-py = "invoke lint-py {args}"
22+
lint-js = "invoke lint-js {args}"
23+
24+
test-py = "invoke test-py {args}"
25+
test-js = "invoke test-js {args}"
1726

1827
# --- Black ----------------------------------------------------------------------------
1928

@@ -36,7 +45,8 @@ select = [
3645
"E",
3746
"EM",
3847
"F",
39-
"FBT",
48+
# TODO: turn this on later
49+
# "FBT",
4050
"I",
4151
"ICN",
4252
"ISC",
@@ -55,6 +65,8 @@ select = [
5565
"YTT",
5666
]
5767
ignore = [
68+
# TODO: turn this on later
69+
"N802", "N806", # allow TitleCase functions/variables
5870
# Allow non-abstract empty methods in abstract base classes
5971
"B027",
6072
# Allow boolean positional values in function calls, like `dict.get(... True)`
@@ -77,4 +89,4 @@ ban-relative-imports = "all"
7789

7890
[tool.ruff.per-file-ignores]
7991
# Tests can use magic values, assertions, and relative imports
80-
"tests/**/*" = ["PLR2004", "S101", "TID252"]
92+
"**/tests/**/*" = ["PLR2004", "S101", "TID252"]

src/py/reactpy/pyproject.toml

+7-16
Original file line numberDiff line numberDiff line change
@@ -93,37 +93,28 @@ cov = [
9393
[tool.hatch.envs.lint]
9494
detached = true
9595
dependencies = [
96-
"black>=23.1.0",
9796
"mypy>=1.0.0",
98-
"ruff>=0.0.243",
97+
"types-click",
98+
"types-tornado",
99+
"types-pkg-resources",
100+
"types-flask",
101+
"types-requests",
99102
]
100103

101104
[tool.hatch.envs.lint.scripts]
102105
typing = "mypy --install-types --non-interactive {args:reactpy tests}"
103-
style = [
104-
"ruff {args:.}",
105-
"black --check --diff {args:.}",
106-
]
107-
fix = [
108-
"black {args:.}",
109-
"ruff --fix {args:.}",
110-
"style",
111-
]
112-
all = [
113-
"style",
114-
"typing",
115-
]
106+
all = ["typing"]
116107

117108
[[tool.hatch.build.hooks.build-scripts.scripts]]
118109
work_dir = "../../js"
110+
out_dir = "reactpy/_static"
119111
commands = [
120112
"npm install",
121113
"npm run build"
122114
]
123115
artifacts = [
124116
"app/dist/"
125117
]
126-
out_dir = "reactpy/_static"
127118

128119
# --- Black ----------------------------------------------------------------------------
129120

0 commit comments

Comments
 (0)