-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (50 loc) · 1.88 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
# ======================= Virtual Environment Management =======================
create_env:
@echo "🐍 Creating Virtual Environment for python3.10..."
python3.10 -m venv .venv
activate_env:
@echo "🐍 Activating Virtual Environment (python3.10)..."
activate ./.venv/bin/activate
# =========================== Dependency Management ============================
update_deps:
@echo "🔃 Updating dependencies..."
@poetry update
deps_install_no_dev: update_deps
@echo "⬇️ Installing only production dependencies..."
@poetry install --no-dev
deps_install: update_deps
@echo "⬇️ Installing all dependencies..."
@poetry install
deps_export: update_deps
@echo "📥 Exporting dependencies to requirements.txt"
@poetry export --without-hashes --output requirements.txt
# ================================ Code Quality ================================
check_flake8:
@echo "🎨 Checking with Flake8..."
@poetry run flake8 ./fundom --count --show-source --statistics
@echo "✅ Flake8 check finished!"
check_isort:
@echo "🎨 Checking with isort..."
@poetry run isort **/*.py --check-only
@echo "✅ isort check finished!"
test:
@echo "🧪 Running tests with pytest..."
@poetry run pytest
@echo "✅ Pytest check finished!"
check: check_flake8 check_isort test
@echo "✅ All checks are finished!"
setup_pre_commit:
@echo "⚠️ Setting up pre-commit..."
@pre-commit install
# ========================== Documentation Management ==========================
clean_docs:
@echo "📃 Cleaing documentation..."
@rm -f mkdocs.yml
@rm -f .readthedocs.yml
@rm -rf docs
docs: clean_docs
@echo "📃 Updating documentation with handsdown..."
@poetry run handsdown --external `git config --get remote.origin.url`
# ===================== Development Environment Management =====================
setup: create_env activate_env install_all setup_pre_commit
@echo "✨ Setup finished!"