Skip to content

Commit 8132ebd

Browse files
committed
Add mbake
1 parent e8e3379 commit 8132ebd

5 files changed

Lines changed: 124 additions & 199 deletions

File tree

.bake.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# mbake configuration file
2+
# Generated with: mbake init
3+
4+
# Global settings
5+
debug = false
6+
verbose = false
7+
8+
# Error message formatting
9+
gnu_error_format = true
10+
wrap_error_messages = false
11+
12+
[formatter]
13+
# Spacing settings - enable proper spacing
14+
space_around_assignment = true
15+
space_before_colon = false
16+
space_after_colon = true
17+
18+
# Line continuation settings
19+
normalize_line_continuations = true
20+
max_line_length = 100
21+
22+
# PHONY settings
23+
auto_insert_phony_declarations = true
24+
group_phony_declarations = false
25+
phony_at_top = false
26+
27+
# General settings - enable proper formatting
28+
remove_trailing_whitespace = true
29+
ensure_final_newline = true
30+
normalize_empty_lines = true
31+
max_consecutive_empty_lines = 2
32+
fix_missing_recipe_tabs = true
33+
34+
# Conditional formatting settings (Default disabled)
35+
indent_nested_conditionals = false
36+
# Indentation settings
37+
tab_width = 2
38+
39+
# Variable alignment settings
40+
align_variable_assignments = false
41+
align_across_comments = false

Makefile

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,44 @@
66
# --no-config skips Splunk's internal PyPI mirror
77
UV_SYNC_CMD := uv sync --no-config
88

9-
.PHONY: uv-sync
10-
uv-sync:
9+
.PHONY: install
10+
install:
1111
$(UV_SYNC_CMD) --dev
1212

13-
.PHONY: uv-upgrade
14-
uv-upgrade:
13+
.PHONY: upgrade
14+
upgrade:
1515
$(UV_SYNC_CMD) --dev --upgrade
1616

17-
1817
# Workaround for make being unable to pass arguments to underlying cmd
1918
# $ SDK_DEPS_GROUP="build" make uv-sync-ci
20-
.PHONY: uv-sync-ci
21-
uv-sync-ci:
22-
uv sync --locked --group $(SDK_DEPS_GROUP)
19+
UV_RUN_CMD := uv run --frozen --no-config
20+
.PHONY: lint
21+
lint: lint-python lint-makefile
22+
23+
.PHONY: lint-python
24+
lint-python:
25+
$(UV_RUN_CMD) basedpyright
26+
$(UV_RUN_CMD) ruff check --fix
27+
$(UV_RUN_CMD) ruff format
28+
29+
.PHONY: lint-makefile
30+
lint-makefile:
31+
$(UV_RUN_CMD) mbake format --config ./.bake.toml Makefile docs/Makefile
32+
33+
UV_RUN_CMD := uv run --frozen --no-config
34+
.PHONY: ci-lint
35+
ci-lint: ci-lint-python ci-lint-makefile
36+
37+
.PHONY: ci-lint-python
38+
ci-lint-python:
39+
$(UV_RUN_CMD) basedpyright
40+
$(UV_RUN_CMD) ruff check --fix-only
41+
$(UV_RUN_CMD) ruff format --diff
42+
43+
.PHONY: ci-lint-makefile
44+
ci-lint-makefile:
45+
$(UV_RUN_CMD) mbake format --config ./.bake.toml --check Makefile docs/Makefile
46+
$(UV_RUN_CMD) mbake validate --config ./.bake.toml Makefile docs/Makefile
2347

2448
.PHONY: clean
2549
clean:

docs/make.bat

Lines changed: 0 additions & 190 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ test = [
4848
"vcrpy>=8.1.1",
4949
]
5050
release = ["build>=1.4.3", "jinja2>=3.1.6", "sphinx>=9.1.0", "twine>=6.2.0"]
51-
lint = ["basedpyright>=1.39.0", "ruff>=0.15.10"]
51+
lint = ["basedpyright>=1.39.0", "ruff>=0.15.10", "mbake>=1.4.6"]
5252
dev = [
5353
"rich>=14.3.3",
5454
"splunk-sdk[openai, anthropic]",

0 commit comments

Comments
 (0)