-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (53 loc) · 1.35 KB
/
Makefile
File metadata and controls
75 lines (53 loc) · 1.35 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
73
74
75
.DEFAULT_GOAL := all
.PHONY: all
all: ## Show the available make targets.
@echo "Usage: make <target>"
@echo ""
@echo "Targets:"
@fgrep "##" Makefile | fgrep -v fgrep
.PHONY: clean
clean: ## Clean the temporary files.
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf .ruff_cache
.PHONY: format
format: ## Format the code.
poetry run black .
poetry run ruff check . --fix
.PHONY: black
black:
poetry run black src
poetry run black aws_lambda
.PHONY: ruff
ruff:
poetry run ruff check src --fix
poetry run ruff check aws_lambda --fix
.PHONY: pylint
pylint:
poetry run pylint src
poetry run pylint aws_lambda
.PHONY: lint
lint: ## Run Python linter
make black
make ruff || true
make pylint || true
.PHONY: mypy
mypy: ## Run mypy.
poetry run mypy src
poetry run mypy aws_lambda
.PHONY: install
install: ## Install the dependencies excluding dev.
poetry install --only main --no-root
.PHONY: install-dev
install-dev: ## Install the dependencies including dev.
poetry install --no-root
.PHONY: run-local
run-local: ## Run locally.
streamlit run src/app.py
.PHONY: md_lint
md_lint: ## Lint Markdown files using Markdownlint.
sh shell_scripts/md_lint.sh
@echo "Markdownlint can fix some issues automatically. To fix them, run 'make md_fix'.";
.PHONY: md_fix
md_fix: ## Fix Markdown files using Markdownlint.
sh shell_scripts/md_fix.sh