-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (41 loc) · 1.36 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
SHELL := /bin/bash
ifneq ("$(wildcard .env)","")
include .env
else
$(shell echo -e "OPENAI_API_ORGANIZATION=PLEASE-ADD-ME\nOPENAI_API_KEY=PLEASE-ADD-ME\nPINECONE_API_KEY=PLEASE-ADD-ME\nPINECONE_ENVIRONMENT=gcp-starter\nDEBUG_MODE=True\n" >> .env)
endif
.PHONY: analyze init activate lint clean test
# Default target executed when no arguments are given to make.
all: help
analyze:
cloc . --exclude-ext=svg,json,zip --vcs=git
init:
npm install && \
python3.11 -m venv venv && \
source venv/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements.txt && \
pre-commit install
activate:
. venv/bin/activate
test:
cd grader && pytest -v -s tests/
python -m setup_test
lint:
pre-commit run --all-files && \
black .
clean:
rm -rf venv && rm -rf node_modules
release:
git commit -m "feat: force a new release" --allow-empty && git push
######################
# HELP
######################
help:
@echo '===================================================================='
@echo 'analyze - generate code analysis report'
@echo 'init - create a Python virtual environment and install dependencies'
@echo 'activate - activate the Python virtual environment'
@echo 'test - run Python unit tests'
@echo 'lint - run Python linting'
@echo 'clean - destroy the Python virtual environment'