-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (45 loc) · 1.71 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Licensed under the MIT License
# https://github.com/craigahobbs/ollama-chat/blob/main/LICENSE
# Download python-build
define WGET
ifeq '$$(wildcard $(notdir $(1)))' ''
$$(info Downloading $(notdir $(1)))
_WGET := $$(shell $(call WGET_CMD, $(1)))
endif
endef
WGET_CMD = if which wget; then wget -q -c $(1); else curl -f -Os $(1); fi
$(eval $(call WGET, https://craigahobbs.github.io/python-build/Makefile.base))
$(eval $(call WGET, https://craigahobbs.github.io/python-build/pylintrc))
# Set gh-pages source
GHPAGES_SRC := build/doc/
# Include python-build
include Makefile.base
# Development dependencies
TESTS_REQUIRE := bare-script
# Set the coverage limit
COVERAGE_REPORT_ARGS := $(COVERAGE_REPORT_ARGS) --fail-under 25
UNITTEST_PARALLEL_COVERAGE_ARGS := --coverage-branch --coverage-fail-under 25
# Disable pylint docstring warnings
PYLINT_ARGS := $(PYLINT_ARGS) static/models --disable=missing-class-docstring --disable=missing-function-docstring --disable=missing-module-docstring
# Don't delete models.json in gh-pages branch
GHPAGES_RSYNC_ARGS := --exclude='models/models.json'
help:
@echo " [run|test-app]"
clean:
rm -rf Makefile.base pylintrc
doc:
rm -rf $(GHPAGES_SRC)
mkdir -p $(GHPAGES_SRC)
cp -R \
README.md \
static/* \
src/ollama_chat/static/ollamaChat.smd \
$(GHPAGES_SRC)
.PHONY: test-app
commit: test-app
test-app: $(DEFAULT_VENV_BUILD)
$(DEFAULT_VENV_BIN)/bare -s src/ollama_chat/static/*.bare src/ollama_chat/static/test/*.bare
$(DEFAULT_VENV_BIN)/bare -c 'include <markdownUp.bare>' src/ollama_chat/static/test/runTests.bare$(if $(DEBUG), -d)$(if $(TEST), -v vTest "'$(TEST)'")
.PHONY: run
run: $(DEFAULT_VENV_BUILD)
$(DEFAULT_VENV_BIN)/ollama-chat$(if $(ARGS), $(ARGS))