@@ -5,13 +5,15 @@ SHELL := /bin/bash
5
5
MAKEFLAGS += --warn-undefined-variables
6
6
MAKEFLAGS += --no-builtin-rules
7
7
8
+ PYPROJECT_TOML := pyproject.toml
9
+ PYPI_VERSION := 0.1.11
8
10
PYTHON_VERSION := 3.11
9
- PYPROJECT := pyproject.toml
10
- TARGET := splitme_ai tests
11
+ TARGET := splitme tests
11
12
TARGET_TEST := tests
12
13
13
14
14
- # -- Clean Up ------------------------------------------------------------------
15
+ # -- Clean ---------------------------
16
+
15
17
16
18
.PHONY : clean
17
19
clean : # # Clean build and virtual environment directories
@@ -21,30 +23,31 @@ clean: ## Clean build and virtual environment directories
21
23
-find . -name " *.pyc" -type f -exec rm -f {} +
22
24
23
25
24
- # -- Dependencies ------------------------------------------------------------
26
+ # -- Dev ---------------------------
27
+
25
28
26
29
.PHONY : build-hatch
27
30
build-hatch : # # Build the distribution package using hatch
28
31
hatch build
29
- pip show splitme-ai
32
+ pip show splitme
30
33
31
34
.PHONY : build
32
35
build : # # Build the distribution package using uv
33
36
uv build
34
- uv pip install dist/splitme_ai-0.1.0 -py3-none-any.whl
37
+ uv pip install dist/splitme- $( PYPI_VERSION ) -py3-none-any.whl
35
38
36
39
.PHONY : install
37
40
install : # # Install all dependencies from pyproject.toml
38
41
uv sync --dev --group test --group docs --group lint --all-extras
39
42
40
43
.PHONY : lock
41
44
lock : # # Lock dependencies declared in pyproject.toml
42
- uv pip compile pyproject.toml --all-extras
45
+ uv pip compile $( PYPROJECT_TOML ) --all-extras
43
46
44
47
.PHONY : requirements
45
48
requirements : # # Generate requirements files from pyproject.toml
46
- uv pip compile pyproject.toml -o requirements.txtiu
47
- uv pip compile pyproject.toml --all-extras -o requirements-dev.txt
49
+ uv pip compile $( PYPROJECT_TOML ) -o requirements.txtiu
50
+ uv pip compile $( PYPROJECT_TOML ) --all-extras -o requirements-dev.txt
48
51
49
52
.PHONY : sync
50
53
sync : # # Sync environment with pyproject.toml
@@ -59,16 +62,15 @@ venv: ## Create a virtual environment
59
62
uv venv --python $(PYTHON_VERSION )
60
63
61
64
62
- # -- Documentation ----------------------------------- ---------------------------
65
+ # -- Docs ---------------------------
63
66
64
67
.PHONY : docs
65
68
docs : # # Build documentation site using mkdocs
66
- cd docs && \
67
69
uv run mkdocs build --clean
68
70
uv run mkdocs serve
69
71
70
72
71
- # -- Linting ------------------------------------ ---------------------------
73
+ # -- Lint ---------------------------
72
74
73
75
.PHONY : format-toml
74
76
format-toml : # # Format TOML files using pyproject-fmt
@@ -96,26 +98,28 @@ typecheck-pyright: ## Type-check Python files using Pyright
96
98
uv run pyright $(TARGET )
97
99
98
100
99
- # -- Testing -------------------------------------------------------------------
101
+ # -- Tests ----------------------------
102
+
100
103
101
104
.PHONY : test
102
105
test : # # Run test suite using Pytest
103
- poetry run pytest $(TARGET_TEST ) --config-file $(PYPROJECT )
106
+ uv run pytest $(TARGET_TEST ) --config-file $(PYPROJECT_TOML )
107
+
104
108
109
+ # -- Utils ---------------------------
105
110
106
- # -- Utilities ------------------------------------------------------------------
107
111
108
112
.PHONY : run-pypi
109
113
run-pypi :
110
- uvx --isolated splitme-ai --split.i tests/data/readme-ai.md --split.settings. o .splitme-ai /pypi-h2/ --split.settings.hl " ##"
111
- uvx --isolated splitme-ai --split.i tests/data/readme-ai.md --split.settings. o .splitme-ai /pypi-h3/ --split.settings.hl " ###"
112
- uvx --isolated splitme-ai --split.i tests/data/readme-ai.md --split.settings. o .splitme-ai /pypi-h4/ --split.settings.hl " ####"
114
+ uvx --isolated splitme --split.i tests/data/markdown/ readme-ai.md --split.o .splitme/pypi-h2/ --split.level " ##"
115
+ uvx --isolated splitme --split.i tests/data/markdown/ readme-ai.md --split.o .splitme/pypi-h3/ --split.level " ###"
116
+ uvx --isolated splitme --split.i tests/data/markdown/ readme-ai.md --split.o .splitme/pypi-h4/ --split.level " ####"
113
117
114
118
.PHONY : run-splitter
115
119
run-splitter : # # Run the main application
116
- uv run splitme-ai --split.i tests/data/readme-ai.md --s.settings.o .splitme-ai/test-docs -h2/ --s.settings.hl " ##" --s.settings. mkdocs
117
- uv run splitme-ai --split.i tests/data/readme-ai.md --s.settings.o .splitme-ai/test-docs -h3/ --s.settings.hl " ###"
118
- uv run splitme-ai --split.i tests/data/readme-ai.md --s.settings.o .splitme-ai/test-docs -h4/ --s.settings.hl " ####"
120
+ uv run splitme --split.i tests/data/markdown/ readme-ai.md --split.o docs/examples/split-sections -h2 --split.level " ##" --mkdocs.dir docs/examples/split-sections-h2
121
+ uv run splitme --split.i tests/data/markdown/ readme-ai.md --split.o docs/examples/split-sections -h3/ --split.level " ###"
122
+ uv run splitme --split.i tests/data/markdown/ readme-ai.md --split.o docs/examples/split-sections -h4/ --split.level " ####"
119
123
120
124
.PHONY : help
121
125
help : # # Display this help
0 commit comments