6
6
develop : # # install dependencies and build library
7
7
uv pip install -e .[develop]
8
8
9
+ requirements : # # install prerequisite python build requirements
10
+ python -m pip install --upgrade pip toml
11
+ python -m pip install ` python -c ' import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' `
12
+ python -m pip install ` python -c ' import toml; c = toml.load("pyproject.toml"); print(" ".join(c["project"]["optional-dependencies"]["develop"]))' `
13
+
9
14
build : # # build the python library
10
15
python -m build -n
11
16
@@ -15,20 +20,27 @@ install: ## install library
15
20
# ########
16
21
# LINTS #
17
22
# ########
18
- .PHONY : lint lints fix format
23
+ .PHONY : lint-py lint-docs fix-py fix-docs lint lints fix format
19
24
20
- lint : # # run python linter with ruff
25
+ lint-py : # # lint python with ruff
21
26
python -m ruff check csp_bot_commands
22
27
python -m ruff format --check csp_bot_commands
23
28
24
- # Alias
25
- lints : lint
29
+ lint-docs : # # lint docs with mdformat and codespell
30
+ python -m mdformat --check README.md
31
+ python -m codespell_lib README.md
26
32
27
- fix : # # fix python formatting with ruff
33
+ fix-py : # # autoformat python code with ruff
28
34
python -m ruff check --fix csp_bot_commands
29
35
python -m ruff format csp_bot_commands
30
36
31
- # alias
37
+ fix-docs : # # autoformat docs with mdformat and codespell
38
+ python -m mdformat README.md
39
+ python -m codespell_lib --write README.md
40
+
41
+ lint : lint-py lint-docs # # run all linters
42
+ lints : lint
43
+ fix : fix-py fix-docs # # run all autoformatters
32
44
format : fix
33
45
34
46
# ###############
0 commit comments