-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (61 loc) · 2.31 KB
/
Copy pathMakefile
File metadata and controls
72 lines (61 loc) · 2.31 KB
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
70
71
72
.PHONY: help
help:
@echo "Available targets:"
@echo " env - Synchronize the uv environment"
@echo " install_pre_commit_hooks - Install pre-commit hooks"
@echo " update_pre_commit_hooks - Upgrade pre-commit hooks"
@echo " lint - Lint the code"
@echo " lint-fix - Lint the code and apply fixes"
@echo " test - Run tests"
@echo " coverage - Generate coverage report"
@echo " docs-live - Generate documentation with live reload"
@echo " docs-markdown - Generate documentation in Markdown format"
@echo " docs-html - Generate documentation in HTML format"
.PHONY: env
env:
uv sync --all-groups
.PHONY: install_pre_commit_hooks
install_pre_commit_hooks:
pre-commit install -t pre-commit
pre-commit install -t pre-push
.PHONY: update_pre_commit_hooks
update_pre_commit_hooks:
pre-commit autoupdate
.PHONY: lint
lint:
mkdir -p /tmp/artifacts
ruff format . --diff
ruff check .
uv run mypy --version
uv run mypy --cache-dir /dev/null --junit-xml /tmp/artifacts/mypy.xml --check-untyped-defs src
.PHONY: lint-fix
lint-fix:
ruff format .
ruff check . --fix
.PHONY: test
test:
JIRA_TUI_KEYBIND_STYLE=standard uv run --no-sync pytest src/jiratui/actions/tests/test_actions.py
JIRA_TUI_KEYBIND_STYLE=legacy uv run --no-sync pytest src/jiratui/actions/tests/test_actions.py
JIRA_TUI_KEYBIND_STYLE=legacy uv run --no-sync pytest --ignore src/jiratui/actions/tests/test_actions.py src/jiratui
.PHONY: coverage
coverage:
JIRA_TUI_KEYBIND_STYLE=legacy pytest --ignore src/jiratui/actions/tests/ --cov=src/jiratui --cov-report term-missing:skip-covered src/jiratui/
.PHONY: docs-live
docs-live:
@echo 'Generating documentation with live reload'
sphinx-autobuild docs _build/html
.PHONY: docs-markdown
docs-markdown:
@echo 'Generating documentation in Markdown format'
sphinx-build -M markdown docs /tmp/markdown
.PHONY: docs-html
docs-html:
ifeq ($(strip $(OUTPUT_DIR)),)
@echo 'Generating documentation in HTML format into docs/_build/html'
sphinx-build docs docs/_build/html --doctree-dir /tmp
rm -rf /tmp/index.doctree
else
@echo 'Generating documentation in HTML format into $(OUTPUT_DIR)'
sphinx-build docs ${OUTPUT_DIR} --doctree-dir /tmp
rm -rf /tmp/index.doctree
endif